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

Method validate_info

utils/ImageLoader.h:415–426  ·  view source on GitHub ↗

Inherited methods overridden:

Source from the content-addressed store, hash-verified

413protected:
414 // Inherited methods overridden:
415 void validate_info(const ITensorInfo *tensor_info) override
416 {
417 // Check if the file is large enough to fill the image
418 const size_t current_position = _fs.tellg();
419 _fs.seekg(0, std::ios_base::end);
420 const size_t end_position = _fs.tellg();
421 _fs.seekg(current_position, std::ios_base::beg);
422
423 ARM_COMPUTE_ERROR_ON_MSG((end_position - current_position) < tensor_info->tensor_shape().total_size(),
424 "Not enough data in file");
425 ARM_COMPUTE_UNUSED(end_position, tensor_info);
426 }
427
428private:
429 std::ifstream _fs;

Callers

nothing calls this directly

Calls 1

total_sizeMethod · 0.45

Tested by

no test coverage detected