Skip to content

Commit

Permalink
Ifdef out pycuda helpers header on CUDA 12
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Jul 23, 2024
1 parent 2a276c4 commit 00dd51a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pycuda/cuda/pycuda-helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ extern "C++" {
typedef uint2 fp_tex_cfloat;
typedef int4 fp_tex_cdouble;

#if __CUDACC_VER_MAJOR__ < 12
template <enum cudaTextureReadMode read_mode>
__device__ pycuda::complex<float> fp_tex1Dfetch(texture<fp_tex_cfloat, 1, read_mode> tex, int i)
{
Expand Down Expand Up @@ -244,6 +245,7 @@ extern "C++" {
PYCUDA_GENERATE_FP_TEX_FUNCS(unsigned short int)
PYCUDA_GENERATE_FP_TEX_FUNCS(char)
PYCUDA_GENERATE_FP_TEX_FUNCS(unsigned char)
#endif
}

#endif

0 comments on commit 00dd51a

Please sign in to comment.