13 #ifndef XACC_XACC_INTERNAL_COMPILER_HPP_ 14 #define XACC_XACC_INTERNAL_COMPILER_HPP_ 20 class CompositeInstruction;
21 class AcceleratorBuffer;
24 namespace internal_compiler {
25 extern std::shared_ptr<Accelerator> qpu;
26 extern std::shared_ptr<CompositeInstruction> lastCompiled;
27 extern bool __execute;
29 enum OptLevel { DEFAULT, LEVEL1, LEVEL2, LEVEL3 };
31 void compiler_InitializeXACC(
const char *qpu_backend =
"qpp");
32 void compiler_InitializeXACC(
const char *qpu_backend,
int shots);
34 void setAccelerator(
const char *qpu_backend);
35 void setAccelerator(
const char *qpu_backend,
int shots);
36 std::shared_ptr<Accelerator> get_qpu();
38 void __set_verbose(
bool verbose);
42 std::shared_ptr<CompositeInstruction> compile(
const char *compiler_name,
43 const char *kernel_src);
45 std::shared_ptr<CompositeInstruction> getLastCompiled();
46 std::shared_ptr<CompositeInstruction> getCompiled(
const char *kernel_name);
49 void optimize(std::shared_ptr<CompositeInstruction> program,
const OptLevel opt = DEFAULT);
53 void execute(AcceleratorBuffer *buffer, std::vector<std::shared_ptr<CompositeInstruction>> programs);
54 void execute(AcceleratorBuffer *buffer, std::shared_ptr<CompositeInstruction> program,
55 double *parameters =
nullptr);
56 void execute(AcceleratorBuffer **buffers,
const int nBuffers,
57 std::shared_ptr<CompositeInstruction> program,
double *parameters =
nullptr);
Definition: Accelerator.hpp:25