MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / readNextNonEmptyLine

Function readNextNonEmptyLine

test/arrayfire_test.cpp:92–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92std::string readNextNonEmptyLine(std::ifstream &file) {
93 std::string result = "";
94 // Using a for loop to read the next non empty line
95 for (std::string line; std::getline(file, line);) {
96 result += line;
97 if (result != "") break;
98 }
99 // If no file has been found, throw an exception
100 if (result == "") {
101 throw std::runtime_error("Non empty lines not found in the file");
102 }
103 return result;
104}
105
106std::string getBackendName(bool lower) {
107 af::Backend backend = af::getActiveBackend();

Callers 2

readImageTestsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected