CppADCodeGen
HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
|
Public Member Functions | |
DynamicModelLibraryProcessor (ModelLibraryCSourceGen< Base > &modelLibGen, std::string libraryName="cppad_cg_model") | |
const std::string & | getLibraryName () const |
void | setLibraryName (const std::string &libraryName) |
const std::string * | getCustomLibraryExtension () const |
void | setCustomLibraryExtension (const std::string &libraryExtension) |
void | removeCustomLibraryExtension () |
std::map< std::string, std::string > & | getOptions () |
const std::map< std::string, std::string > & | getOptions () const |
std::unique_ptr< DynamicLib< Base > > | createDynamicLibrary (CCompiler< Base > &compiler, bool loadLib=true) |
void | createStaticLibrary (CCompiler< Base > &compiler, Archiver &ar, bool posIndepCode) |
Protected Member Functions | |
virtual std::unique_ptr< DynamicLib< Base > > | loadDynamicLibrary () |
const std::map< std::string, std::string > & | getLibrarySources () |
const std::map< std::string, std::string > & | getSources (ModelCSourceGen< Base > &model) |
Protected Attributes | |
std::string | _libraryName |
std::unique_ptr< const std::string > | _customLibExtension |
std::map< std::string, std::string > | _options |
ModelLibraryCSourceGen< Base > * | modelLibraryHelper_ |
Useful class for generating source code for the creation of a dynamic or a static library.
Definition at line 29 of file dynamic_library_processor.hpp.
|
inlineexplicit |
Creates a new helper class for the generation of dynamic or static libraries using the C language.
modelLibGen | |
libraryName | The path of the dynamic or static library to be created (without the extension) |
Definition at line 53 of file dynamic_library_processor.hpp.
|
inline |
Compiles all models and generates a dynamic library.
compiler | The compiler used to compile the sources and create the dynamic library |
loadLib | Whether or not to load the dynamic library |
Definition at line 125 of file dynamic_library_processor.hpp.
|
inline |
Compiles all models and generates a static library.
compiler | The compiler used to compile the sources |
ar | The archiver used to assemble the compiled source into a static library |
posIndepCode | Whether or not to compile the source with position independent code (static libraries typically do not use this feature) |
Definition at line 181 of file dynamic_library_processor.hpp.
|
inline |
Provides a custom library extension defined by the user
Definition at line 83 of file dynamic_library_processor.hpp.
|
inline |
Definition at line 64 of file dynamic_library_processor.hpp.
|
inline |
System dependent custom options
Definition at line 106 of file dynamic_library_processor.hpp.
|
inline |
System dependent custom options
Definition at line 113 of file dynamic_library_processor.hpp.
|
inline |
Resets the library extension to the default
Definition at line 99 of file dynamic_library_processor.hpp.
|
inline |
Defines a custom extension for the library that will be created
libraryExtension | the custom extension name |
Definition at line 92 of file dynamic_library_processor.hpp.
|
inline |
libraryName | the path of the dynamic or static library (without the extension) |
Definition at line 72 of file dynamic_library_processor.hpp.
|
protected |
a custom extension for the dynamic or static library (e.g. ".so.1")
Definition at line 38 of file dynamic_library_processor.hpp.
Referenced by CppAD::cg::DynamicModelLibraryProcessor< Base >::createDynamicLibrary(), and CppAD::cg::DynamicModelLibraryProcessor< Base >::createStaticLibrary().
|
protected |
the path of the dynamic or static library to be created
Definition at line 34 of file dynamic_library_processor.hpp.
Referenced by CppAD::cg::DynamicModelLibraryProcessor< Base >::createDynamicLibrary(), CppAD::cg::DynamicModelLibraryProcessor< Base >::createStaticLibrary(), and CppAD::cg::DynamicModelLibraryProcessor< Base >::getLibraryName().
|
protected |
System dependent custom options
Definition at line 42 of file dynamic_library_processor.hpp.
Referenced by CppAD::cg::DynamicModelLibraryProcessor< Base >::getOptions().