1#ifndef PSCF_CUDA_RANDOM_H
2#define PSCF_CUDA_RANDOM_H
4#include "DeviceArray.h"
101 curandGenerator_t gen_;
104 unsigned long long seed_;
109 void errorCheck(curandStatus_t
const & error);
Random number generator on GPU.
void normal(DeviceArray< float > &data, float stddev, float mean=0.0)
Populate array on device with normal-distributed random floats.
long seed()
Returns value of random seed (private member variable seed_).
void uniform(DeviceArray< float > &data)
Populate array on device with random floats in (0, 1], uniform dist.
virtual ~CudaRandom()
Destructor.
void setSeed(unsigned long long seed)
Set value of random seed (private member variable seed_).
Dynamic array on the GPU device with aligned data.
PSCF package top-level namespace.