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

Method write

quickstart/common/util.cpp:65–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void ImageBase::write()
66{
67 std::ofstream outfile(mPPM.filename, std::ofstream::binary);
68 if (!outfile.is_open())
69 {
70 std::cerr << "ERROR: cannot open PPM image file: " << mPPM.filename << std::endl;
71 }
72 outfile << mPPM.magic << " " << mPPM.w << " " << mPPM.h << " " << mPPM.max << std::endl;
73 outfile.write(reinterpret_cast<char*>(mPPM.buffer.data()), volume());
74 outfile.close();
75}
76
77RGBImageReader::RGBImageReader(const std::string& filename, const nvinfer1::Dims& dims, const std::vector<float>& mean, const std::vector<float>& std)
78 : ImageBase(filename, dims)

Callers 15

setup.pyFile · 0.80
saveMethod · 0.80
logMethod · 0.80
activate_implMethod · 0.80
save_fileFunction · 0.80
test_iteration_infoMethod · 0.80
test_config_scriptMethod · 0.80

Calls 2

volumeFunction · 0.50
dataMethod · 0.45