![]() |
|
Raise an array to a power. More...
Functions | |
AFAPI af_err | af_pow (af_array *out, const af_array lhs, const af_array rhs, const bool batch) |
C Interface for power. More... | |
AFAPI array | pow (const array &lhs, const array &rhs) |
C++ Interface for power. More... | |
AFAPI array | pow (const array &lhs, const double rhs) |
C++ Interface for power. More... | |
AFAPI array | pow (const double lhs, const array &rhs) |
C++ Interface for power. More... | |
AFAPI array | pow2 (const array &in) |
C++ Interface for power of 2. More... | |
Raise an array to a power.
If the input array has values beyond what a floating point type can represent, then there is no guarantee that the results will be accurate. The exact type mapping from integral types to floating point types used to compute power is given below.
Input Type | Compute Type |
---|---|
unsigned long long | double |
long long | double |
unsigned int | double |
int | double |
unsigned short | float |
short | float |
unsigned char | float |
The output array will be of the same type as input.
C Interface for power.
[out] | out | will contain lhs raised to power rhs |
[in] | lhs | is base |
[in] | rhs | is exponent |
[in] | batch | specifies if operations need to be performed in batch mode |
C++ Interface for power.
Computes the value of lhs
raised to the power of rhs
. The inputs can be two arrays or an array and a scalar.
[in] | lhs | is base |
[in] | rhs | is exponent |
lhs
raised to power rhs
C++ Interface for power.
Computes the value of lhs
raised to the power of rhs
. The inputs can be two arrays or an array and a scalar.
[in] | lhs | is base |
[in] | rhs | is exponent |
lhs
raised to power rhs
C++ Interface for power.
Computes the value of lhs
raised to the power of rhs
. The inputs can be two arrays or an array and a scalar.
[in] | lhs | is base |
[in] | rhs | is exponent |
lhs
raised to power rhs