Turi Create
4.0
|
#include <core/globals/globals.hpp>
Registers a floating point global value.
Registers an integral point global value.
This should not be used directly. Use REGISTER_GLOBAL or
The | name of the value. TURI_{name} will be the environment variable which modifies this value. By convention, this should be in all caps |
value | A reference to the value. Value should be initialized the the default values. |
runtime_modifiable | Whether this can be set only by environment variables or at runtime. |
value_check | A callback function which checks the value of the value. This should be a simple lambda. (preferable +[](double) {...}) and should not capture anything. If the lambda returns true, the value changes are accepted. Defaults to nullptr in which case all value changes will be accepted. |
Definition at line 83 of file globals.hpp.