53 #ifndef ETISS_INCLUDE_ETISS_H_
54 #define ETISS_INCLUDE_ETISS_H_
62 #include <type_traits>
123 std::shared_ptr<JIT>
getJIT(std::string name,
124 std::map<std::string, std::string>
options = std::map<std::string, std::string>());
136 std::shared_ptr<CPUArch>
getCPUArch(std::string name,
137 std::map<std::string, std::string>
options = std::map<std::string, std::string>());
149 std::shared_ptr<Plugin>
getPlugin(std::string name,
150 std::map<std::string, std::string>
options = std::map<std::string, std::string>());
168 bool loadLibrary(std::string path, std::string name);
181 void addLibrary(std::shared_ptr<etiss::LibraryInterface> libInterface);
267 template <
typename T,
typename... lisT>
268 void toList(std::vector<std::string> &vec, T t, lisT...
args)
277 inline void toList(std::vector<std::string> &vec) {}
281 void loadIni(std::list<std::string> *files);
294 template <
typename T,
typename... lisT>
297 static_assert(!std::is_arithmetic<T>::value,
"This implementation of the Initializer constructor does not take "
298 "integral variables as first variadic parameter");
314 void loadIniJIT(std::shared_ptr<etiss::CPUCore> cpu);
331 template <
typename argvT,
typename... lisT>
336 static_assert(std::is_same<const char, argvT>::value || std::is_same<char, argvT>::value,
337 "argv must be of type const char or char");
338 std::vector<std::string>
args;
339 for (
int i = 1; i < argc; i++)
341 args.push_back(std::string(argv[i]));
347 Initializer(std::list<std::string> *files,
int argc,
const char* argv[])
349 std::vector<std::string>
args;
350 for (
int i = 1; i < argc; i++)
352 args.push_back(std::string(argv[i]));
371 template <
typename... listT>
377 std::vector<std::string> argv;
399 template <
typename argvT,
typename... lisT>
400 Initializer(std::list<std::string> *files,
int argc, argvT **argv, lisT... args_append)
404 static_assert(std::is_same<const char, argvT>::value || std::is_same<char, argvT>::value,
405 "argv must be of type const char or char");
406 std::vector<std::string>
args;
407 for (
int i = 1; i < argc; i++)
409 args.push_back(std::string(argv[i]));
431 template <
typename... listT>
437 std::vector<std::string> argv;
488 void run(std::function<
void(
void)> func);
489 void runEXT(std::function<
void(
void)> func);
ETISS_PLUGIN_EXPORT etiss::CPUArch std::map< std::string, std::string > options
create new instance of the CPUArch type at index
defines main cpu core interface
#define static_assert(x, y)
class for simple library access.
general configuration and logging
__device__ __2f16 float bool s
Wrapper for the initialize and shutdown of the ETISS environment.
Initializer(std::list< std::string > *files, int argc, argvT **argv, lisT... args_append)
Constructor that initializes ETISS.
Initializer(std::list< std::string > *files, int argc, const char *argv[])
Initializer(listT... args)
Constructor that initializes ETISS.
Initializer(int argc, argvT **argv, lisT... args_append)
Constructor that initializes ETISS.
void loadIni(std::list< std::string > *files)
creates a simpleIni object which holds the data of the given .ini file.
void loadIniPlugins(std::shared_ptr< etiss::CPUCore > cpu)
loads the plugins given with the previous loaded .ini files
void toList(std::vector< std::string > &vec)
Break condition for empty argument list.
Initializer(std::list< std::string > *files, listT... args)
Constructor that initializes ETISS.
void static_assertFirstParamNotArithmetic(T t, lisT... args)
Make sure that the first variadic parameter at compiletime is no number.
void loadIniJIT(std::shared_ptr< etiss::CPUCore > cpu)
sets the JIT given with the previous loaded .ini files
~Initializer()
Destructor that shutdowns ETISS.
void static_assertFirstParamNotArithmetic()
version of static_assertFirstParamNotArithmetic for the case that no parameter is given.
void toList(std::vector< std::string > &vec, T t, lisT... args)
Add argument list to a string vector.
contains defines to configure ETISS.
std::shared_ptr< etiss::JIT > getDefaultJIT()
Get the default JIT implementation.
bool loadLibrary(std::string path, std::string name)
Load a library.
std::shared_ptr< Plugin > getPlugin(std::string name, std::map< std::string, std::string > options=std::map< std::string, std::string >())
Get a present Plugin plug-in by name.
std::string errorMessage(etiss::int32 code, CPUArch *arch=0)
Get the error message for an error code for a specific CPUArch plug-in.
std::set< std::string > listLibraryPrefixes()
Create a set with strings of the library names.
std::set< std::string > listJITs()
Create a set with all identifier names of the known JIT plug-ins.
void preloadLibraries()
Search and try to load libraries.
std::set< std::string > listPlugins()
Create a set with all identifier names of the known plug-ins.
std::shared_ptr< JIT > getJIT(std::string name, std::map< std::string, std::string > options=std::map< std::string, std::string >())
Get a present JIT plug-in by name.
std::shared_ptr< CPUArch > getCPUArch(std::string name, std::map< std::string, std::string > options=std::map< std::string, std::string >())
Get a present CPUArch plug-in by name.
void shutdown()
Shutdown ETISS.
std::set< std::string > listCPUArchs()
Create a set with all identifier names of the known CPUArch plug-ins.
void addLibrary(std::shared_ptr< etiss::LibraryInterface > libInterface)
Add a LibraryInterface to the ETISS environment.
void initialize(std::vector< std::string > &args)
Initialize and configure ETISS.
std::set< std::string > listLibraries()
Create a set with strings of the library names and some information appended in square brackets.
void forceInitialization()
Force the initialization of ETISS.
void runString(std::string s)
void run(std::function< void(void)> func)
void runEXT(std::function< void(void)> func)
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
std::string toString(const T &val)
conversion of type T to std::string.