mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 12:19:12 +08:00
EIGEN_UNUSED_VARIABLE works better than casting to void. Make this also usable from CUDA code
This commit is contained in:
parent
d2fc597d5b
commit
e5f134006b
@ -251,7 +251,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EIGEN_NO_DEBUG
|
#ifdef EIGEN_NO_DEBUG
|
||||||
#define EIGEN_ONLY_USED_FOR_DEBUG(x) (void)x
|
#define EIGEN_ONLY_USED_FOR_DEBUG(x) EIGEN_UNUSED_VARIABLE(x)
|
||||||
#else
|
#else
|
||||||
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
|
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
|
||||||
#endif
|
#endif
|
||||||
@ -277,7 +277,7 @@
|
|||||||
// Suppresses 'unused variable' warnings.
|
// Suppresses 'unused variable' warnings.
|
||||||
namespace Eigen {
|
namespace Eigen {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
template<typename T> void ignore_unused_variable(const T&) {}
|
template<typename T> EIGEN_DEVICE_FUNC void ignore_unused_variable(const T&) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#define EIGEN_UNUSED_VARIABLE(var) Eigen::internal::ignore_unused_variable(var);
|
#define EIGEN_UNUSED_VARIABLE(var) Eigen::internal::ignore_unused_variable(var);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user