Utility functions for curand.
More...
#include "curand.h"
Go to the source code of this file.
|
| #define | curand_call(call) |
| |
|
| void | etl::impl::curand::generate_normal (curandGenerator_t generator, float *gpu_memory, size_t n, float mean, float stddev) |
| | Generate a normal distribution with the given mean and standard deviation with CURAND, in single-precision. More...
|
| |
| void | etl::impl::curand::generate_normal (curandGenerator_t generator, double *gpu_memory, size_t n, double mean, double stddev) |
| | Generate a normal distribution with the given mean and standard deviation with CURAND, in double-precision. More...
|
| |
| void | etl::impl::curand::generate_uniform (curandGenerator_t generator, float *gpu_memory, size_t n) |
| | Generate a uniform distribution between 0 and 1, in single precision. More...
|
| |
| void | etl::impl::curand::generate_uniform (curandGenerator_t generator, double *gpu_memory, size_t n) |
| | Generate a uniform distribution between 0 and 1, in single precision. More...
|
| |
Utility functions for curand.
◆ curand_call
| #define curand_call |
( |
|
call | ) |
|
Value:{ \
auto status = call; \
if (status != CURAND_STATUS_SUCCESS) { \
std::cerr << "CURAND error: " << status << " from " << #call << std::endl << "from " << __FILE__ << ":" << __LINE__ << std::endl; \
} \
}
◆ generate_normal() [1/2]
| void etl::impl::curand::generate_normal |
( |
curandGenerator_t |
generator, |
|
|
float * |
gpu_memory, |
|
|
size_t |
n, |
|
|
float |
mean, |
|
|
float |
stddev |
|
) |
| |
|
inline |
Generate a normal distribution with the given mean and standard deviation with CURAND, in single-precision.
- Parameters
-
| generator | The configured CURAND generator |
| gpu_memory | Pointer to the GPU memory to fill |
| n | The number of elements to set |
| mean | The mean of the distribution to generate. |
| stddev | The standard deviation of the distribution to generate. |
◆ generate_normal() [2/2]
| void etl::impl::curand::generate_normal |
( |
curandGenerator_t |
generator, |
|
|
double * |
gpu_memory, |
|
|
size_t |
n, |
|
|
double |
mean, |
|
|
double |
stddev |
|
) |
| |
|
inline |
Generate a normal distribution with the given mean and standard deviation with CURAND, in double-precision.
- Parameters
-
| generator | The configured CURAND generator |
| gpu_memory | Pointer to the GPU memory to fill |
| n | The number of elements to set |
| mean | The mean of the distribution to generate. |
| stddev | The standard deviation of the distribution to generate. |
◆ generate_uniform() [1/2]
| void etl::impl::curand::generate_uniform |
( |
curandGenerator_t |
generator, |
|
|
float * |
gpu_memory, |
|
|
size_t |
n |
|
) |
| |
|
inline |
Generate a uniform distribution between 0 and 1, in single precision.
- Parameters
-
| generator | The configured CURAND generator |
| gpu_memory | Pointer to the GPU memory to fill |
| n | The number of elements to set |
◆ generate_uniform() [2/2]
| void etl::impl::curand::generate_uniform |
( |
curandGenerator_t |
generator, |
|
|
double * |
gpu_memory, |
|
|
size_t |
n |
|
) |
| |
|
inline |
Generate a uniform distribution between 0 and 1, in single precision.
- Parameters
-
| generator | The configured CURAND generator |
| gpu_memory | Pointer to the GPU memory to fill |
| n | The number of elements to set |