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

Function TEST_P

test/jit.cpp:566–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564// clang-format on
565
566TEST_P(JIT, Tile) {
567 tile_params params = GetParam();
568 size_t alloc_bytes, alloc_buffers;
569 size_t lock_bytes, lock_buffers;
570 size_t alloc_bytes2, alloc_buffers2;
571 size_t lock_bytes2, lock_buffers2;
572 af::deviceMemInfo(&alloc_bytes, &alloc_buffers, &lock_bytes, &lock_buffers);
573 array out = tile(in, params.tile);
574 af::deviceMemInfo(&alloc_bytes2, &alloc_buffers2, &lock_bytes2,
575 &lock_buffers2);
576
577 // Make sure that the dimensions we are testing here are JIT nodes
578 // by checking that no new buffers are created.
579 ASSERT_EQ(alloc_bytes, alloc_bytes2)
580 << "Tile operation created a buffer therefore not a JIT node";
581 ASSERT_EQ(alloc_buffers, alloc_buffers2)
582 << "Tile operation created a buffer therefore not a JIT node";
583 ASSERT_EQ(lock_bytes, lock_bytes2)
584 << "Tile operation created a buffer therefore not a JIT node";
585 ASSERT_EQ(alloc_buffers, alloc_buffers2)
586 << "Tile operation created a buffer therefore not a JIT node";
587
588 ASSERT_VEC_ARRAY_EQ(gold, params.out_dim, out);
589}
590
591/// This test creates a large jit tree with very small buffers. I am
592/// performing random JIT operations on the arrays. In each iteration

Callers 1

fft.cppFile · 0.70

Calls 7

deviceMemInfoFunction · 0.85
constantFunction · 0.85
tileFunction · 0.50
selectFunction · 0.50
evalMethod · 0.45
elementsMethod · 0.45
dimsMethod · 0.45

Tested by

no test coverage detected