CppADCodeGen  HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
CppAD::cg::LlvmModelLibraryProcessor< Base > Class Template Reference
Inheritance diagram for CppAD::cg::LlvmModelLibraryProcessor< Base >:
Inheritance graph
Collaboration diagram for CppAD::cg::LlvmModelLibraryProcessor< Base >:
Collaboration graph

Public Member Functions

 LlvmModelLibraryProcessor (ModelLibraryCSourceGen< Base > &librarySourceGen)
 
 LlvmModelLibraryProcessor (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
const std::string & getVersion () const
 
void setIncludePaths (const std::vector< std::string > &includePaths)
 
const std::vector< std::string > & getIncludePaths () const
 
std::unique_ptr< LlvmModelLibrary< Base > > create ()
 
 LlvmModelLibraryProcessor (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
const std::string & getVersion () const
 
void setIncludePaths (const std::vector< std::string > &includePaths)
 
const std::vector< std::string > & getIncludePaths () const
 
std::unique_ptr< LlvmModelLibrary< Base > > create ()
 
std::unique_ptr< LlvmModelLibrary< Base > > create (ClangCompiler< Base > &clang)
 
 LlvmModelLibraryProcessor (ModelLibraryCSourceGen< Base > &librarySourceGen)
 
const std::string & getVersion () const
 
void setIncludePaths (const std::vector< std::string > &includePaths)
 
const std::vector< std::string > & getIncludePaths () const
 
std::unique_ptr< LlvmModelLibrary< Base > > create ()
 
std::unique_ptr< LlvmModelLibrary< Base > > create (ClangCompiler< Base > &clang)
 
 LlvmModelLibraryProcessor (ModelLibraryCSourceGen< Base > &librarySourceGen)
 
const std::string & getVersion () const
 
void setIncludePaths (const std::vector< std::string > &includePaths)
 
const std::vector< std::string > & getIncludePaths () const
 
std::unique_ptr< LlvmModelLibrary< Base > > create ()
 
std::unique_ptr< LlvmModelLibrary< Base > > create (ClangCompiler< Base > &clang)
 
 LlvmModelLibraryProcessor (ModelLibraryCSourceGen< Base > &librarySourceGen)
 
const std::string & getVersion () const
 
void setIncludePaths (const std::vector< std::string > &includePaths)
 
const std::vector< std::string > & getIncludePaths () const
 
std::unique_ptr< LlvmModelLibrary< Base > > create ()
 
std::unique_ptr< LlvmModelLibrary< Base > > create (ClangCompiler< Base > &clang)
 
 LlvmModelLibraryProcessor (ModelLibraryCSourceGen< Base > &librarySourceGen)
 
 LlvmModelLibraryProcessor (ModelLibraryCSourceGen< Base > &librarySourceGen)
 
 LlvmModelLibraryProcessor (ModelLibraryCSourceGen< Base > &librarySourceGen)
 
 LlvmModelLibraryProcessor (ModelLibraryCSourceGen< Base > &librarySourceGen)
 
 LlvmModelLibraryProcessor (ModelLibraryCSourceGen< Base > &librarySourceGen)
 

Static Public Member Functions

static std::unique_ptr< LlvmModelLibrary< Base > > create (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
static std::unique_ptr< LlvmModelLibrary< Base > > create (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
static std::unique_ptr< LlvmModelLibrary< Base > > create (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
static std::unique_ptr< LlvmModelLibrary< Base > > create (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
static std::unique_ptr< LlvmModelLibrary< Base > > create (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
static std::unique_ptr< LlvmModelLibrary< Base > > create (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
static std::unique_ptr< LlvmModelLibrary< Base > > create (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
static std::unique_ptr< LlvmModelLibrary< Base > > create (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
static std::unique_ptr< LlvmModelLibrary< Base > > create (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
static std::unique_ptr< LlvmModelLibrary< Base > > create (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 
static std::unique_ptr< LlvmModelLibrary< Base > > create (ModelLibraryCSourceGen< Base > &modelLibraryHelper)
 

Protected Member Functions

virtual void createLlvmModules (const std::map< std::string, std::string > &sources)
 
virtual void createLlvmModule (const std::string &filename, const std::string &source)
 
llvm::Module * mergeModules (const std::vector< llvm::Module *> &modules)
 
virtual void createLlvmModules (const std::map< std::string, std::string > &sources)
 
virtual void createLlvmModule (const std::string &filename, const std::string &source)
 
virtual void createLlvmModules (const std::map< std::string, std::string > &sources)
 
virtual void createLlvmModule (const std::string &filename, const std::string &source)
 
virtual void createLlvmModules (const std::map< std::string, std::string > &sources)
 
virtual void createLlvmModule (const std::string &filename, const std::string &source)
 
const std::set< std::string > & createBitCode (ClangCompiler< Base > &clang, const std::string &version)
 
const std::map< std::string, std::string > & getLibrarySources ()
 
const std::map< std::string, std::string > & getSources (ModelCSourceGen< Base > &model)
 
const std::set< std::string > & createBitCode (ClangCompiler< Base > &clang, const std::string &version)
 
const std::map< std::string, std::string > & getLibrarySources ()
 
const std::map< std::string, std::string > & getSources (ModelCSourceGen< Base > &model)
 

Static Protected Member Functions

static std::string findInternalClangCHeaders (const std::string &version, const std::string &resourceDir)
 
static std::string findInternalClangCHeaders (const std::string &version, const std::string &resourceDir)
 

Protected Attributes

const std::string _version
 
std::vector< std::string > _includePaths
 
std::unique_ptr< llvm::Linker > _linker
 
std::unique_ptr< llvm::LLVMContext > _context
 
std::shared_ptr< llvm::LLVMContext > _context
 
std::unique_ptr< llvm::Module > _module
 
ModelLibraryCSourceGen< Base > * modelLibraryHelper_
 
ModelLibraryCSourceGen< Base > * modelLibraryHelper_
 

Detailed Description

template<class Base>
class CppAD::cg::LlvmModelLibraryProcessor< Base >

Useful class for generating a JIT evaluated model library (LLVM 10.0).

Author
Joao Leal

Useful class for generating a JIT evaluated model library.

Author
Joao Leal

Useful class for generating a JIT evaluated model library (LLVM 6.0).

Author
Joao Leal

Useful class for generating a JIT evaluated model library (LLVM 7.0).

Author
Joao Leal

Useful class for generating a JIT evaluated model library (LLVM 8.0).

Author
Joao Leal

Useful class for generating a JIT evaluated model library (LLVM 9.0).

Author
Joao Leal

Definition at line 29 of file llvm_model_library_processor.hpp.

Constructor & Destructor Documentation

◆ LlvmModelLibraryProcessor() [1/11]

template<class Base>
CppAD::cg::LlvmModelLibraryProcessor< Base >::LlvmModelLibraryProcessor ( ModelLibraryCSourceGen< Base > &  librarySourceGen)
inline

Creates a LLVM model library processor.

Parameters
librarySourceGen

Definition at line 37 of file llvm_model_library_processor.hpp.

◆ LlvmModelLibraryProcessor() [2/11]

template<class Base>
CppAD::cg::LlvmModelLibraryProcessor< Base >::LlvmModelLibraryProcessor ( ModelLibraryCSourceGen< Base > &  modelLibraryHelper)
inline
Parameters
modelLibraryHelper

Definition at line 42 of file llvm_model_library_processor.hpp.

◆ LlvmModelLibraryProcessor() [3/11]

template<class Base>
CppAD::cg::LlvmModelLibraryProcessor< Base >::LlvmModelLibraryProcessor ( ModelLibraryCSourceGen< Base > &  modelLibraryHelper)
inline
Parameters
modelLibraryHelper

Definition at line 42 of file llvm_model_library_processor.hpp.

◆ LlvmModelLibraryProcessor() [4/11]

template<class Base>
CppAD::cg::LlvmModelLibraryProcessor< Base >::LlvmModelLibraryProcessor ( ModelLibraryCSourceGen< Base > &  librarySourceGen)
inline
Parameters
librarySourceGen

Definition at line 43 of file llvm_model_library_processor.hpp.

◆ LlvmModelLibraryProcessor() [5/11]

template<class Base>
CppAD::cg::LlvmModelLibraryProcessor< Base >::LlvmModelLibraryProcessor ( ModelLibraryCSourceGen< Base > &  librarySourceGen)
inline

Creates a LLVM model library processor.

Parameters
librarySourceGen

Definition at line 44 of file llvm_model_library_processor.hpp.

◆ LlvmModelLibraryProcessor() [6/11]

template<class Base>
CppAD::cg::LlvmModelLibraryProcessor< Base >::LlvmModelLibraryProcessor ( ModelLibraryCSourceGen< Base > &  librarySourceGen)
inline

Creates a LLVM model library processor.

Parameters
librarySourceGen

Definition at line 44 of file llvm_model_library_processor.hpp.

◆ LlvmModelLibraryProcessor() [7/11]

template<class Base>
CppAD::cg::LlvmModelLibraryProcessor< Base >::LlvmModelLibraryProcessor ( ModelLibraryCSourceGen< Base > &  librarySourceGen)
inline

Creates a LLVM model library processor.

Parameters
librarySourceGen

Definition at line 38 of file llvm_model_library_processor.hpp.

◆ LlvmModelLibraryProcessor() [8/11]

template<class Base>
CppAD::cg::LlvmModelLibraryProcessor< Base >::LlvmModelLibraryProcessor ( ModelLibraryCSourceGen< Base > &  librarySourceGen)
inline

Creates a LLVM model library processor.

Parameters
librarySourceGen

Definition at line 37 of file llvm_model_library_processor.hpp.

◆ LlvmModelLibraryProcessor() [9/11]

template<class Base>
CppAD::cg::LlvmModelLibraryProcessor< Base >::LlvmModelLibraryProcessor ( ModelLibraryCSourceGen< Base > &  librarySourceGen)
inline

Creates a LLVM model library processor.

Parameters
librarySourceGen

Definition at line 37 of file llvm_model_library_processor.hpp.

◆ LlvmModelLibraryProcessor() [10/11]

template<class Base>
CppAD::cg::LlvmModelLibraryProcessor< Base >::LlvmModelLibraryProcessor ( ModelLibraryCSourceGen< Base > &  librarySourceGen)
inline

Creates a LLVM model library processor.

Parameters
librarySourceGen

Definition at line 37 of file llvm_model_library_processor.hpp.

◆ LlvmModelLibraryProcessor() [11/11]

template<class Base>
CppAD::cg::LlvmModelLibraryProcessor< Base >::LlvmModelLibraryProcessor ( ModelLibraryCSourceGen< Base > &  librarySourceGen)
inline

Creates a LLVM model library processor.

Parameters
librarySourceGen

Definition at line 37 of file llvm_model_library_processor.hpp.

Member Function Documentation

◆ create() [1/7]

template<class Base>
std::unique_ptr<LlvmModelLibrary<Base> > CppAD::cg::LlvmModelLibraryProcessor< Base >::create ( ClangCompiler< Base > &  clang)
inline

generate bit code

Load bit code and create a single module

Definition at line 69 of file llvm_model_library_processor.hpp.

◆ create() [2/7]

template<class Base>
std::unique_ptr<LlvmModelLibrary<Base> > CppAD::cg::LlvmModelLibraryProcessor< Base >::create ( )
inline
Returns
a model library

Definition at line 75 of file llvm_model_library_processor.hpp.

◆ create() [3/7]

template<class Base>
std::unique_ptr<LlvmModelLibrary<Base> > CppAD::cg::LlvmModelLibraryProcessor< Base >::create ( )
inline
Returns
a model library

Definition at line 76 of file llvm_model_library_processor.hpp.

◆ create() [4/7]

template<class Base>
std::unique_ptr<LlvmModelLibrary<Base> > CppAD::cg::LlvmModelLibraryProcessor< Base >::create ( )
inline
Returns
a model library

Definition at line 77 of file llvm_model_library_processor.hpp.

◆ create() [5/7]

template<class Base>
std::unique_ptr<LlvmModelLibrary<Base> > CppAD::cg::LlvmModelLibraryProcessor< Base >::create ( ClangCompiler< Base > &  clang)
inline
Parameters
clangthe external compiler
Returns
a model library

generate bit code

Load bit code and create a single module

Definition at line 115 of file llvm_model_library_processor.hpp.

◆ create() [6/7]

template<class Base>
std::unique_ptr<LlvmModelLibrary<Base> > CppAD::cg::LlvmModelLibraryProcessor< Base >::create ( ClangCompiler< Base > &  clang)
inline

Creates a LLVM model library using an external Clang compiler to generate the bitcode.

Parameters
clangthe external compiler
Returns
a model library

generate bit code

Load bit code and create a single module

Definition at line 119 of file llvm_model_library_processor.hpp.

◆ create() [7/7]

template<class Base>
std::unique_ptr<LlvmModelLibrary<Base> > CppAD::cg::LlvmModelLibraryProcessor< Base >::create ( ClangCompiler< Base > &  clang)
inline
Parameters
clangthe external compiler
Returns
a model library

generate bit code

Load bit code and create a single module

Definition at line 135 of file llvm_model_library_processor.hpp.

◆ createBitCode() [1/2]

template<class Base >
const std::set<std::string>& CppAD::cg::LlvmBaseModelLibraryProcessor< Base >::createBitCode ( ClangCompiler< Base > &  clang,
const std::string &  version 
)
inlineprotectedinherited

◆ createBitCode() [2/2]

template<class Base >
const std::set<std::string>& CppAD::cg::LlvmBaseModelLibraryProcessor< Base >::createBitCode ( ClangCompiler< Base > &  clang,
const std::string &  version 
)
inlineprotectedinherited

◆ getIncludePaths() [1/3]

template<class Base>
const std::vector<std::string>& CppAD::cg::LlvmModelLibraryProcessor< Base >::getIncludePaths ( ) const
inline

User defined header paths.

Definition at line 67 of file llvm_model_library_processor.hpp.

◆ getIncludePaths() [2/3]

template<class Base>
const std::vector<std::string>& CppAD::cg::LlvmModelLibraryProcessor< Base >::getIncludePaths ( ) const
inline

User defined header paths.

Definition at line 68 of file llvm_model_library_processor.hpp.

◆ getIncludePaths() [3/3]

template<class Base>
const std::vector<std::string>& CppAD::cg::LlvmModelLibraryProcessor< Base >::getIncludePaths ( ) const
inline

User defined header paths.

Definition at line 69 of file llvm_model_library_processor.hpp.

◆ getVersion() [1/5]

template<class Base>
const std::string& CppAD::cg::LlvmModelLibraryProcessor< Base >::getVersion ( ) const
inline
Returns
The version of LLVM (and Clang).

Definition at line 52 of file llvm_model_library_processor.hpp.

◆ getVersion() [2/5]

template<class Base>
const std::string& CppAD::cg::LlvmModelLibraryProcessor< Base >::getVersion ( ) const
inline
Returns
The version of LLVM (and Clang).

Definition at line 52 of file llvm_model_library_processor.hpp.

◆ getVersion() [3/5]

template<class Base>
const std::string& CppAD::cg::LlvmModelLibraryProcessor< Base >::getVersion ( ) const
inline
Returns
The version of LLVM (and Clang).

Definition at line 53 of file llvm_model_library_processor.hpp.

◆ getVersion() [4/5]

template<class Base>
const std::string& CppAD::cg::LlvmModelLibraryProcessor< Base >::getVersion ( ) const
inline
Returns
The version of LLVM (and Clang).

Definition at line 54 of file llvm_model_library_processor.hpp.

◆ getVersion() [5/5]

template<class Base>
const std::string& CppAD::cg::LlvmModelLibraryProcessor< Base >::getVersion ( ) const
inline
Returns
The version of LLVM (and Clang).

Definition at line 54 of file llvm_model_library_processor.hpp.

◆ setIncludePaths() [1/3]

template<class Base>
void CppAD::cg::LlvmModelLibraryProcessor< Base >::setIncludePaths ( const std::vector< std::string > &  includePaths)
inline

Define additional header paths.

Definition at line 60 of file llvm_model_library_processor.hpp.

◆ setIncludePaths() [2/3]

template<class Base>
void CppAD::cg::LlvmModelLibraryProcessor< Base >::setIncludePaths ( const std::vector< std::string > &  includePaths)
inline

Define additional header paths.

Definition at line 61 of file llvm_model_library_processor.hpp.

◆ setIncludePaths() [3/3]

template<class Base>
void CppAD::cg::LlvmModelLibraryProcessor< Base >::setIncludePaths ( const std::vector< std::string > &  includePaths)
inline

Define additional header paths.

Definition at line 62 of file llvm_model_library_processor.hpp.


The documentation for this class was generated from the following file: