From e8923c9bca8f7d87257a9abf403db176b415b939 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 29 Oct 2014 00:42:59 +0100 Subject: [PATCH 1/2] Fixed bad matrix-vector performance in Cuda #257, #258 --- glm/detail/setup.hpp | 2 +- glm/detail/type_vec4.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 1b12d911..4e292f76 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -735,7 +735,7 @@ # define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct # define GLM_RESTRICT # define GLM_RESTRICT_VAR __restrict -#elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG) +#elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG | GLM_COMPILER_CUDA) # define GLM_DEPRECATED __attribute__((__deprecated__)) # define GLM_ALIGN(x) __attribute__((aligned(x))) # define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x))) diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 51082837..87edf3d2 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -67,7 +67,7 @@ namespace detail }//namespace detail template - struct tvec4 + GLM_ALIGNED_STRUCT(16) tvec4 { ////////////////////////////////////// // Implementation detail From 2a2cd0b8d01dd06e9270e53c88ad41f751e59a5c Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 29 Oct 2014 00:43:22 +0100 Subject: [PATCH 2/2] Fixed bad matrix-vector performance in Cuda #257, #258 --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 12c32039..c8bee000 100644 --- a/readme.txt +++ b/readme.txt @@ -76,6 +76,7 @@ GLM 0.9.6.0: 2014-XX-XX - Added GLM_FORCE_NO_CTOR_INIT - Added 'uninitialize' to explicitly not initialize a GLM type - Added not function (from GLSL specification) on VC12 +- Fixed bad matrix-vector multiple performance with Cuda #257, #258 ================================================================================ GLM 0.9.5.4: 2014-06-21