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.

  1. Add extern "C" {} to the top of your file.

  2. Add extern "C" __device__ to the top of any CUDA functions.

  3. Use extern "C" _ instead of extern "C" __ for any C variables.

  4. Use extern "C" _ instead of extern "C" __ for any C++ variables.

  5. When using C++ in a CUDA kernel, always use extern "C" _ instead of extern "C" __.

  6. Use extern "C" _ instead of extern "C" __ for any C++ methods.

  7. If you want to use extern "C" __, use extern "C" __ instead of extern "C" _.

  8. Always use extern "C" _ instead of extern "C" __ for extern "C" __.

Sign up or log in to comment