A high-performance general-purpose compute library

Functions

AFAPI af_err af_pow (af_array *out, const af_array lhs, const af_array rhs, const bool batch)
 C Interface to raise a base to a power (or exponent).
 
AFAPI array pow (const array &base, const array &exponent)
 C++ Interface to raise a base to a power (or exponent).
 
AFAPI array pow (const array &base, const double exponent)
 C++ Interface to raise a base to a power (or exponent).
 
AFAPI array pow (const double base, const array &exponent)
 C++ Interface to raise a base to a power (or exponent).
 
AFAPI array pow2 (const array &in)
 C++ Interface to raise 2 to a power (or exponent).
 

Detailed Description

Raise a base to a power (or exponent).

Function Documentation

◆ af_pow()

AFAPI af_err af_pow ( af_array * out,
const af_array lhs,
const af_array rhs,
const bool batch )

C Interface to raise a base to a power (or exponent).

Parameters
[out]outlhs raised to the power of rhs
[in]lhsbase
[in]rhsexponent
[in]batchbatch mode
Returns
AF_SUCCESS, if function returns successfully, else an af_err code is given

◆ pow() [1/3]

AFAPI array pow ( const array & base,
const array & exponent )

C++ Interface to raise a base to a power (or exponent).

Computes the value of base raised to the power of exponent. The inputs can be two arrays or an array and a scalar.

Parameters
[in]basebase
[in]exponentexponent
Returns
base raised to the power of exponent

◆ pow() [2/3]

AFAPI array pow ( const array & base,
const double exponent )

C++ Interface to raise a base to a power (or exponent).

Computes the value of base raised to the power of exponent. The inputs can be two arrays or an array and a scalar.

Parameters
[in]basebase
[in]exponentexponent
Returns
base raised to the power of exponent

◆ pow() [3/3]

AFAPI array pow ( const double base,
const array & exponent )

C++ Interface to raise a base to a power (or exponent).

Computes the value of base raised to the power of exponent. The inputs can be two arrays or an array and a scalar.

Parameters
[in]basebase
[in]exponentexponent
Returns
base raised to the power of exponent

◆ pow2()

AFAPI array pow2 ( const array & in)

C++ Interface to raise 2 to a power (or exponent).

Parameters
[in]inpower
Returns
2 raised to the power