CppADCodeGen
HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
|
Public Member Functions | |
DynamicLib (DynamicLib &&other) noexcept | |
std::set< std::string > | getModelNames () override |
virtual std::unique_ptr< FunctorGenericModel< Base > > | modelFunctor (const std::string &modelName)=0 |
std::unique_ptr< GenericModel< Base > > | model (const std::string &modelName) override final |
virtual unsigned long | getAPIVersion () |
virtual void * | loadFunction (const std::string &functionName, bool required=true)=0 |
void | setThreadPoolDisabled (bool disabled) override |
bool | isThreadPoolDisabled () const override |
unsigned int | getThreadNumber () const override |
void | setThreadNumber (unsigned int n) override |
ThreadPoolScheduleStrategy | getThreadPoolSchedulerStrategy () const override |
void | setThreadPoolSchedulerStrategy (ThreadPoolScheduleStrategy s) override |
void | setThreadPoolVerbose (bool v) override |
bool | isThreadPoolVerbose () const override |
void | setThreadPoolGuidedMaxWork (float v) override |
float | getThreadPoolGuidedMaxWork () const override |
void | setThreadPoolNumberOfTimeMeas (unsigned int n) override |
unsigned int | getThreadPoolNumberOfTimeMeas () const override |
Protected Member Functions | |
void | validate () |
Abstract class used to load compiled models in a dynamic library
Definition at line 157 of file declare_cg.hpp.
|
inlinevirtualinherited |
Provides the API version used to create the model library.
Definition at line 89 of file functor_model_library.hpp.
|
inlineoverridevirtualinherited |
Provides the model names in the dynamic library.
Implements CppAD::cg::ModelLibrary< Base >.
Definition at line 66 of file functor_model_library.hpp.
|
inlineoverridevirtualinherited |
Provides the maximum number of threads used to determine sparse Jacobians and sparse Hessians for the models in this library. This value is only used by the models if they were compiled with multithreading support.
Implements CppAD::cg::ModelLibrary< Base >.
Definition at line 122 of file functor_model_library.hpp.
|
inlineoverridevirtualinherited |
Provides the number of time measurements taken by each computational task during multithreaded model evaluations. This is used to schedule work accross threads. The higher the value the more accurate the time estimations are but it requires additional calls to retrieve times. This value is only used by the models if they were compiled with multithreading support.
Implements CppAD::cg::ModelLibrary< Base >.
Definition at line 180 of file functor_model_library.hpp.
|
inlineoverridevirtualinherited |
Provides the thread scheduling strategy used to determine sparse Jacobians and sparse Hessians for the models in this library. This value is only used by the models if they were compiled with multithreading support.
Implements CppAD::cg::ModelLibrary< Base >.
Definition at line 135 of file functor_model_library.hpp.
|
inlineoverridevirtualinherited |
Determines whether or not multithreaded model evaluations are disabled.
Implements CppAD::cg::ModelLibrary< Base >.
Definition at line 115 of file functor_model_library.hpp.
|
pure virtualinherited |
Provides a pointer to a function in the model library.
functionName | The name of the function in the dynamic library |
required | Whether or not the function symbol must exist in the library. If the function is required and does not exist then the CppAD error handler is called, if it is not required and it does not exist then nullptr is return. |
CGException | If there is a problem loading the function symbol |
Implemented in CppAD::cg::LlvmModelLibrary3_2< Base >, CppAD::cg::LlvmModelLibrary3_4< Base >, CppAD::cg::LlvmModelLibrary3_6< Base >, CppAD::cg::LlvmModelLibrary3_8< Base >, CppAD::cg::LlvmModelLibrary4_0< Base >, and CppAD::cg::LlvmModelLibraryImpl< Base >.
Referenced by CppAD::cg::FunctorModelLibrary< Base >::getAPIVersion(), CppAD::cg::LlvmModel< Base >::LlvmModel(), and CppAD::cg::FunctorModelLibrary< Base >::validate().
|
inlinefinaloverridevirtualinherited |
Creates a new GenericModel object that can be used to evaluate the model.
modelName | The model name. |
Implements CppAD::cg::ModelLibrary< Base >.
Definition at line 80 of file functor_model_library.hpp.
Referenced by CppAD::cg::LlvmModelLibrary< Base >::modelFunctor().
|
pure virtualinherited |
Creates a new FunctorGenericModel object that can be used to evaluate the model.
modelName | The model name. |
Implemented in CppAD::cg::LlvmModelLibrary< Base >.
Referenced by CppAD::cg::FunctorModelLibrary< Base >::getModelNames(), and CppAD::cg::FunctorModelLibrary< Base >::model().
|
inlineoverridevirtualinherited |
Defines the maximum number of threads used to determine sparse Jacobians and sparse Hessians for the models in this library. This value is only used by the models if they were compiled with multithreading support. It should be defined before using the models.
n | the maximum number of threads |
Implements CppAD::cg::ModelLibrary< Base >.
Definition at line 129 of file functor_model_library.hpp.
|
inlineoverridevirtualinherited |
Defines whether or not to disable multithreaded model evaluations. This only works if the models if they were compiled with multithreading support.
disabled | true to only use the current thread to evaluate models. |
Implements CppAD::cg::ModelLibrary< Base >.
Definition at line 109 of file functor_model_library.hpp.
|
inlineoverridevirtualinherited |
Defines the number of time measurements taken by each computational task during multithreaded model evaluations. This is used to schedule work across threads. The higher the value the more accurate the time estimations are but it requires additional calls to retrieve times. This value is only used by the models if they were compiled with multithreading support.
n | the number of time measurements to take per task. |
Implements CppAD::cg::ModelLibrary< Base >.
Definition at line 174 of file functor_model_library.hpp.
|
inlineoverridevirtualinherited |
Defines the thread scheduling strategy used to determine sparse Jacobians and sparse Hessians for the models in this library. This value is only used by the models if they were compiled with multithreading support. It should be defined before using the models.
s | the thread scheduling strategy |
Implements CppAD::cg::ModelLibrary< Base >.
Definition at line 142 of file functor_model_library.hpp.
|
inlineprotectedinherited |
Check the version
Load the list of models
Load the the on close function
Thread pool related functions
Definition at line 207 of file functor_model_library.hpp.
Referenced by CppAD::cg::LlvmModelLibrary3_2< Base >::LlvmModelLibrary3_2(), CppAD::cg::LlvmModelLibrary3_4< Base >::LlvmModelLibrary3_4(), CppAD::cg::LlvmModelLibrary3_6< Base >::LlvmModelLibrary3_6(), CppAD::cg::LlvmModelLibrary3_8< Base >::LlvmModelLibrary3_8(), CppAD::cg::LlvmModelLibrary4_0< Base >::LlvmModelLibrary4_0(), and CppAD::cg::LlvmModelLibraryImpl< Base >::LlvmModelLibraryImpl().