We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7dff33c + 68fb951 commit 6288267Copy full SHA for 6288267
DirectProgramming/C++SYCL/ParallelPatterns/histogram/src/main.cpp
@@ -118,7 +118,15 @@ int main(void) {
118
// which shows the difference between sparse and dense algorithm output
119
for (int i = 0; i < N; i++)
120
if (input[i] == 4) input[i] = rand() % 3;
121
- dense_histogram(input);
122
- sparse_histogram(input);
+ try
+ {
123
+ dense_histogram(input);
124
+ sparse_histogram(input);
125
+ }
126
+ catch(const std::exception& e)
127
128
+ std::cerr << e.what() << '\n';
129
+ return -1;
130
131
return 0;
132
}
0 commit comments