Ver Fonte

Fixed bad matrix-vector performance in Cuda #257, #258

Christophe Riccio há 11 anos atrás
pai
commit
e8923c9bca
2 ficheiros alterados com 2 adições e 2 exclusões
  1. 1 1
      glm/detail/setup.hpp
  2. 1 1
      glm/detail/type_vec4.hpp

+ 1 - 1
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)))

+ 1 - 1
glm/detail/type_vec4.hpp

@@ -67,7 +67,7 @@ namespace detail
 }//namespace detail
 
 	template <typename T, precision P = defaultp>
-	struct tvec4
+	GLM_ALIGNED_STRUCT(16) tvec4
 	{
 		//////////////////////////////////////
 		// Implementation detail