Forum Discussion

clh01s's avatar
clh01s
Icon for New Contributor rankNew Contributor
4 years ago
Solved

how use opencl generate random number in the FPGA

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!!!

  • 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

2 Replies

  • 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

  • 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