Skip to content

Commit

Permalink
Random123 doc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed May 11, 2016
1 parent 6cd9121 commit 887cd5b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pyopencl/clrandom.py
Expand Up @@ -32,13 +32,13 @@
Research. In addition to being usable through the convenience functions above,
they are available in any piece of code compiled through PyOpenCL by::
#include <pyopencl-philox.cl>
#include <pyopencl-threefry.cl>
#include <pyopencl-random123/philox.cl>
#include <pyopencl-random123/threefry.cl>
See the `Philox source
<https://github.com/pyopencl/pyopencl/blob/master/src/cl/pyopencl-philox.cl>`_
<https://github.com/pyopencl/pyopencl/blob/master/pyopencl/cl/pyopencl-random123/philox.cl>`_
and the `Threefry source
<https://github.com/pyopencl/pyopencl/blob/master/src/cl/pyopencl-threefish.cl>`_
<https://github.com/pyopencl/pyopencl/blob/master/pyopencl/cl/pyopencl-random123/threefry.cl>`_
for some documentation if you're planning on using Random123 directly.
.. note::
Expand Down Expand Up @@ -672,12 +672,16 @@ def normal(self, *args, **kwargs):


class PhiloxGenerator(Random123GeneratorBase):
__doc__ = Random123GeneratorBase.__doc__

header_name = "pyopencl-random123/philox.cl"
generator_name = "philox4x32"
key_length = 2


class ThreefryGenerator(Random123GeneratorBase):
__doc__ = Random123GeneratorBase.__doc__

header_name = "pyopencl-random123/threefry.cl"
generator_name = "threefry4x32"
key_length = 4
Expand Down

0 comments on commit 887cd5b

Please sign in to comment.