mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-25 22:34:30 +08:00
Merged in codeplaysoftware/eigen-upstream-pure/disabling_assert_in_sycl (pull request PR-459)
Disabling assert inside SYCL kernel.
This commit is contained in:
commit
1285c080b3
@ -193,7 +193,7 @@ namespace Eigen
|
|||||||
|
|
||||||
#define EIGEN_DEFAULT_IO_FORMAT IOFormat(4, 0, " ", "\n", "", "", "", "")
|
#define EIGEN_DEFAULT_IO_FORMAT IOFormat(4, 0, " ", "\n", "", "", "", "")
|
||||||
|
|
||||||
#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(__HIP_DEVICE_COMPILE__)
|
#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(__HIP_DEVICE_COMPILE__) && !defined(__SYCL_DEVICE_ONLY__)
|
||||||
#define EIGEN_EXCEPTIONS
|
#define EIGEN_EXCEPTIONS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -272,7 +272,7 @@ namespace Eigen
|
|||||||
}
|
}
|
||||||
#endif //EIGEN_EXCEPTIONS
|
#endif //EIGEN_EXCEPTIONS
|
||||||
|
|
||||||
#elif !defined(__CUDACC__) && !defined(__HIPCC__)// EIGEN_DEBUG_ASSERTS
|
#elif !defined(__CUDACC__) && !defined(__HIPCC__) && !defined(__SYCL_DEVICE_ONLY__) // EIGEN_DEBUG_ASSERTS
|
||||||
// see bug 89. The copy_bool here is working around a bug in gcc <= 4.3
|
// see bug 89. The copy_bool here is working around a bug in gcc <= 4.3
|
||||||
#define eigen_assert(a) \
|
#define eigen_assert(a) \
|
||||||
if( (!Eigen::internal::copy_bool(a)) && (!no_more_assert) )\
|
if( (!Eigen::internal::copy_bool(a)) && (!no_more_assert) )\
|
||||||
@ -329,7 +329,7 @@ namespace Eigen
|
|||||||
std::cout << "Can't VERIFY_RAISES_STATIC_ASSERT( " #a " ) with exceptions disabled\n";
|
std::cout << "Can't VERIFY_RAISES_STATIC_ASSERT( " #a " ) with exceptions disabled\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__CUDACC__) && !defined(__HIPCC__)
|
#if !defined(__CUDACC__) && !defined(__HIPCC__) && !defined(__SYCL_DEVICE_ONLY__)
|
||||||
#define EIGEN_USE_CUSTOM_ASSERT
|
#define EIGEN_USE_CUSTOM_ASSERT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -845,4 +845,4 @@ int main(int argc, char *argv[])
|
|||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// 4503 - decorated name length exceeded, name was truncated
|
// 4503 - decorated name length exceeded, name was truncated
|
||||||
#pragma warning( disable : 4503)
|
#pragma warning( disable : 4503)
|
||||||
#endif
|
#endif
|
Loading…
x
Reference in New Issue
Block a user