mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
(GLM) Remove CUDACC ifdefs
This commit is contained in:
parent
68bfbd8020
commit
765c8ee930
14
deps/glm/detail/func_exponential.inl
vendored
14
deps/glm/detail/func_exponential.inl
vendored
@ -197,22 +197,12 @@ namespace detail
|
||||
// sqrt
|
||||
GLM_FUNC_QUALIFIER float sqrt(float x)
|
||||
{
|
||||
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
|
||||
detail::tvec1<float, highp> tmp(detail::compute_sqrt<detail::tvec1, float, highp>::call(x));
|
||||
return tmp.x;
|
||||
# else
|
||||
return detail::compute_sqrt<detail::tvec1, float, highp>::call(x).x;
|
||||
# endif
|
||||
return detail::compute_sqrt<detail::tvec1, float, highp>::call(x).x;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER double sqrt(double x)
|
||||
{
|
||||
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
|
||||
detail::tvec1<double, highp> tmp(detail::compute_sqrt<detail::tvec1, double, highp>::call(x));
|
||||
return tmp.x;
|
||||
# else
|
||||
return detail::compute_sqrt<detail::tvec1, double, highp>::call(x).x;
|
||||
# endif
|
||||
return detail::compute_sqrt<detail::tvec1, double, highp>::call(x).x;
|
||||
}
|
||||
|
||||
template <typename T, precision P, template <typename, precision> class vecType>
|
||||
|
7
deps/glm/detail/func_geometric.inl
vendored
7
deps/glm/detail/func_geometric.inl
vendored
@ -43,12 +43,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static T call(detail::tvec1<T, P> const & x, detail::tvec1<T, P> const & y)
|
||||
{
|
||||
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
|
||||
detail::tvec1<T, P> tmp(x * y);
|
||||
return tmp.x;
|
||||
# else
|
||||
return detail::tvec1<T, P>(x * y).x;
|
||||
# endif
|
||||
return detail::tvec1<T, P>(x * y).x;
|
||||
}
|
||||
};
|
||||
|
||||
|
11
deps/glm/detail/setup.hpp
vendored
11
deps/glm/detail/setup.hpp
vendored
@ -210,17 +210,6 @@
|
||||
# define GLM_COMPILER GLM_COMPILER_INTEL
|
||||
# endif
|
||||
|
||||
// CUDA
|
||||
#elif defined(__CUDACC__)
|
||||
# if !defined(CUDA_VERSION) && !defined(GLM_FORCE_CUDA)
|
||||
# include <cuda.h> // make sure version is defined since nvcc does not define it itself!
|
||||
# endif
|
||||
# if CUDA_VERSION < 3000
|
||||
# error "GLM requires CUDA 3.0 or higher"
|
||||
# else
|
||||
# define GLM_COMPILER GLM_COMPILER_CUDA
|
||||
# endif
|
||||
|
||||
// Visual C++
|
||||
#elif defined(_MSC_VER)
|
||||
# if _MSC_VER < 1400
|
||||
|
14
deps/glm/gtx/fast_square_root.inl
vendored
14
deps/glm/gtx/fast_square_root.inl
vendored
@ -27,23 +27,13 @@ namespace glm
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER float fastInverseSqrt<float>(float const & x)
|
||||
{
|
||||
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
|
||||
detail::tvec1<T, P> tmp(detail::compute_inversesqrt<detail::tvec1, float, lowp>::call(detail::tvec1<float, lowp>(x)));
|
||||
return tmp.x;
|
||||
# else
|
||||
return detail::compute_inversesqrt<detail::tvec1, float, lowp>::call(detail::tvec1<float, lowp>(x)).x;
|
||||
# endif
|
||||
return detail::compute_inversesqrt<detail::tvec1, float, lowp>::call(detail::tvec1<float, lowp>(x)).x;
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER double fastInverseSqrt<double>(double const & x)
|
||||
{
|
||||
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
|
||||
detail::tvec1<T, P> tmp(detail::compute_inversesqrt<detail::tvec1, double, lowp>::call(detail::tvec1<double, lowp>(x)));
|
||||
return tmp.x;
|
||||
# else
|
||||
return detail::compute_inversesqrt<detail::tvec1, double, lowp>::call(detail::tvec1<double, lowp>(x)).x;
|
||||
# endif
|
||||
return detail::compute_inversesqrt<detail::tvec1, double, lowp>::call(detail::tvec1<double, lowp>(x)).x;
|
||||
}
|
||||
|
||||
template <template <class, precision> class vecType, typename T, precision P>
|
||||
|
Loading…
Reference in New Issue
Block a user