Worked around a compiler bug in CUDA 9.1, which caused an "Internal Compiler Error (codegen): "there was an error in verifying the lgenfe output!". Apparently the compiler got confused by overloaded is_valid() if the input parameter was not passed as a reference in both cases.

This commit is contained in:
jpekkila
2019-06-29 10:49:15 +03:00
parent 9b45716186
commit 0c63d55fd7

View File

@@ -426,7 +426,7 @@ cross(const AcReal3& a, const AcReal3& b)
} }
static __host__ __device__ __forceinline__ bool static __host__ __device__ __forceinline__ bool
is_valid(const AcReal a) is_valid(const AcReal& a)
{ {
return !isnan(a) && !isinf(a); return !isnan(a) && !isinf(a);
} }