Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

Clarification oneDPL RNG examples

cbyrohl
Beginner
494 Views

Hi there,

 

I am currently trying to understand the use of oneDPL RNGs. There are a range of examples using this API on the internet. They all follow the same structure: within the parallel_for, we create an engine, a distribution and generate the random number as distribution(engine) for further use. See example at https://oneapi-src.github.io/oneDPL/api_for_sycl_kernels/random.html . Without SYCL/oneDPL one would use C++ std such that the engine and distribution are created outside of the for loop, and putting these into the loop come with a substantial performance hit. Could you clarify, maybe also in the documentation of the examples, how and why the placement and performance differs for oneDPL RNGs compared to C++ stdlib.

 

Thanks,

 

 

 

0 Kudos
0 Replies
Reply