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

Method SetUp

test/wrap.cpp:363–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361class WrapV2Simple : public WrapV2<T> {
362 protected:
363 void SetUp() {
364 SUPPORTED_TYPE_CHECK(T);
365 this->releaseArrays();
366 this->in_ = 0;
367 this->gold_ = 0;
368
369 af_array tmp_in = 0;
370 af_array tmp_gold = 0;
371
372 ::getInput(&tmp_in, this->in_dims.get());
373 ::getGold(&tmp_gold, this->gold_dims.get());
374
375 af_dtype dtype = (af_dtype)dtype_traits<T>::af_type;
376 ASSERT_SUCCESS(af_cast(&this->in_, tmp_in, dtype));
377 ASSERT_SUCCESS(af_cast(&this->gold_, tmp_gold, dtype));
378
379 ASSERT_SUCCESS(af_release_array(tmp_in));
380 ASSERT_SUCCESS(af_release_array(tmp_gold));
381 }
382};
383
384TYPED_TEST_SUITE(WrapV2Simple, TestTypes);

Callers

nothing calls this directly

Calls 6

getInputFunction · 0.85
getGoldFunction · 0.85
af_castFunction · 0.50
af_release_arrayFunction · 0.50
releaseArraysMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected