CppADCodeGen
HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
|
Public Member Functions | |
LlvmModelLibrary3_4 (llvm::Module *module, llvm::LLVMContext *context) | |
LlvmModelLibrary3_4 (const LlvmModelLibrary3_4 &)=delete | |
LlvmModelLibrary3_4 & | operator= (const LlvmModelLibrary3_4 &)=delete |
virtual void | preparePassManager () |
void * | loadFunction (const std::string &functionName, bool required=true) override |
virtual std::unique_ptr< LlvmModel< Base > > | modelLlvm (const std::string &modelName) |
std::unique_ptr< FunctorGenericModel< Base > > | modelFunctor (const std::string &modelName) override final |
std::set< std::string > | getModelNames () override |
std::unique_ptr< GenericModel< Base > > | model (const std::string &modelName) override final |
virtual unsigned long | getAPIVersion () |
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 | cleanUp () |
virtual void | destroyed (LlvmModel< Base > *model) |
void | validate () |
Protected Attributes | |
llvm::Module * | _module |
std::unique_ptr< llvm::LLVMContext > | _context |
std::unique_ptr< llvm::ExecutionEngine > | _executionEngine |
std::unique_ptr< llvm::FunctionPassManager > | _fpm |
std::set< LlvmModel< Base > * > | _models |
std::set< std::string > | _modelNames |
unsigned long | _version |
void(* | _onClose )() |
void(* | _setThreadPoolDisabled )(int) |
int(* | _isThreadPoolDisabled )() |
void(* | _setThreads )(unsigned int) |
unsigned int(* | _getThreads )() |
void(* | _setSchedulerStrategy )(int) |
int(* | _getSchedulerStrategy )() |
void(* | _setThreadPoolVerbose )(int v) |
int(* | _isThreadPoolVerbose )() |
void(* | _setThreadPoolGuidedMaxWork )(float v) |
float(* | _getThreadPoolGuidedMaxWork )() |
void(* | _setThreadPoolNumberOfTimeMeas )(unsigned int n) |
unsigned int(* | _getThreadPoolNumberOfTimeMeas )() |
Friends | |
class | LlvmModel< Base > |
Class used to load JIT'ed models by LLVM 3.4
Definition at line 30 of file llvm_model_library_3_4.hpp.
|
inline |
Definition at line 38 of file llvm_model_library_3_4.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.
|
inlineoverridevirtual |
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 |
Implements CppAD::cg::FunctorModelLibrary< Base >.
Definition at line 99 of file llvm_model_library_3_4.hpp.
|
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().
|
inlinefinaloverridevirtualinherited |
Creates a new FunctorGenericModel object that can be used to evaluate the model.
modelName | The model name. |
Implements CppAD::cg::FunctorModelLibrary< Base >.
Definition at line 51 of file llvm_model_library.hpp.
|
inlinevirtual |
Set up the optimizer pipeline
Definition at line 76 of file llvm_model_library_3_4.hpp.
Referenced by CppAD::cg::LlvmModelLibrary3_4< Base >::LlvmModelLibrary3_4().
|
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().