| 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 |