MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / initRandomInt

Function initRandomInt

tests/unittests/unittest_utils.h:156–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156void initRandomInt(int* ptr, size_t size, int minval, int maxval) {
157 assert(minval < maxval);
158 int mod = maxval - minval;
159 for (size_t i = 0; i < size; ++i) {
160 ptr[i] = minval + rand() % mod;
161 }
162}
163
164template<typename T>
165void tile(T* x, int m, int n) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected