mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 01:59:19 +08:00
packages.biu: do not check if NDEBUG
This commit is contained in:
parent
7a152011f0
commit
45a1c4520b
@ -50,8 +50,10 @@ namespace biu::common
|
||||
|
||||
template <typename Array> std::generator<std::pair<Array, std::size_t>> sequence(Array from, Array to)
|
||||
{
|
||||
# ifndef NDEBUG
|
||||
assert(from.size() == to.size());
|
||||
for (std::size_t i = 0; i < from.size(); i++) assert(from[i] < to[i]);
|
||||
# endif
|
||||
Array current = from;
|
||||
std::size_t total = 0;
|
||||
auto make_next = [&](this auto&& self, std::size_t i)
|
||||
|
@ -184,8 +184,10 @@ namespace biu::eigen
|
||||
|
||||
// decomposition declarations can't be constexpr
|
||||
constexpr auto size = get_size.template operator()<ToSize>();
|
||||
# ifndef NDEBUG
|
||||
if (!size.second(vector))
|
||||
throw std::invalid_argument("The size of the destination Eigen container mismatches the input container");
|
||||
# endif
|
||||
if constexpr (size.first == dynamicSize)
|
||||
return std::vector<typename Vector::Scalar>(vector.data(), vector.data() + vector.size());
|
||||
else
|
||||
@ -235,8 +237,10 @@ namespace biu::eigen
|
||||
|
||||
// decomposition declarations can't be constexpr
|
||||
constexpr auto size = get_size();
|
||||
# ifndef NDEBUG
|
||||
if (!size.second(matrix))
|
||||
throw std::invalid_argument("The size of the destination Eigen container mismatches the input container");
|
||||
# endif
|
||||
|
||||
using container_per_row = std::conditional_t<size.first.second == dynamicSize,
|
||||
std::vector<typename Matrix::Scalar>, std::array<typename Matrix::Scalar, size.first.second>>;
|
||||
|
Loading…
Reference in New Issue
Block a user