Skip to content

Commit

Permalink
Drop Thrust legacy arch macros (#3298)
Browse files Browse the repository at this point in the history
Which were disabled and could be re-enabled using THRUST_PROVIDE_LEGACY_ARCH_MACROS
  • Loading branch information
bernhardmgruber authored Jan 9, 2025
1 parent f43dc54 commit d76eed5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
27 changes: 0 additions & 27 deletions thrust/thrust/detail/config/cpp_compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,3 @@
# define THRUST_INLINE_INTEGRAL_MEMBER_CONSTANT static constexpr

#endif

// These definitions were intended for internal use only and are now obsolete.
// If you relied on them, consider porting your code to use the functionality
// in libcu++'s <nv/target> header.
// For a temporary workaround, define THRUST_PROVIDE_LEGACY_ARCH_MACROS to make
// them available again. These should be considered deprecated and will be
// fully removed in a future version.
#ifdef THRUST_PROVIDE_LEGACY_ARCH_MACROS
# ifndef THRUST_IS_DEVICE_CODE
# if defined(_NVHPC_CUDA)
# define THRUST_IS_DEVICE_CODE __builtin_is_device_code()
# define THRUST_IS_HOST_CODE (!__builtin_is_device_code())
# define THRUST_INCLUDE_DEVICE_CODE 1
# define THRUST_INCLUDE_HOST_CODE 1
# elif defined(__CUDA_ARCH__)
# define THRUST_IS_DEVICE_CODE 1
# define THRUST_IS_HOST_CODE 0
# define THRUST_INCLUDE_DEVICE_CODE 1
# define THRUST_INCLUDE_HOST_CODE 0
# else
# define THRUST_IS_DEVICE_CODE 0
# define THRUST_IS_HOST_CODE 1
# define THRUST_INCLUDE_DEVICE_CODE 0
# define THRUST_INCLUDE_HOST_CODE 1
# endif
# endif
#endif // THRUST_PROVIDE_LEGACY_ARCH_MACROS
13 changes: 0 additions & 13 deletions thrust/thrust/system/cuda/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,6 @@
# define __THRUST_HAS_CUDART__ 0
#endif

// These definitions were intended for internal use only and are now obsolete.
// If you relied on them, consider porting your code to use the functionality
// in libcu++'s <nv/target> header.
//
// For a temporary workaround, define THRUST_PROVIDE_LEGACY_ARCH_MACROS to make
// them available again. These should be considered deprecated and will be
// fully removed in a future version.
#ifdef THRUST_PROVIDE_LEGACY_ARCH_MACROS
# ifdef __CUDA_ARCH__
# define THRUST_DEVICE_CODE
# endif // __CUDA_ARCH__
#endif // THRUST_PROVIDE_LEGACY_ARCH_MACROS

#ifdef THRUST_AGENT_ENTRY_NOINLINE
# define THRUST_AGENT_ENTRY_INLINE_ATTR __noinline__
#else
Expand Down

0 comments on commit d76eed5

Please sign in to comment.