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

Method ChunkGenerator

tutorials/external/catch.hpp:3884–3895  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3882 bool m_used_up = false;
3883 public:
3884 ChunkGenerator(size_t size, GeneratorWrapper<T> generator) :
3885 m_chunk_size(size), m_generator(std::move(generator))
3886 {
3887 m_chunk.reserve(m_chunk_size);
3888 m_chunk.push_back(m_generator.get());
3889 for (size_t i = 1; i < m_chunk_size; ++i) {
3890 if (!m_generator.next()) {
3891 Catch::throw_exception(GeneratorException("Not enough values to initialize the first chunk"));
3892 }
3893 m_chunk.push_back(m_generator.get());
3894 }
3895 }
3896 std::vector<T> const& get() const override {
3897 return m_chunk;
3898 }

Callers

nothing calls this directly

Calls 6

throw_exceptionFunction · 0.85
GeneratorExceptionClass · 0.85
reserveMethod · 0.45
push_backMethod · 0.45
getMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected