Commit 861381e9 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

updating __qpu__ macro to contain annotation attribute


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent 77efa7d7
......@@ -10,7 +10,7 @@ template <typename T> struct empty_delete {
qreg::qreg(const int n) { buffer = xacc::qalloc(n).get(); }
qreg::qreg(const qreg &other) : buffer(other.buffer) {}
int qreg::operator[](const int &i) { return 0; }
int qreg::operator[](const int &i) { return i; }
AcceleratorBuffer *qreg::results() { return buffer; }
std::map<std::string, int> qreg::counts() {
return buffer->getMeasurementCounts();
......
......@@ -49,6 +49,8 @@ xacc::internal_compiler::qreg qalloc(const int n) {
return xacc::internal_compiler::qreg(n);
}
#define __qpu__ [[clang::syntax(qcor)]]
// __qpu__ indicates this functions is for the QCOR Clang Syntax Handler
// and annotated with quantum for the LLVM IR CodeGen
#define __qpu__ [[clang::syntax(qcor)]] __attribute__((annotate("quantum")))
#endif
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment