MCPcopy Create free account
hub / github.com/NVIDIA/DALI / TEST

Function TEST

dali/kernels/test/block_setup_test.cc:23–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace kernels {
22
23TEST(TensorShape, skip_dim) {
24 TensorShape<5> in = { 1, 2, 3, 4, 5 };
25 EXPECT_EQ(skip_dim<-1>(in), in);
26 EXPECT_EQ(skip_dim<0>(in), TensorShape<4>( 2, 3, 4, 5)); // NOLINT
27 EXPECT_EQ(skip_dim<1>(in), TensorShape<4>(1, 3, 4, 5));
28 EXPECT_EQ(skip_dim<2>(in), TensorShape<4>(1, 2, 4, 5));
29 EXPECT_EQ(skip_dim<3>(in), TensorShape<4>(1, 2, 3, 5));
30 EXPECT_EQ(skip_dim<4>(in), TensorShape<4>(1, 2, 3, 4 )); // NOLINT
31}
32
33TEST(BlockSetup, shape2vec) {
34 TensorShape<1> in1 = { 123 };

Callers

nothing calls this directly

Calls 15

shape2vecFunction · 0.85
make_spanFunction · 0.85
PerturbAndValidateFunction · 0.85
ValidateBlockMapFunction · 0.85
div_ceilFunction · 0.85
volumeFunction · 0.85
SetDefaultBlockSizeMethod · 0.80
SetupBlocksMethod · 0.80
IsUniformSizeMethod · 0.80
BlocksMethod · 0.80
GridDimVecMethod · 0.80
BlockDimVecMethod · 0.80

Tested by

no test coverage detected