RuntimeOptions
is an option for Compile that specifies runtime settings for the compiled function it creates.
Details
- RuntimeOptions applies to the execution of the compiled function.
- RuntimeOptions can take the following overall settings:
-
"Quality" optimize for quality of final results "Speed" optimize for speed of getting results - RuntimeOptions can also take the following nested settings:
-
"CatchMachineOverflow" False whether real overflow should be caught as it happens "CatchMachineIntegerOverflow" True whether integer overflow should be caught "CompareWithTolerance" True whether comparisons should work similarly to SameQ "EvaluateSymbolically" True whether to evaluate with symbolic arguments "RuntimeErrorHandler" Evaluate a function to apply if there is a fatal runtime error executing the function "WarningMessages" True whether warning messages should be emitted - RuntimeOptions->"Speed" is equivalent to the following nested settings:
-
"CatchMachineOverflow" False "CatchMachineIntegerOverflow" False "CompareWithTolerance" False "EvaluateSymbolically" True "RuntimeErrorHandler" Evaluate "WarningMessages" True - RuntimeOptions->"Quality" is equivalent to the following nested settings:
-
"CatchMachineOverflow" True "CatchMachineIntegerOverflow" True "CompareWithTolerance" True "EvaluateSymbolically" True "RuntimeErrorHandler" Evaluate "WarningMessages" True
Examples
open allclose allBasic Examples (1)
Options (5)
CatchMachineIntegerOverflow (1)
RuntimeErrorHandler (1)
EvaluateSymbolically (3)
The default is to evaluate the function symbolically with symbolic arguments:
With "EvaluateSymbolically"->False, the function returns unevaluated:
This evaluates if the symbolic argument is replaced with a number:
Sometimes symbolic evaluation does not give what you intend:
Preventing symbolic evaluation keeps the original intent:
Symbolic evaluation may be slow for expressions that expand out:
Text
Wolfram Research (2010), RuntimeOptions, Wolfram Language function, https://reference.wolfram.com/language/ref/RuntimeOptions.html.
CMS
Wolfram Language. 2010. "RuntimeOptions." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RuntimeOptions.html.
APA
Wolfram Language. (2010). RuntimeOptions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RuntimeOptions.html