Add check for OpenCL kernel file
This commit is contained in:
parent
22f085cdcf
commit
2f768f43bd
1 changed files with 4 additions and 0 deletions
|
@ -47,6 +47,10 @@ image::Bl dither::blue_noise(int width, int height, int threads, bool use_opencl
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
std::ifstream program_file("src/blue_noise.cl");
|
std::ifstream program_file("src/blue_noise.cl");
|
||||||
|
if (!program_file.good()) {
|
||||||
|
std::cerr << "ERROR: Failed to read \"src/blue_noise.cl\" (not found?)\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
std::string program_string;
|
std::string program_string;
|
||||||
while(program_file.good()) {
|
while(program_file.good()) {
|
||||||
program_file.read(buf, 1024);
|
program_file.read(buf, 1024);
|
||||||
|
|
Loading…
Reference in a new issue