MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / read

Method read

quickstart/common/util.cpp:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void ImageBase::read()
51{
52 std::ifstream infile(mPPM.filename, std::ifstream::binary);
53 if (!infile.is_open())
54 {
55 std::cerr << "ERROR: cannot open PPM image file: " << mPPM.filename << std::endl;
56 }
57 infile >> mPPM.magic >> mPPM.w >> mPPM.h >> mPPM.max;
58
59 infile.seekg(1, infile.cur);
60 mPPM.buffer.resize(volume());
61 infile.read(reinterpret_cast<char*>(mPPM.buffer.data()), volume());
62 infile.close();
63}
64
65void ImageBase::write()
66{

Callers 15

setup.pyFile · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
call_implMethod · 0.80
activate_implMethod · 0.80
encodeFunction · 0.80
load_fileFunction · 0.80
test_links_validMethod · 0.80
checkFunction · 0.80

Calls 3

volumeFunction · 0.50
resizeMethod · 0.45
dataMethod · 0.45