MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / TEST_P

Function TEST_P

tests/primitives_test.cc:8–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6};
7
8TEST_P(PrimitiveTest, StridedFill) {
9 const Device device = GetParam();
10 StorageView x({3, 2}, float(0), device);
11 StorageView expected({3, 2}, std::vector<float>{1, 0, 1, 0, 1, 0}, device);
12 DEVICE_DISPATCH(device, primitives<D>::strided_fill(x.data<float>(), 1.f, 2, 3));
13 expect_storage_eq(x, expected);
14}
15
16TEST_P(PrimitiveTest, IndexedFill) {
17 const Device device = GetParam();

Callers

nothing calls this directly

Calls 4

expect_storage_eqFunction · 0.85
dimMethod · 0.80
sizeMethod · 0.45
toMethod · 0.45

Tested by

no test coverage detected