Quantcast
Channel: Intel® Software - OpenCL*
Viewing all articles
Browse latest Browse all 1182

Different printf() behavior between CPU and GPU?

$
0
0

I have a very simple kernel with printf statement like:

printf("id: %d\n", id);

I am using the latest Intel SDK, on a 64-bit Windows system.

When I run the kernel on the CPU, the "\n" results in a single 0x0A byte at the end of the printed string.

When I run the kernel on GPU (Intel as well), the "\n" results in the two bytes 0x0A 0x0D.

Is this the expected behavior? Is there any way to make both devices produce the same output?

This is of course reminiscent of the differences between regular C/C++ on Linux and Windows, but here both devices are being used under Windows.

Thanks in advance for any help or pointers - am I missing something obvious?

 


Viewing all articles
Browse latest Browse all 1182

Trending Articles