Commit dae0a89c authored by Joseph Noir's avatar Joseph Noir

added exception handling to opencl test

The opencl test provokes an execption with an incorrect opencl kernel.
parent 9ccb6495
...@@ -34,6 +34,12 @@ constexpr const char* kernel_source = R"__( ...@@ -34,6 +34,12 @@ constexpr const char* kernel_source = R"__(
} }
)__"; )__";
constexpr const char* kernel_source_error = R"__(
__kernel void matrix_square(__global int*) {
size_t semicolon
}
)__";
} }
template<size_t Size> template<size_t Size>
...@@ -171,6 +177,14 @@ int main() { ...@@ -171,6 +177,14 @@ int main() {
} }
); );
try {
program create_error = program::create(kernel_source_error);
}
catch (const exception& exc) {
cout << exc.what() << endl;
CPPA_CHECK_EQUAL("clBuildProgram: CL_BUILD_PROGRAM_FAILURE", exc.what());
}
cppa::await_all_others_done(); cppa::await_all_others_done();
cppa::shutdown(); cppa::shutdown();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment