Normally a nimbleFunction
determines what objects from setup
code need to be preserved for run
code or other member functions. setupOutputs
allows explicit declaration for cases when an object created in setup output is not use in member functions.
An arbitrary set of names
Normally any object created in setup
code whose name appears in run
or another member function is included in the save results of setup code. When the nimbleFunction is compiled, such objects will become member data of the resulting C++ class. If it is desired to force an object to become member data even if it does not appear in a member function, declare it using setupOutputs
. E.g. setupOutputs(a, b)
declares that a
and b
should be preserved.
The setupOutputs
line will be removed from the setup code. It is really a marker during nimbleFunction creation of what should be preserved.