MCPcopy Create free account
hub / github.com/RenderKit/oidn / ChunkGenerator

Method ChunkGenerator

external/catch.hpp:4296–4309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4294 bool m_used_up = false;
4295 public:
4296 ChunkGenerator(size_t size, GeneratorWrapper<T> generator) :
4297 m_chunk_size(size), m_generator(std::move(generator))
4298 {
4299 m_chunk.reserve(m_chunk_size);
4300 if (m_chunk_size != 0) {
4301 m_chunk.push_back(m_generator.get());
4302 for (size_t i = 1; i < m_chunk_size; ++i) {
4303 if (!m_generator.next()) {
4304 Catch::throw_exception(GeneratorException("Not enough values to initialize the first chunk"));
4305 }
4306 m_chunk.push_back(m_generator.get());
4307 }
4308 }
4309 }
4310 std::vector<T> const& get() const override {
4311 return m_chunk;
4312 }

Callers

nothing calls this directly

Calls 4

throw_exceptionFunction · 0.85
GeneratorExceptionClass · 0.85
getMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected