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

Function af_pow2

src/api/c/unary.cpp:644–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642}
643
644af_err af_pow2(af_array *out, const af_array in) {
645 try {
646 af_array two;
647 const ArrayInfo &in_info = getInfo(in);
648 if (in_info.ndims() == 0) { return af_retain_array(out, in); }
649
650 AF_CHECK(af_constant(&two, 2, in_info.ndims(), in_info.dims().get(),
651 in_info.getType()));
652
653 AF_CHECK(af_pow(out, two, in, false));
654
655 AF_CHECK(af_release_array(two));
656 }
657 CATCHALL;
658
659 return AF_SUCCESS;
660}
661
662af_err af_factorial(af_array *out, const af_array in) {
663 try {

Callers

nothing calls this directly

Calls 8

af_powFunction · 0.85
af_retain_arrayFunction · 0.70
af_constantFunction · 0.70
af_release_arrayFunction · 0.70
ndimsMethod · 0.45
getMethod · 0.45
dimsMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected