24 #include "utils/cl_random.h" 35 taus_uint4 *getRNG(
int index) {
return &rngArray[index]; }
36 float uniformRandom(
int localIndex = 0);
37 float uniformRandom(
int localIndex,
float min,
float max) {
38 return min + uniformRandom(localIndex) * (max - min);
40 void uniformRandom(
float *values,
int localIndex,
int count = 1) {
41 for (
int k = 0; k < count; k++)
42 values[k] = uniformRandom(localIndex + k);
44 void uniformRandom(
float *values,
int localIndex,
int count,
float min,
float max) {
45 for (
int k = 0; k < count; k++)
46 values[k] = uniformRandom(localIndex + k, min, max);
49 unsigned int randomUInt(
int localIndex = 0);
50 void randomUInt(
unsigned int *values,
int localIndex,
int count = 1) {
51 for (
int k = 0; k < count; k++)
52 values[k] = randomUInt(localIndex + k);
54 static inline unsigned int randomUIntMax() {
return CL_RANDOM_MAX; }
58 int initializeFromCount(
int count);
59 int initializeFromLoc(
const PVLayerLoc *locptr,
bool isExtended);
62 int initialize_base();
66 std::vector<taus_uint4> rngArray;