MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / check_image_size

Function check_image_size

tests/AssetsLibrary.cpp:189–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189void check_image_size(std::ifstream &fs, size_t raw_size)
190{
191 const size_t current_position = fs.tellg();
192 fs.seekg(0, std::ios_base::end);
193 const size_t end_position = fs.tellg();
194 fs.seekg(current_position, std::ios_base::beg);
195
196 if ((end_position - current_position) < raw_size)
197 {
198 throw std::runtime_error("Not enough data in file");
199 }
200}
201
202void read_image_buffer(std::ifstream &fs, RawTensor &raw)
203{

Callers 2

load_ppmFunction · 0.85
load_pgmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected