MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / randgen

Function randgen

test/binary.cpp:48–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48af::array randgen(const int num, dtype ty) {
49 af::array tmp = round(1 + 2 * af::randu(num, f32)).as(ty);
50 tmp.eval();
51 return tmp;
52}
53
54#define MY_ASSERT_NEAR(aa, bb, cc) ASSERT_NEAR(abs(aa), abs(bb), (cc))
55

Callers 1

BINARY_TESTS_NEARFunction · 0.85

Calls 4

roundFunction · 0.85
randuFunction · 0.85
asMethod · 0.80
evalMethod · 0.45

Tested by

no test coverage detected