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

Function readReferenceFile

samples/common/common.h:407–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405}
406
407inline bool readReferenceFile(const std::string& fileName, std::vector<std::string>& refVector)
408{
409 std::ifstream infile(fileName);
410 if (!infile.is_open())
411 {
412 std::cout << "ERROR: readReferenceFile: Attempting to read from a file that is not open." << std::endl;
413 return false;
414 }
415 std::string line;
416 while (std::getline(infile, line))
417 {
418 if (line.empty())
419 continue;
420 refVector.push_back(line);
421 }
422 infile.close();
423 return true;
424}
425
426template <typename T>
427std::vector<std::string> classify(

Callers 1

verifyOutputMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected