Developer Guide and Reference

  • 2021.4
  • 09/27/2021
  • Public Content

DPCT1040

Message

Use
sycl::stream
instead of
printf
if your code is used on the device.

Detailed Help

If the
printf
statement is used on the host and the device in your original code, it does not change. To create output in DPC++,
sycl::stream
must be used on the device and
printf
must be used on the host.

Suggestions to Fix

  • If the
    printf
    statement is only used from the host, do not change your code.
  • If the
    printf
    statement is only used from the device, use
    sycl::stream
    instead of
    printf
    .

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.