MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / RandomInit

Function RandomInit

cpp/0_Introduction/simpleDrvRuntime/simpleDrvRuntime.cpp:196–201  ·  view source on GitHub ↗

Allocates an array with random float entries.

Source from the content-addressed store, hash-verified

194}
195// Allocates an array with random float entries.
196void RandomInit(float *data, int n)
197{
198 for (int i = 0; i < n; ++i) {
199 data[i] = rand() / (float)RAND_MAX;
200 }
201}
202
203bool inline findModulePath(const char *module_file, string &module_path, char **argv, ostringstream &ostrm)
204{

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected