G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsJITCompilerConfig Struct Reference

Detailed Description

Struct definig a compiler configuration.

This class defines a compiler configuration that is used by the gsJITCompiler class to perform just-in-time compilation.

Public Member Functions

virtual const std::string & getCmd () const
 Return compiler command.
 
virtual const std::string & getFlags () const
 Return compiler flags.
 
virtual const std::string & getLang () const
 Return compiler language.
 
virtual const std::string & getOut () const
 Return compiler output flag.
 
virtual const std::string & getTemp () const
 Return compiler temporal directory.
 
 gsJITCompilerConfig ()
 Constructor (default)
 
 gsJITCompilerConfig (const std::string &cmd, const std::string &flags, const std::string &lang, const std::string &out, const std::string &temp=detectTemp())
 Constructor (passing arguments as strings)
 
void load (const std::string filename, const int _lang=gsJITLang::CXX)
 Reads compiler configuration from XML file by language.
 
void load_id (const std::string filename, const int id)
 Reads compiler configuration from XML file by ID.
 
gsJITCompilerConfigoperator= (gsJITCompilerConfig other)
 Assignment operator.
 
std::ostream & print (std::ostream &os) const
 Prints the object as a string.
 
void setCmd (const std::string &_cmd)
 Set compiler command.
 
void setFlags (const std::string &_flags)
 Set compiler flags.
 
void setLang (const std::string &_lang)
 Set compiler language.
 
void setOut (const std::string &_out)
 Set compiler output flag.
 
void setTemp (const std::string &_temp)
 Set compiler temporal directory.
 

Static Public Member Functions

static gsJITCompilerConfig clang (const int lang=gsJITLang::CXX)
 Initialize to default Clang compiler.
 
static gsJITCompilerConfig gcc (const int lang=gsJITLang::CXX)
 Initialize to default GCC compiler.
 
static gsJITCompilerConfig guess ()
 Try to initialize compiler automatically based on the context.
 
static gsJITCompilerConfig intel (const int lang=gsJITLang::CXX)
 Initialize to default Intel compiler.
 
static gsJITCompilerConfig msvc (const int lang=gsJITLang::CXX)
 Initialize to default Microsoft Visual Studio compiler.
 
static gsJITCompilerConfig nvcc (const int lang=gsJITLang::CUDA)
 Initialize to default NVIDIA nvcc compiler.
 
static gsJITCompilerConfig pgi (const int lang=gsJITLang::CXX)
 Initialize to default PGI compiler.
 
static gsJITCompilerConfig sunstudio (const int lang=gsJITLang::CXX)
 Initialize to default Oracle/SunStudio compiler.
 

Protected Attributes

std::string cmd
 Members variables.
 

Static Private Member Functions

static std::string detectTemp ()
 Auto-detect temp directory.