Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Add CDP opt out mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
gevtushenko committed Oct 27, 2022
1 parent 799cc47 commit 5b06d18
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cub/detail/detect_cuda_runtime.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,17 @@ namespace detail

#ifdef DOXYGEN_SHOULD_SKIP_THIS // Only parse this during doxygen passes:

/**
* \def CUB_DISABLE_CDP
*
* If defined, support for device-side usage of CUB is disabled.
*/
#define CUB_DISABLE_CDP

/**
* \def CUB_RDC_ENABLED
*
* Defined if RDC is enabled.
* Defined if RDC is enabled and CUB_DISABLE_CDP is not defined.
*/
#define CUB_RDC_ENABLED

Expand Down Expand Up @@ -76,7 +83,7 @@ namespace detail

#ifndef CUB_RUNTIME_FUNCTION

#if defined(__CUDACC_RDC__)
#if defined(__CUDACC_RDC__) && !defined(CUB_DISABLE_CDP)

#define CUB_RDC_ENABLED
#define CUB_RUNTIME_FUNCTION __host__ __device__
Expand Down

0 comments on commit 5b06d18

Please sign in to comment.