Browse Source

Fixed CUDA 9 build #910

Christophe Riccio 6 năm trước cách đây
mục cha
commit
943529eef6
3 tập tin đã thay đổi với 6 bổ sung11 xóa
  1. 1 6
      glm/gtx/fast_square_root.inl
  2. 2 3
      glm/simd/platform.h
  3. 3 2
      readme.md

+ 1 - 6
glm/gtx/fast_square_root.inl

@@ -21,12 +21,7 @@ namespace glm
 	template<typename genType>
 	GLM_FUNC_QUALIFIER genType fastInverseSqrt(genType x)
 	{
-#		ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
-			vec<1, T, Q> tmp(detail::compute_inversesqrt<tvec1, genType, lowp, detail::is_aligned<lowp>::value>::call(vec<1, genType, lowp>(x)));
-			return tmp.x;
-#		else
-			return detail::compute_inversesqrt<1, genType, lowp, detail::is_aligned<lowp>::value>::call(vec<1, genType, lowp>(x)).x;
-#		endif
+		return detail::compute_inversesqrt<1, genType, lowp, detail::is_aligned<lowp>::value>::call(vec<1, genType, lowp>(x)).x;
 	}
 
 	template<length_t L, typename T, qualifier Q>

+ 2 - 3
glm/simd/platform.h

@@ -77,9 +77,8 @@
 
 // CUDA
 #define GLM_COMPILER_CUDA			0x10000000
-#define GLM_COMPILER_CUDA70			0x100000A0
-#define GLM_COMPILER_CUDA75			0x100000B0
-#define GLM_COMPILER_CUDA80			0x100000C0
+#define GLM_COMPILER_CUDA80			0x100000A0
+#define GLM_COMPILER_CUDA90			0x100000B0
 
 // SYCL
 #define GLM_COMPILER_SYCL			0x00300000

+ 3 - 2
readme.md

@@ -14,7 +14,7 @@ This library works perfectly with *[OpenGL](https://www.opengl.org)* but it also
 - [Intel C++ Composer](https://software.intel.com/en-us/intel-compilers) XE 2013 and higher
 - [LLVM](http://llvm.org/) 3.4 and higher
 - [Visual C++](http://www.visualstudio.com/) 2013 and higher
-- [CUDA](https://developer.nvidia.com/about-cuda) 7.0 and higher (experimental)
+- [CUDA](https://developer.nvidia.com/about-cuda) 9.0 and higher (experimental)
 - [SYCL](https://www.khronos.org/sycl/) (experimental: only [ComputeCpp](https://codeplay.com/products/computesuite/computecpp) implementation has been tested).
 - Any C++11 compiler
 
@@ -56,11 +56,11 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
 ### [GLM 0.9.9.6](https://github.com/g-truc/glm/tree/master)
 #### Features:
 - Added Neon support to glm #945
+- Added SYCL support #914
 - Added EXT_scalar_integer extension with power of two and multiple scalar functions
 - Added EXT_vector_integer extension with power of two and multiple vector functions
 
 #### Improvements:
-- Added SYCL support #914
 - Added Visual C++ 2019 detection
 - Added Visual C++ 2017 15.8 and 15.9 detection
 
@@ -74,6 +74,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
 - Fixed quaternion componant order: w, {x, y, z} #916
 - Fixed GLM_HAS_CXX11_STL broken on Clang with Linux #926
 - Fixed Clang or GCC build due to wrong GLM_HAS_IF_CONSTEXPR definition #907
+- Fixed CUDA 9 build #910
 
 #### Deprecation:
  - Removed CMake install and uninstall scripts