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

Method as

src/api/cpp/array.cpp:487–491  ·  view source on GitHub ↗

NOLINTNEXTLINE(readability-const-return-type)

Source from the content-addressed store, hash-verified

485
486// NOLINTNEXTLINE(readability-const-return-type)
487const array array::as(af::dtype type) const {
488 af_array out;
489 AF_THROW(af_cast(&out, this->get(), type));
490 return array(out);
491}
492
493array::array(const array &in) : arr(nullptr) {
494 AF_THROW(af_retain_array(&arr, in.get()));

Callers 15

TESTFunction · 0.80
TESTFunction · 0.80
replaceTestFunction · 0.80
replaceScalarTestFunction · 0.80
testRandomEngineUniformFunction · 0.80
randgenFunction · 0.80
generateArray<int>Function · 0.80
median_flatFunction · 0.80
median_testFunction · 0.80
TESTFunction · 0.80
sparseCastTesterFunction · 0.80

Calls 3

getMethod · 0.95
af_castFunction · 0.50
arrayClass · 0.50

Tested by 2

Test_flip_1DFunction · 0.64
imageEqFunction · 0.64