G+Smo  23.12.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsJITCompiler Class Reference

Detailed Description

Class defining a just-in-time compiler.

This class compiles source code at runtime and links it to the running binary. This mechanism makes it possible to generate source code based on user-defined run-time parameters and still perform compile-time optimization.

+ Collaboration diagram for gsJITCompiler:

Public Member Functions

gsDynamicLibrary build (bool force=false)
 
gsDynamicLibrary build (const std::string &name, bool force=false)
 
void clear ()
 Clear kernel source code.
 
const std::ostringstream & getKernel () const
 Return kernel source code (as output stringstream)
 
std::ostringstream & getKernel ()
 Return pointer to kernel source code.
 
 gsJITCompiler ()
 Constructor (default)
 
 gsJITCompiler (gsJITCompiler const &other)
 Constructor (copy)
 
 gsJITCompiler (const gsJITCompilerConfig &config)
 Constructor (using compiler configuration)
 
gsJITCompileroperator<< (const std::string &s)
 Input kernel source code from string.
 
gsJITCompileroperator<< (std::istream &is)
 Input kernel source code from input stream.
 
gsJITCompileroperator= (gsJITCompiler const &other)
 Assignment operator (copy)
 
std::ostream & print (std::ostream &os) const
 Prints the object as a string.
 

Private Attributes

gsJITCompilerConfig config
 Compiler configuration.
 
std::ostringstream kernel
 Kernel source code.
 

Member Function Documentation

gsDynamicLibrary build ( bool  force = false)
inline

Compile kernel source code into dynamic library (determine filename from hash of kernel source code)

gsDynamicLibrary build ( const std::string &  name,
bool  force = false 
)
inline

Compile kernel source code into dynamic library (use given filename)