alpaqa matlab
Nonconvex constrained optimization
Loading...
Searching...
No Matches
alloc-check.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4
5namespace alpaqa {
6
7#ifdef EIGEN_RUNTIME_NO_MALLOC
8template <bool Allow>
9struct ScopedMallocChecker {
11 Eigen::internal::set_is_malloc_allowed(Allow);
12 }
13 ~ScopedMallocChecker() { Eigen::internal::set_is_malloc_allowed(prev); }
14 bool prev;
15};
16#else
17template <bool>
19 // Empty constructor suppresses MSVC /we4101 (unreferenced local variable)
20 ScopedMallocChecker() noexcept {} // NOLINT(*-use-equals-default)
21};
22#endif
25
26} // namespace alpaqa
constexpr const auto inf
Definition config.hpp:85