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

Method SetUp

test/reduce.cpp:2019–2040  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2017 array valsReducedGold, idxsReducedGold;
2018
2019 void SetUp() {
2020 ragged_params *params = GetParam();
2021 if (noHalfTests(params->vType_)) {
2022 GTEST_SKIP() << "Half not supported on this device";
2023 }
2024 if (noDoubleTests(GetParam()->vType_)) {
2025 GTEST_SKIP() << "Double not supported on this device";
2026 }
2027
2028 const size_t rdim_size = params->reduceDimLen_;
2029 const int dim = params->reduceDim_;
2030
2031 af::dim4 rdim(3, 3, 3, 3);
2032 rdim[dim] = rdim_size;
2033 vals = af::range(rdim, dim, params->vType_);
2034
2035 rdim[dim] = 1;
2036 ragged_lens = af::range(rdim, (dim > 0) ? 0 : 1, params->lType_) + 1;
2037
2038 valsReducedGold = af::range(rdim, (dim > 0) ? 0 : 1, params->oType_);
2039 idxsReducedGold = af::range(rdim, (dim > 0) ? 0 : 1, params->lType_);
2040 }
2041
2042 void TearDown() { delete GetParam(); }
2043};

Callers

nothing calls this directly

Calls 3

noHalfTestsFunction · 0.85
noDoubleTestsFunction · 0.85
rangeFunction · 0.50

Tested by

no test coverage detected