diff --git a/algo/ca/core/pars/CaConfigReader.h b/algo/ca/core/pars/CaConfigReader.h index e13ffd807ff063d5381b66570a5d2281ce2d6ba5..d2d4b2cbe3aff562f51c986f98893aa03ce55afd 100644 --- a/algo/ca/core/pars/CaConfigReader.h +++ b/algo/ca/core/pars/CaConfigReader.h @@ -11,6 +11,7 @@ #include "CaIteration.h" +#include <functional> #include <string> #include <unordered_map> #include <vector> diff --git a/algo/ca/core/utils/CaVector.h b/algo/ca/core/utils/CaVector.h index 16fee44c40f0ccb15a052db5a5a6bbd557b99b82..76953d2d5f381602d36d76d011c9693f5c19b441 100644 --- a/algo/ca/core/utils/CaVector.h +++ b/algo/ca/core/utils/CaVector.h @@ -133,6 +133,7 @@ namespace cbm::algo::ca template<typename... Tinput> void enlarge(std::size_t count, Tinput... value) { +#ifndef FAST_CODE if (count < Tbase::size()) { LOG(fatal) << "ca::Vector \"" << fName << "\"::enlarge(" << count << "): the new size is smaller than the current one " << Tbase::size() << ", something goes wrong."; @@ -143,6 +144,7 @@ namespace cbm::algo::ca << Tbase::capacity() << " is reached, the vector of size " << Tbase::size() << " will be copied to the new place."; } +#endif Tbase::resize(count, value...); } @@ -150,11 +152,13 @@ namespace cbm::algo::ca /// \param count Size of the new vector void reduce(std::size_t count) { +#ifndef FAST_CODE if (count > Tbase::size()) { LOG(fatal) << "ca::Vector \"" << fName << "\"::reduce(" << count << "): the new size is bigger than the current one " << Tbase::size() << ", something goes wrong."; assert(count < Tbase::size()); } +#endif Tbase::resize(count); } @@ -162,11 +166,13 @@ namespace cbm::algo::ca /// \param count New size of the vector void reserve(std::size_t count) { +#ifndef FAST_CODE if (!Tbase::empty()) { LOG(fatal) << "ca::Vector \"" << fName << "\"::reserve(" << count << "): the vector is not empty; " << " it will be copied to the new place."; assert(Tbase::empty()); } +#endif Tbase::reserve(count); }