2 #ifndef CLRNG_TEMPLATE_H
3 #define CLRNG_TEMPLATE_H
5 #error This file is a template for specific RNG implementations; it should not be included as is. Use an RNG-specific header such as mrg31k3p.h instead.
760 size_t numberCount, cl_mem outBuffer, cl_uint numQueuesAndEvents,
761 cl_command_queue* commQueues, cl_uint numWaitEvents,
762 const cl_event* waitEvents, cl_event* outEvents);
clrngStream * clrngCopyStreams(size_t count, const clrngStream *streams, clrngStatus *err)
Clone RNG stream objects.
Library definitions common to all RNG's.
clrngStatus clrngDestroyStreams(clrngStream *streams)
Destroy one or many stream objects.
cl_double clrngRandomU01(clrngStream *stream)
Generate the next random value in (0,1) [device].
clrngStatus clrngMakeOverSubstreams(clrngStream *stream, size_t count, clrngStream *substreams)
Make an array of substreams of a stream.
enum clrngStatus_ clrngStatus
Error codes.
clrngStream * clrngCreateStreams(clrngStreamCreator *creator, size_t count, size_t *bufSize, clrngStatus *err)
Allocate memory for and create new RNG stream objects.
Stream creator object.
Definition: clRNG_template.h:245
clrngStatus clrngRandomU01Array(clrngStream *stream, size_t count, cl_double *buffer)
Fill an array with successive random values in (0,1) [device].
Stream object [device].
Definition: clRNG_template.h:223
clrngStatus clrngCopyOverStreamsFromGlobal(size_t count, clrngStream *destStreams, const clrngHostStream *srcStreams)
Copy RNG host stream objects from global memory into private memory [device-only].
Host stream object [device-only].
Definition: clRNG_template.h:231
clrngStatus clrngDeviceRandomU01Array(size_t streamCount, cl_mem streams, size_t numberCount, cl_mem outBuffer, cl_uint numQueuesAndEvents, cl_command_queue *commQueues, cl_uint numWaitEvents, const cl_event *waitEvents, cl_event *outEvents)
Fill a buffer of random numbers.
clrngStream * clrngMakeSubstreams(clrngStream *stream, size_t count, size_t *bufSize, clrngStatus *err)
Allocate and make an array of substreams of a stream.
clrngStatus clrngRewindSubstreams(size_t count, clrngStream *streams)
Reinitialize streams to their initial substream states [device].
clrngStatus clrngCopyOverStreamsToGlobal(size_t count, clrngHostStream *destStreams, const clrngStream *srcStreams)
Copy RNG device stream objects from private memory into global memory [device-only].
clrngStatus clrngSetBaseCreatorState(clrngStreamCreator *creator, const clrngStreamState *baseState)
Change the base stream state of a stream creator.
clrngStatus clrngCopyOverStreams(size_t count, clrngStream *destStreams, const clrngStream *srcStreams)
Copy RNG stream objects in already allocated memory [device].
clrngStream * clrngAllocStreams(size_t count, size_t *bufSize, clrngStatus *err)
Reserve memory for one or more stream objects.
Stream state [device].
Definition: clRNG_template.h:204
clrngStatus clrngForwardToNextSubstreams(size_t count, clrngStream *streams)
Advance streams to the next substreams [device].
clrngStatus clrngWriteStreamInfo(const clrngStream *stream, FILE *file)
Format and output information about a stream object to a file.
clrngStatus clrngRewindStreams(size_t count, clrngStream *streams)
Reinitialize streams to their initial states [device].
clrngStatus clrngChangeStreamsSpacing(clrngStreamCreator *creator, cl_int e, cl_int c)
Change the spacing between successive streams.
clrngStatus clrngDestroyStreamCreator(clrngStreamCreator *creator)
Destroy a stream creator object.
clrngStreamCreator * clrngCopyStreamCreator(const clrngStreamCreator *creator, clrngStatus *err)
Duplicate an existing stream creator object.
clrngStatus clrngCreateOverStreams(clrngStreamCreator *creator, size_t count, clrngStream *streams)
Create new RNG stream objects in already allocated memory.
clrngStatus clrngRewindStreamCreator(clrngStreamCreator *creator)
Reset a stream creator to its original initial state.
clrngStatus clrngAdvanceStreams(size_t count, clrngStream *streams, cl_int e, cl_int c)
Advance the state of streams by many steps.
cl_int clrngRandomInteger(clrngStream *stream, cl_int i, cl_int j)
Generate the next random integer value [device].
clrngStatus clrngRandomIntegerArray(clrngStream *stream, cl_int i, cl_int j, size_t count, cl_int *buffer)
Fill an array with successive random integer values [device].