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

Function TEST

test/fft_large.cpp:29–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27using std::vector;
28
29TEST(fft2, CPP_4D) {
30 array a = randu(1024, 1024, 32);
31 array b = fft2(a);
32
33 array A = moddims(a, 1024, 1024, 4, 8);
34 array B = fft2(A);
35
36 cfloat *h_b = b.host<cfloat>();
37 cfloat *h_B = B.host<cfloat>();
38
39 for (int i = 0; i < (int)a.elements(); i++) {
40 ASSERT_EQ(h_b[i], h_B[i]) << "at: " << i << endl;
41 }
42
43 af_free_host(h_b);
44 af_free_host(h_B);
45}
46
47TEST(ifft2, CPP_4D) {
48 array a = randu(1024, 1024, 32, c32);

Callers

nothing calls this directly

Calls 6

randuFunction · 0.85
fft2Function · 0.85
moddimsFunction · 0.85
ifft2Function · 0.85
af_free_hostFunction · 0.50
elementsMethod · 0.45

Tested by

no test coverage detected