Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20688 Discussions

how use opencl generate random number in the FPGA

clh01s
Beginner
422 Views

I'm a novice.

I use opencl develop.

I have a  A10 pac. want use it generate random number to calculate.

so have any solution use opencl generate random number?

thank you help!!!

0 Kudos
1 Solution
BoonBengT_Intel
Moderator
363 Views

Hi @clh01s,

Thank you for posting in Intel community forum, hope all is well and apologies for the delayed in response.
Unfortunately openCL does not provide any build-in function for random numbers.


However, would suggest to try on the following recommendation:
- generate an array of ramdom numbers on the host and pass the pointer of the array to a kernal.
- using prebuild libraries that provides streams of random numbers from host. (perhaps try clRNG)

 

Hope that clarify.
Best Wishes
BB

View solution in original post

0 Kudos
2 Replies
BoonBengT_Intel
Moderator
364 Views

Hi @clh01s,

Thank you for posting in Intel community forum, hope all is well and apologies for the delayed in response.
Unfortunately openCL does not provide any build-in function for random numbers.


However, would suggest to try on the following recommendation:
- generate an array of ramdom numbers on the host and pass the pointer of the array to a kernal.
- using prebuild libraries that provides streams of random numbers from host. (perhaps try clRNG)

 

Hope that clarify.
Best Wishes
BB

0 Kudos
BoonBengT_Intel
Moderator
347 Views

Hi @clh01s,

 

Good to know that you have round the solution, with no further clarification on this thread, it will be transitioned to community support for further help on doubts in this thread, where we will no longer monitor this thread.
Thank you for the questions and as always pleasure having you here.

Best Wishes
BB

0 Kudos
Reply