g-truc / glm

OpenGL Mathematics (GLM)
https://glm.g-truc.net
Other
9.1k stars 2.12k forks source link

Make HIP compatible #1209

Closed niansa closed 8 months ago

niansa commented 8 months ago

Currently, using glm in HIP is quite hacky:

#include <hip/hip_runtime.h>
#include <glm/detail/setup.hpp>
#undef GLM_CUDA_FUNC_DEF
#undef GLM_CUDA_FUNC_DECL
#define GLM_CUDA_FUNC_DEF __device__ __host__
#define GLM_CUDA_FUNC_DECL __device__ __host__
#include <glm/glm.hpp>

It'd be nice if there'd be a cleaner (or even auto detected) way to do this!

christophe-lunarg commented 8 months ago

Please make a PR if you want this to happen.

Thanks!

niansa commented 8 months ago

Mh, my bad. I should've checked the master branch before opening this issue. It's already been implemented and working as intended!

niansa commented 8 months ago

Happy new years eve either way! :-)