2021-10-18 10:54:01 +00:00
|
|
|
#include "stdafx.h"
|
|
|
|
#include "cycles_t.h"
|
|
|
|
|
|
|
|
cycles_t::cycles_t(size_t reserved) {
|
|
|
|
m_cycles.reserve(reserved);
|
|
|
|
}
|
|
|
|
|
|
|
|
void cycles_t::add(const cycle_t& cycle) {
|
2021-10-18 11:28:15 +00:00
|
|
|
assert(m_cycles.capacity() >= (m_cycles.size() + 1));
|
2021-10-18 10:54:01 +00:00
|
|
|
m_cycles.push_back(cycle);
|
|
|
|
}
|
|
|
|
|
|
|
|
cycles_t::cycles_t(simdjson::dom::array input) {
|
2021-10-18 11:28:15 +00:00
|
|
|
assert(m_cycles.empty());
|
2021-10-18 10:54:01 +00:00
|
|
|
m_cycles.reserve(input.size());
|
2021-10-22 09:51:36 +00:00
|
|
|
for (auto entry : input)
|
2021-10-18 10:54:01 +00:00
|
|
|
add(entry);
|
|
|
|
}
|