ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
LibraryInterface.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2//
3// This file is part of ETISS. It is licensed under the BSD 3-Clause License; you may not use this file except in
4// compliance with the License. You should have received a copy of the license along with this project. If not, see the
5// LICENSE file.
18#ifndef ETISS_INCLUDE_LIBRARY_H_
19#define ETISS_INCLUDE_LIBRARY_H_
20
21#include <map>
22#include <memory>
23#include <mutex>
24#include <string>
25
26#include "etiss/config.h"
27
28#define etiss_helper_merge_l2(X1, X2) X1##X2
29#define etiss_helper_merge(X1, X2) etiss_helper_merge_l2(X1, X2)
30#include "etiss/Misc.h"
31
32namespace etiss
33{
34
48{
49 private:
50 // friend void etiss::addLibrary(std::shared_ptr<etiss::LibraryInterface> interface);
51 public:
56 LibraryInterface(std::string name);
57
58 virtual ~LibraryInterface();
59
61 virtual std::string versionInfo();
62
63 virtual unsigned countPlugins();
64 virtual unsigned countCPUArchs();
65 virtual unsigned countJITs();
66
67 virtual std::string nameJIT(unsigned index);
68 virtual std::string namePlugin(unsigned index);
69 virtual std::string nameCPUArch(unsigned index);
70
71 public:
72 virtual etiss::JIT *createJIT(unsigned index,
73 std::map<std::string, std::string> options = std::map<std::string, std::string>());
75 unsigned index, std::map<std::string, std::string> options = std::map<std::string, std::string>());
77 unsigned index, std::map<std::string, std::string> options = std::map<std::string, std::string>());
78
79 virtual void deleteJIT(etiss::JIT *);
80 virtual void deleteCPUArch(etiss::CPUArch *);
81 virtual void deletePlugin(etiss::Plugin *);
82
83 public:
87 virtual bool isEmpty();
91 virtual const std::string &getName();
92
93 public:
94 static std::shared_ptr<LibraryInterface> openSharedLibrary(std::string path, std::string name);
95
96 static std::shared_ptr<LibraryInterface> openIntegratedLibrary();
97
98 static unsigned getCurrentLibraryVersion();
99
100 static void addSearchPath(const std::string &path);
101
102 private:
103 std::string name_;
104};
105
106} // namespace etiss
107
108#endif
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
the interface to translate instructions of and processor architecture
Definition CPUArch.h:116
compiler interface for just in time compilation of generated C code
Definition JIT.h:29
interface class for libraries.
virtual void deletePlugin(etiss::Plugin *)
virtual bool isEmpty()
returns true if this library provides nothing
virtual etiss::CPUArch * createCPUArch(unsigned index, std::map< std::string, std::string > options=std::map< std::string, std::string >())
virtual unsigned countPlugins()
virtual etiss::Plugin * createPlugin(unsigned index, std::map< std::string, std::string > options=std::map< std::string, std::string >())
static std::shared_ptr< LibraryInterface > openIntegratedLibrary()
virtual void deleteCPUArch(etiss::CPUArch *)
virtual std::string versionInfo()
simple version info string. intended to present information in a human readable way.
static void addSearchPath(const std::string &path)
virtual void deleteJIT(etiss::JIT *)
virtual unsigned countJITs()
static std::shared_ptr< LibraryInterface > openSharedLibrary(std::string path, std::string name)
virtual std::string nameCPUArch(unsigned index)
static unsigned getCurrentLibraryVersion()
virtual unsigned countCPUArchs()
virtual std::string namePlugin(unsigned index)
virtual std::string nameJIT(unsigned index)
virtual const std::string & getName()
virtual etiss::JIT * createJIT(unsigned index, std::map< std::string, std::string > options=std::map< std::string, std::string >())
base plugin class that provides access to different plugin functions if present
Definition Plugin.h:38
contains defines to configure ETISS.
forwards: include/jit/*
Definition Benchmark.h:17