List of all members | Public Member Functions | Static Public Member Functions
casadi::Importer Class Reference

Importer. More...

#include <importer.hpp>

Detailed Description

Just-in-time compilation of code

General information

List of plugins

- clang

- shell

Note: some of the plugins in this list might not be available on your system. Also, there might be extra plugins available to you that are not listed here. You can obtain their documentation with Importer.doc("myextraplugin")


clang

Interface to the JIT compiler CLANG

Extra doc: https://github.com/casadi/casadi/wiki/L_21v


List of available options
IdTypeDescription
flagsOT_STRINGVECTORCompile flags for the JIT compiler. Default: None
include_pathOT_STRINGInclude paths for the JIT compiler. The include directory shipped with CasADi will be automatically appended.

shell

Interface to the JIT compiler SHELL

Extra doc: https://github.com/casadi/casadi/wiki/L_22w


List of available options
IdTypeDescription
cleanupOT_BOOLCleanup temporary files when unloading. Default: true
compilerOT_STRINGCompiler command
compiler_flagsOT_STRINGVECTORAlias for 'compiler_flags'
compiler_output_flagOT_STRINGCompiler flag to denote object output. Default: '-o '
compiler_setupOT_STRINGCompiler setup command. Intended to be fixed. The 'flag' option is the prefered way to set custom flags.
directoryOT_STRINGDirectory to put temporary objects in. Must end with a file separator.
extra_suffixesOT_STRINGVECTORList of suffixes for extra files that the compiler may generate. Default: None
flagsOT_STRINGVECTORCompile flags for the JIT compiler. Default: None
linkerOT_STRINGLinker command
linker_flagsOT_STRINGVECTORLinker flags for the JIT compiler. Default: None
linker_output_flagOT_STRINGLinker flag to denote shared library output. Default: '-o '
linker_setupOT_STRINGLinker setup command. Intended to be fixed. The 'flag' option is the prefered way to set custom flags.
nameOT_STRINGThe file name used to write out compiled objects/libraries. The actual file names used depend on 'temp_suffix' and include extensions. Default: 'tmp_casadi_compiler_shell'
temp_suffixOT_BOOLUse a temporary (seemingly random) filename suffix for file names. This is desired for thread-safety. This behaviour may defeat caching compiler wrappers. Default: true
Author
Joris Gillis
Date
2015

Extra doc: https://github.com/casadi/casadi/wiki/L_161

Definition at line 84 of file importer.hpp.

Inheritance diagram for casadi::Importer:
Inheritance graph
[legend]

Public Member Functions

 Importer ()
 Default constructor. More...
 
 Importer (const std::string &name, const std::string &compiler, const Dict &opts=Dict())
 Importer factory. More...
 
ImporterInternal * operator-> ()
 Access functions of the node. More...
 
const ImporterInternal * operator-> () const
 
std::string plugin_name () const
 Query plugin name. More...
 
bool has_function (const std::string &symname) const
 
bool has_meta (const std::string &cmd, casadi_int ind=-1) const
 Does a meta entry exist? More...
 
std::string get_meta (const std::string &cmd, casadi_int ind=-1) const
 Get entry as a text. More...
 
bool inlined (const std::string &symname) const
 Check if a function is inlined. More...
 
std::string body (const std::string &symname) const
 Get the function body, if inlined. More...
 
std::string library () const
 Get library name. More...
 
void serialize (SerializingStream &s) const
 Serialize an object. More...
 
std::string class_name () const
 Get class name. More...
 
void disp (std::ostream &stream, bool more=false) const
 Print a description of the object. More...
 
std::string get_str (bool more=false) const
 Get string representation. More...
 
bool is_null () const
 Is a null pointer? More...
 
casadi_int __hash__ () const
 Returns a number that is unique for a given Node. More...
 

Static Public Member Functions

static std::string type_name ()
 Get type name. More...
 
static bool test_cast (const SharedObjectInternal *ptr)
 Check if a particular cast is allowed. More...
 
static bool has_plugin (const std::string &name)
 Check if a plugin is available. More...
 
static void load_plugin (const std::string &name)
 Explicitly load a plugin dynamically. More...
 
static std::string doc (const std::string &name)
 Get solver specific documentation. More...
 
static Importer deserialize (DeserializingStream &s)
 Deserialize with type disambiguation. More...
 

Constructor & Destructor Documentation

◆ Importer() [1/2]

casadi::Importer::Importer ( )

◆ Importer() [2/2]

casadi::Importer::Importer ( const std::string &  name,
const std::string &  compiler,
const Dict opts = Dict() 
)
explicit

Member Function Documentation

◆ __hash__()

casadi_int casadi::SharedObject::__hash__ ( ) const
inherited

If the Object does not point to any node, "0" is returned.

Extra doc: https://github.com/casadi/casadi/wiki/L_av

◆ body()

std::string casadi::Importer::body ( const std::string &  symname) const

◆ class_name()

std::string casadi::SharedObject::class_name ( ) const
inherited

◆ deserialize()

static Importer casadi::Importer::deserialize ( DeserializingStream s)
static

◆ disp()

void casadi::SharedObject::disp ( std::ostream &  stream,
bool  more = false 
) const
inherited

◆ doc()

static std::string casadi::Importer::doc ( const std::string &  name)
static

◆ get_meta()

std::string casadi::Importer::get_meta ( const std::string &  cmd,
casadi_int  ind = -1 
) const

◆ get_str()

std::string casadi::SharedObject::get_str ( bool  more = false) const
inlineinherited

Definition at line 138 of file shared_object.hpp.

◆ has_function()

bool casadi::Importer::has_function ( const std::string &  symname) const

◆ has_meta()

bool casadi::Importer::has_meta ( const std::string &  cmd,
casadi_int  ind = -1 
) const

◆ has_plugin()

static bool casadi::Importer::has_plugin ( const std::string &  name)
static

◆ inlined()

bool casadi::Importer::inlined ( const std::string &  symname) const

◆ is_null()

bool casadi::SharedObject::is_null ( ) const
inherited

◆ library()

std::string casadi::Importer::library ( ) const

◆ load_plugin()

static void casadi::Importer::load_plugin ( const std::string &  name)
static

◆ operator->() [1/2]

ImporterInternal* casadi::Importer::operator-> ( )

◆ operator->() [2/2]

const ImporterInternal* casadi::Importer::operator-> ( ) const

◆ plugin_name()

std::string casadi::Importer::plugin_name ( ) const

◆ serialize()

void casadi::Importer::serialize ( SerializingStream s) const

◆ test_cast()

static bool casadi::Importer::test_cast ( const SharedObjectInternal *  ptr)
static

◆ type_name()

static std::string casadi::Importer::type_name ( )
inlinestatic

Extra doc: https://github.com/casadi/casadi/wiki/L_162

Definition at line 91 of file importer.hpp.


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