File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -264,19 +264,21 @@ def code(self) -> str | None:
264264 def _resolve_cpp_options (
265265 cpp_options : dict [str , Any ] | None , multithreading : bool
266266 ) -> dict [str , Any ]:
267- out = {}
268- if multithreading :
267+ out = cpp_options or {}
268+ out = out .copy ()
269+ if multithreading and "STAN_THREADS" not in out :
269270 out ["STAN_THREADS" ] = "TRUE"
270- return out | cpp_options if cpp_options else out
271+ return out
271272
272273 @staticmethod
273274 def _resolve_stanc_options (
274275 stanc_options : dict [str , Any ] | None , stanc_optimizations : bool
275276 ) -> dict [str , Any ]:
276- out = {}
277- if stanc_optimizations :
277+ out = stanc_options or {}
278+ out = out .copy ()
279+ if stanc_optimizations and "O" not in out :
278280 out ["O" ] = 1
279- return out | stanc_options if stanc_options else out
281+ return out
280282
281283 def optimize (
282284 self ,
You can’t perform that action at this time.
0 commit comments