Env
-
class Env : public idol::impl::Env
Environment class.
This class stores and manages every optimization objects and annotations in idol.
Essentially, it is the environment that controls the death and lives of such objects. It is through the environment that idol manages the different versions each optimization object may have during the execution of your program.
Important: If an optimization environment is destroyed, all of its objects are also destroyed. Trying to access them will lead to undefined behavior and, eventually, segmentation fault.
Typically, only one environment should be used by your code, though it is possible to instantiate many environment (not advised).
Environments are objects of the Env class and can be created as follows.
Env env; // Creates a new optimization environment.
Public Functions
-
Env() = default
Constructor.
Creates a new optimization environment.
Friends
- friend class Model
- friend class Var
- friend class Ctr
- friend class impl::Annotation
-
Env() = default