XACC
xasm_compiler.hpp
1 /*******************************************************************************
2  * Copyright (c) 2019 UT-Battelle, LLC.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * and Eclipse Distribution License v1.0 which accompanies this
6  * distribution. The Eclipse Public License is available at
7  * http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution
8  *License is available at https://eclipse.org/org/documents/edl-v10.php
9  *
10  * Contributors:
11  * Alexander J. McCaskey - initial API and implementation
12  *******************************************************************************/
13 #ifndef XACC_XASMCOMPILER_HPP
14 #define XACC_XASMCOMPILER_HPP
15 
16 #include "Compiler.hpp"
17 
18 namespace xacc {
19 
20 
21 class XASMCompiler : public xacc::Compiler {
22 public:
23  XASMCompiler();
24 
25  std::shared_ptr<xacc::IR> compile(const std::string &src,
26  std::shared_ptr<Accelerator> acc) override;
27 
28  std::shared_ptr<xacc::IR> compile(const std::string &src) override;
29  bool canParse(const std::string& src) override;
30 
31  const std::string translate(std::shared_ptr<CompositeInstruction> function) override;
32  std::vector<std::string> getKernelBufferNames(const std::string& src) override;
33 
34 
35  const std::string name() const override { return "xasm"; }
36 
37  const std::string description() const override {
38  return "The XASM Compiler compiles kernels written in the XACC assembly language.";
39  }
40 
44  virtual ~XASMCompiler() {}
45 };
46 
47 
48 } // namespace xacc
49 #endif
virtual ~XASMCompiler()
Definition: xasm_compiler.hpp:44
Definition: Accelerator.hpp:25
const std::string description() const override
Definition: xasm_compiler.hpp:37
Definition: xasm_compiler.hpp:21
Definition: Compiler.hpp:24
const std::string name() const override
Definition: xasm_compiler.hpp:35