15#ifndef ETISS_INCLUDE_ETISS_H_
16#define ETISS_INCLUDE_ETISS_H_
81std::shared_ptr<JIT>
getJIT(std::string name,
82 std::map<std::string, std::string>
options = std::map<std::string, std::string>());
94std::shared_ptr<CPUArch>
getCPUArch(std::string name,
95 std::map<std::string, std::string>
options = std::map<std::string, std::string>());
107std::shared_ptr<Plugin>
getPlugin(std::string name,
108 std::map<std::string, std::string>
options = std::map<std::string, std::string>());
126bool loadLibrary(std::string path, std::string name);
139void addLibrary(std::shared_ptr<etiss::LibraryInterface> libInterface);
167void initialize(std::vector<std::string> &args);
198 std::string & )>
const &fcustom_action);
248 template <
typename T,
typename... lisT>
249 void toList(std::vector<std::string> &vec, T t, lisT... args)
258 inline void toList(std::vector<std::string> &vec) {}
262 void loadIni(std::list<std::string> *files);
275 template <
typename T,
typename... lisT>
278 static_assert(!std::is_arithmetic<T>::value,
"This implementation of the Initializer constructor does not take "
279 "integral variables as first variadic parameter");
295 void loadIniJIT(std::shared_ptr<etiss::CPUCore> cpu);
312 template <
typename argvT,
typename... lisT>
317 static_assert(std::is_same<const char, argvT>::value || std::is_same<char, argvT>::value,
318 "argv must be of type const char or char");
319 std::vector<std::string> args;
320 for (
int i = 1; i < argc; i++)
322 args.push_back(std::string(argv[i]));
324 toList(args, args_append...);
328 Initializer(std::list<std::string> *files,
int argc,
const char *argv[])
330 std::vector<std::string> args;
331 for (
int i = 1; i < argc; i++)
333 args.push_back(std::string(argv[i]));
352 template <
typename... listT>
358 std::vector<std::string> argv;
380 template <
typename argvT,
typename... lisT>
381 Initializer(std::list<std::string> *files,
int argc, argvT **argv, lisT... args_append)
385 static_assert(std::is_same<const char, argvT>::value || std::is_same<char, argvT>::value,
386 "argv must be of type const char or char");
387 std::vector<std::string> args;
388 for (
int i = 1; i < argc; i++)
390 args.push_back(std::string(argv[i]));
392 toList(args, args_append...);
412 template <
typename... listT>
418 std::vector<std::string> argv;
438std::string
errorMessage(etiss::int32 code, CPUArch *arch = 0);
469void run(std::function<
void(
void)> func);
470void 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
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.
void initialize_virtualstruct(std::shared_ptr< etiss::CPUCore > cpu_core)
Initialize and configure etiss::VirtualStruct root with etiss::CPUCore cpu_core.
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)
std::string toString(const T &val)
conversion of type T to std::string.