basedOpinionated utility library |
git clone git://git.dimitrijedobrota.com/based.git |
Log | Files | Refs | README | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING | |
instrumentation.cpp (359B)
1 #include <algorithm> 2 #include <iterator> 3 4 #include "based/instrumentation.hpp" 5 6 namespace based 7 { 8 9 std::array<double, instrumented_base::op_num> instrumented_base::counts = {}; 10 11 void instrumented_base::initialize(std::size_t size) 12 { 13 std::fill(std::begin(counts), std::end(counts), 0.0); 14 counts[op::n] = static_cast<double>(size); 15 } 16 17 } // namespace based