Spaces:
Runtime error
Runtime error
Give me a cuda code that does level 3 operation
#2
by
mishig
- 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" __.