From 28aba540ee8d02ab384639dc16c05d7fb008243e Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 1 Dec 2014 20:27:56 +0100 Subject: [PATCH] Fixed scalar uaddCarry build error with Cuda #276 --- glm/detail/func_integer.inl | 2 +- readme.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/glm/detail/func_integer.inl b/glm/detail/func_integer.inl index f84304e5..cc1c4d33 100644 --- a/glm/detail/func_integer.inl +++ b/glm/detail/func_integer.inl @@ -203,7 +203,7 @@ namespace detail GLM_FUNC_QUALIFIER uint uaddCarry(uint const & x, uint const & y, uint & Carry) { uint64 const Value64(static_cast(x) + static_cast(y)); - uint64 const Max32(static_cast(std::numeric_limits::max())); + uint64 const Max32((static_cast(1) << static_cast(32)) - static_cast(1)); Carry = Value64 > Max32 ? 1 : 0; return static_cast(Value64 % (Max32 + static_cast(1))); } diff --git a/readme.txt b/readme.txt index b3cdcd76..cd2bb67d 100644 --- a/readme.txt +++ b/readme.txt @@ -62,6 +62,12 @@ GLM is a header only library, there is nothing to build, just include it. More informations in GLM manual: http://glm.g-truc.net/glm.pdf +================================================================================ +GLM 0.9.6.1: 2014-12-XX +-------------------------------------------------------------------------------- +Fixes: +- Fixed uaddCarry error for Cuda build #276 + ================================================================================ GLM 0.9.6.0: 2014-11-30 --------------------------------------------------------------------------------