mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 11:24:35 +00:00
Add defines to manually select CUDA function qualifier.
This commit is contained in:
parent
cc98465e35
commit
3b09445290
@ -424,8 +424,20 @@
|
|||||||
// Qualifiers
|
// Qualifiers
|
||||||
|
|
||||||
#if (GLM_COMPILER & GLM_COMPILER_CUDA) || (GLM_COMPILER & GLM_COMPILER_HIP)
|
#if (GLM_COMPILER & GLM_COMPILER_CUDA) || (GLM_COMPILER & GLM_COMPILER_HIP)
|
||||||
|
# if defined(GLM_CUDA_FORCE_DEVICE_FUNC) && defined(GLM_CUDA_FORCE_HOST_FUNC)
|
||||||
|
# error "GLM error: GLM_CUDA_FORCE_DEVICE_FUNC and GLM_CUDA_FORCE_HOST_FUNC should not be defined at the same time, GLM by default generates both device and host code for CUDA compiler."
|
||||||
|
# endif//defined(GLM_CUDA_FORCE_DEVICE_FUNC) && defined(GLM_CUDA_FORCE_HOST_FUNC)
|
||||||
|
|
||||||
|
# if defined(GLM_CUDA_FORCE_DEVICE_FUNC)
|
||||||
|
# define GLM_CUDA_FUNC_DEF __device__
|
||||||
|
# define GLM_CUDA_FUNC_DECL __device__
|
||||||
|
# elif defined(GLM_CUDA_FORCE_HOST_FUNC)
|
||||||
|
# define GLM_CUDA_FUNC_DEF __host__
|
||||||
|
# define GLM_CUDA_FUNC_DECL __host__
|
||||||
|
# else
|
||||||
# define GLM_CUDA_FUNC_DEF __device__ __host__
|
# define GLM_CUDA_FUNC_DEF __device__ __host__
|
||||||
# define GLM_CUDA_FUNC_DECL __device__ __host__
|
# define GLM_CUDA_FUNC_DECL __device__ __host__
|
||||||
|
# endif//defined(GLM_CUDA_FORCE_XXXX_FUNC)
|
||||||
#else
|
#else
|
||||||
# define GLM_CUDA_FUNC_DEF
|
# define GLM_CUDA_FUNC_DEF
|
||||||
# define GLM_CUDA_FUNC_DECL
|
# define GLM_CUDA_FUNC_DECL
|
||||||
|
Loading…
Reference in New Issue
Block a user