Hello all, I have been trying to print inside a parallel for
region and I noticed that using printf
works as intended but when I use std::cout
I get a compile-time error as follows - Accessing non-const global variable is not allowed within SYCL device code
.
I was wondering what are basic differences between printf
and std::cout
that could result in such behavior.
PS - I am sorry if this question does not exactly fit in this forum. I tried searching the web and on stack overflow but none of them highlighted the basic differences and which one to be used in a kernel.
TIA