Skip to content

Commit

Permalink
compiler output
Browse files Browse the repository at this point in the history
  • Loading branch information
alxbilger committed Dec 18, 2024
1 parent 18ff27d commit 697066a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions applications/plugins/SofaCUDA/sofa/gpu/cuda/mycuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ cudaDeviceProp mycudaDeviceProp;


#if defined(__cplusplus)

#define STRINGIFY(x) #x
#define _STR(x) STRINGIFY(x)
SOFA_PRAGMA_MESSAGE("__cplusplus value: " _STR(__cplusplus))

namespace sofa
{
namespace gpu
Expand Down Expand Up @@ -210,6 +215,11 @@ __global__ void print_cuda_standard()
int mycudaInit(int device)
{
if (cudaInitCalled) return 1;

#if defined(__cplusplus)
mycudaPrintf("C++ standard = %ld", __cplusplus);
#endif

cudaInitCalled = true;
const cudaError_t getDeviceCountError = cudaGetDeviceCount(&deviceCount);
if (getDeviceCountError != cudaSuccess)
Expand Down

0 comments on commit 697066a

Please sign in to comment.