void curand_generator:: fill_uniform ( tensor& data ) { if (data.size() == 0) return; CHECK_CURAND(curandGenerateUniform((curandGenerator_t)handle, data.device(), data.size())); }
void curand_generator:: fill_gaussian ( tensor& data, float mean, float stddev ) { if (data.size() == 0) return; CHECK_CURAND(curandGenerateNormal((curandGenerator_t)handle, data.device(), data.size(), mean, stddev)); }