Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ORNL Quantum Computing Institute
xacc
Commits
861381e9
Commit
861381e9
authored
May 15, 2020
by
Mccaskey, Alex
Browse files
updating __qpu__ macro to contain annotation attribute
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
77efa7d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
xacc/compiler/qalloc.cpp
View file @
861381e9
...
...
@@ -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
();
...
...
xacc/compiler/qalloc.hpp
View file @
861381e9
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment