Skip to content

Commit

Permalink
define _CCCL_NO_RTTI in device code; RTTI isn't available there (#2639
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ericniebler authored Oct 29, 2024
1 parent f140e32 commit ae2d9d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libcudacxx/include/cuda/std/__cccl/rtti.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#ifndef _CCCL_NO_RTTI
# if defined(CCCL_DISABLE_RTTI) // Escape hatch for users to manually disable RTTI
# define _CCCL_NO_RTTI
# elif defined(__CUDA_ARCH__)
# define _CCCL_NO_RTTI // No RTTI in CUDA device code
# elif defined(_CCCL_COMPILER_ICC)
# if __RTTI == 0 && __INTEL_RTTI__ == 0 && __GXX_RTTI == 0 && _CPPRTTI == 0
# define _CCCL_NO_RTTI
Expand All @@ -52,6 +54,8 @@
#ifndef _CCCL_NO_TYPEID
# if defined(CCCL_DISABLE_RTTI) // CCCL_DISABLE_RTTI disables typeid also
# define _CCCL_NO_TYPEID
# elif defined(__CUDA_ARCH__)
# define _CCCL_NO_TYPEID // No typeid in CUDA device code
# elif defined(_CCCL_COMPILER_ICC)
// when emulating MSVC, typeid is available even when RTTI is disabled
# if !defined(_MSC_VER) && __RTTI == 0 && __INTEL_RTTI__ == 0 && __GXX_RTTI == 0 && _CPPRTTI == 0
Expand Down

0 comments on commit ae2d9d2

Please sign in to comment.