Sign in
llvm
/
llvm-project
/
5c49c5fa5678dffdaa7e6c19b83e52a5b89cfbc2
/
.
/
offload
/
unittests
/
OffloadAPI
/
device_code
/
composite.cpp
blob: db0b7a6439df29453716a8b9bd01a4ba18b809aa [
file
]
#include
<gpuintrin.h>
struct
Foo
{
uint32_t
a
;
uint32_t
b
;
};
extern
"C"
__gpu_kernel
void
composite
(
uint8_t
N
,
Foo
F
,
uint32_t
*
Out
)
{
Out
[
__gpu_thread_id
(
0
)]
=
N
+
F
.
a
+
F
.
b
+
__gpu_thread_id
(
0
);
}