ldg only for sm >= 35 (#516)
This PR fixes compile issues with CUDA sm_30. See #511
This commit is contained in:
parent
436e09cba2
commit
bcccb117ef
@ -694,7 +694,11 @@ template <typename T>
|
||||
static __device__ __forceinline__
|
||||
T read_only_load( const T *ptr )
|
||||
{
|
||||
#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 350
|
||||
return __ldg( ptr );
|
||||
#else
|
||||
return *ptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* exclusive prefix scan */
|
||||
|
||||
@ -637,7 +637,11 @@ template <typename T>
|
||||
static __device__ __forceinline__
|
||||
T read_only_load( const T *ptr )
|
||||
{
|
||||
#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 350
|
||||
return __ldg( ptr );
|
||||
#else
|
||||
return *ptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* exclusive prefix scan */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user