Fixed scalar uaddCarry build error with Cuda #276
This commit is contained in:
@@ -203,7 +203,7 @@ namespace detail
|
||||
GLM_FUNC_QUALIFIER uint uaddCarry(uint const & x, uint const & y, uint & Carry)
|
||||
{
|
||||
uint64 const Value64(static_cast<uint64>(x) + static_cast<uint64>(y));
|
||||
uint64 const Max32(static_cast<uint64>(std::numeric_limits<uint>::max()));
|
||||
uint64 const Max32((static_cast<uint64>(1) << static_cast<uint64>(32)) - static_cast<uint64>(1));
|
||||
Carry = Value64 > Max32 ? 1 : 0;
|
||||
return static_cast<uint32>(Value64 % (Max32 + static_cast<uint64>(1)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user