forked from icaven/glm
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Compiling an Application using glm with CUDA9 gives me the following error:
/usr/include/glm/gtx/fast_square_root.inl(26): error: identifier "T" is undefined
/usr/include/glm/gtx/fast_square_root.inl(26): error: identifier "Q" is undefined
/usr/include/glm/gtx/fast_square_root.inl(26): error: argument list for alias template "glm::tvec1" is missing
Changeing /usr/include/glm/gtx/fast_square_root.inl
from
// fastInversesqrt
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
}
to
// fastInversesqrt
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
}
resolves the issue, however i suspect this will break CUDA6 support...