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

Function testBackend

examples/unified/basic.cpp:23–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21double unifRand() { return rand() / double(RAND_MAX); }
22
23void testBackend() {
24 af::info();
25
26 af::dim4 dims(10, 10, 1, 1);
27
28 af::array A(dims, &input.front());
29 af_print(A);
30
31 af::array B = af::constant(0.5, dims, f32);
32 af_print(B);
33}
34
35int main(int, char**) {
36 std::generate(input.begin(), input.end(), unifRand);

Callers 1

mainFunction · 0.85

Calls 2

infoFunction · 0.85
constantFunction · 0.85

Tested by

no test coverage detected