Skip to content

Commit

Permalink
ADD: error message if file is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
StRigaud committed Nov 28, 2022
1 parent 5a8ef77 commit ecc1f43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion clic/src/tier1/cleCustomKernel.cpp
Expand Up @@ -13,7 +13,11 @@ CustomKernel::CustomKernel(const ProcessorPointer & device,
: Operation(device, nb_parameters)
{
std::ifstream ifs(filename);
std::string ocl_source((std::istreambuf_iterator<char>(ifs)), (std::istreambuf_iterator<char>()));
if (ifs.fail())
{
std::cout << "Error in loading custom kernel, could not find file " << filename << std::endl;
}
std::string ocl_source((std::istreambuf_iterator<char>(ifs)), (std::istreambuf_iterator<char>()));
this->SetSource(name, ocl_source);
}

Expand Down

0 comments on commit ecc1f43

Please sign in to comment.