Spaces:
Runtime error
Runtime error
Give me a cuda code that does level 3 operation
#2
by
mishig
HF staff
- opened
Question:
Give me a cuda code that does level 3 operation
Answer:
There are a few things that you will need to do to make your CUDA code work.
-
Add
extern "C" {}
to the top of your file. -
Add
extern "C" __device__
to the top of any CUDA functions. -
Use
extern "C" _
instead ofextern "C" __
for any C variables. -
Use
extern "C" _
instead ofextern "C" __
for any C++ variables. -
When using C++ in a CUDA kernel, always use
extern "C" _
instead ofextern "C" __
. -
Use
extern "C" _
instead ofextern "C" __
for any C++ methods. -
If you want to use
extern "C" __
, useextern "C" __
instead ofextern "C" _
. -
Always use
extern "C" _
instead ofextern "C" __
forextern "C" __
.