MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / irand

Function irand

tests/test-grad0.cpp:54–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54static int irand(int n) {
55 if (n == 0) return 0;
56 return rand()%n;
57}
58
59static void get_random_dims(int64_t * dims, int ndims) {
60 dims[0] = dims[1] = dims[2] = dims[3] = 1;

Callers 3

get_random_dimsFunction · 0.70
get_random_tensor_i32Function · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected