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

Function TEST

test/var.cpp:175–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175TEST(Var, ISSUE2117) {
176 using af::constant;
177 using af::sum;
178 using af::var;
179
180 array myArray = constant(1, 1000, 3000);
181 myArray = var(myArray, AF_VARIANCE_SAMPLE, 1);
182 ASSERT_NEAR(0.0f, sum<float>(myArray), 0.000001);
183
184 myArray = constant(1, 1000, 3000);
185#pragma GCC diagnostic push
186#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
187 myArray = var(myArray, true, 1);
188#pragma GCC diagnostic pop
189 ASSERT_NEAR(0.0f, sum<float>(myArray), 0.000001);
190}

Callers

nothing calls this directly

Calls 2

constantFunction · 0.85
varFunction · 0.50

Tested by

no test coverage detected