aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/main.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-11-05 15:41:45 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-11-05 15:41:45 +0100
commit4f572e4c14445158bd9e58c2ba651528847053d6 (patch)
treec351dc6516ae753f3c2ad74efd70e5432d37b27c /test/main.h
parent87aee5fda1d42f5e6fdbce3c5c91f28e291147cd (diff)
Add minimalistic unit tests for NVCC support
Diffstat (limited to 'test/main.h')
-rw-r--r--test/main.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/main.h b/test/main.h
index 14f0d2f78..c889fa6c5 100644
--- a/test/main.h
+++ b/test/main.h
@@ -138,7 +138,7 @@ namespace Eigen
Eigen::internal::push_assert = false; \
}
- #else // EIGEN_DEBUG_ASSERTS
+ #elif !defined(__CUDACC__) // EIGEN_DEBUG_ASSERTS
// see bug 89. The copy_bool here is working around a bug in gcc <= 4.3
#define eigen_assert(a) \
if( (!Eigen::internal::copy_bool(a)) && (!no_more_assert) )\
@@ -162,7 +162,9 @@ namespace Eigen
#endif // EIGEN_DEBUG_ASSERTS
+ #if !defined(__CUDACC__)
#define EIGEN_USE_CUSTOM_ASSERT
+ #endif
#else // EIGEN_NO_ASSERTION_CHECKING
@@ -238,6 +240,7 @@ inline bool test_isMuchSmallerThan(const double& a, const double& b)
inline bool test_isApproxOrLessThan(const double& a, const double& b)
{ return internal::isApproxOrLessThan(a, b, test_precision<double>()); }
+#ifndef EIGEN_TEST_NO_COMPLEX
inline bool test_isApprox(const std::complex<float>& a, const std::complex<float>& b)
{ return internal::isApprox(a, b, test_precision<std::complex<float> >()); }
inline bool test_isMuchSmallerThan(const std::complex<float>& a, const std::complex<float>& b)
@@ -247,7 +250,9 @@ inline bool test_isApprox(const std::complex<double>& a, const std::complex<doub
{ return internal::isApprox(a, b, test_precision<std::complex<double> >()); }
inline bool test_isMuchSmallerThan(const std::complex<double>& a, const std::complex<double>& b)
{ return internal::isMuchSmallerThan(a, b, test_precision<std::complex<double> >()); }
+#endif
+#ifndef EIGEN_TEST_NO_LONGDOUBLE
inline bool test_isApprox(const long double& a, const long double& b)
{
bool ret = internal::isApprox(a, b, test_precision<long double>());
@@ -261,6 +266,7 @@ inline bool test_isMuchSmallerThan(const long double& a, const long double& b)
{ return internal::isMuchSmallerThan(a, b, test_precision<long double>()); }
inline bool test_isApproxOrLessThan(const long double& a, const long double& b)
{ return internal::isApproxOrLessThan(a, b, test_precision<long double>()); }
+#endif // EIGEN_TEST_NO_LONGDOUBLE
template<typename Type1, typename Type2>
inline bool test_isApprox(const Type1& a, const Type2& b)