From 4f572e4c14445158bd9e58c2ba651528847053d6 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 5 Nov 2013 15:41:45 +0100 Subject: Add minimalistic unit tests for NVCC support --- test/main.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/main.h') 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()); } +#ifndef EIGEN_TEST_NO_COMPLEX inline bool test_isApprox(const std::complex& a, const std::complex& b) { return internal::isApprox(a, b, test_precision >()); } inline bool test_isMuchSmallerThan(const std::complex& a, const std::complex& b) @@ -247,7 +250,9 @@ inline bool test_isApprox(const std::complex& a, const std::complex >()); } inline bool test_isMuchSmallerThan(const std::complex& a, const std::complex& b) { return internal::isMuchSmallerThan(a, b, test_precision >()); } +#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()); @@ -261,6 +266,7 @@ inline bool test_isMuchSmallerThan(const long double& a, const long double& b) { return internal::isMuchSmallerThan(a, b, test_precision()); } inline bool test_isApproxOrLessThan(const long double& a, const long double& b) { return internal::isApproxOrLessThan(a, b, test_precision()); } +#endif // EIGEN_TEST_NO_LONGDOUBLE template inline bool test_isApprox(const Type1& a, const Type2& b) -- cgit v1.2.3