MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / ReadKernelFromFile

Function ReadKernelFromFile

src/library/generator.stockham.cpp:261–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259//#define KERNEL_INTERJECT
260
261 void ReadKernelFromFile(std::string &str)
262 {
263 const char *fileName = "fft_kernel.cl";
264 std::ifstream file(fileName);
265
266 if(!file.is_open())
267 {
268 std::cout << "File: " << fileName << " could not be opened, exiting ...." << std::endl;
269 exit(-1);
270 }
271
272 str.clear();
273
274 std::string line;
275 while(std::getline(file, line))
276 {
277 str += line;
278 str += '\n';
279 }
280 }
281
282 // Experimental End ===========================================
283

Callers 1

generateKernelMethod · 0.85

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected