mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix check_that_free_is_allowed so that it properly checks is_free_allowed and not is_malloc_allowed
libeigen/eigen!2101 Co-authored-by: Sébastien Gilles <sebastien.gilles@inria.fr>
This commit is contained in:
committed by
Antonio Sánchez
parent
5793499a55
commit
c5aa40675a
@@ -114,7 +114,7 @@ EIGEN_DEVICE_FUNC inline bool is_free_allowed_impl(bool update, bool new_value =
|
|||||||
EIGEN_DEVICE_FUNC inline bool is_free_allowed() { return is_free_allowed_impl(false); }
|
EIGEN_DEVICE_FUNC inline bool is_free_allowed() { return is_free_allowed_impl(false); }
|
||||||
EIGEN_DEVICE_FUNC inline bool set_is_free_allowed(bool new_value) { return is_free_allowed_impl(true, new_value); }
|
EIGEN_DEVICE_FUNC inline bool set_is_free_allowed(bool new_value) { return is_free_allowed_impl(true, new_value); }
|
||||||
EIGEN_DEVICE_FUNC inline void check_that_free_is_allowed() {
|
EIGEN_DEVICE_FUNC inline void check_that_free_is_allowed() {
|
||||||
eigen_assert(is_malloc_allowed() &&
|
eigen_assert(is_free_allowed() &&
|
||||||
"heap deallocation is forbidden (EIGEN_RUNTIME_NO_MALLOC is defined and set_is_free_allowed is false)");
|
"heap deallocation is forbidden (EIGEN_RUNTIME_NO_MALLOC is defined and set_is_free_allowed is false)");
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user