AI Engine API User Guide (AIE) 2023.2
|
Modules | |
Floating-point Scalar Operations | |
Functions | |
template<ComplexElem E> | |
constexpr auto | aie::abs_square (const E &v) -> detail::utils::get_complex_component_type_t< operand_base_type_t< E > > |
Compute the absolute square of a scalar complex value. | |
template<RealVector Vec> requires (arch::is(arch::AIE)) | |
auto | aie::cos (const Vec &v) -> aie_dm_resource_remove_t< Vec > |
Performs a cosine operation on all elements in the input vector. | |
template<typename E > requires (arch::is(arch::AIE) && (RealElem<E> || std::is_integral_v<E>)) | |
auto | aie::cos (E a) |
Performs a cosine operation on a single value. | |
template<unsigned Elems> requires (arch::is(arch::AIE)) | |
accum< accfloat, Elems > | aie::inv (const accum< accfloat, Elems > &v) |
template<Vector Vec> | |
auto | aie::inv (const Vec &v) -> aie_dm_resource_remove_t< Vec > |
template<RealElem E> | |
auto | aie::inv (E a) |
template<unsigned Elems> requires (arch::is(arch::AIE)) | |
accum< accfloat, Elems > | aie::invsqrt (const accum< accfloat, Elems > &v) |
template<Vector Vec> | |
auto | aie::invsqrt (const Vec &v) -> aie_dm_resource_remove_t< Vec > |
template<Elem E> | |
auto | aie::invsqrt (E a) |
template<RealVector Vec> requires (arch::is(arch::AIE)) | |
auto | aie::sin (const Vec &v) -> aie_dm_resource_remove_t< Vec > |
Performs a sine operation on all elements in the input vector. | |
template<typename E > requires (arch::is(arch::AIE) && (RealElem<E> || std::is_integral_v<E>)) | |
auto | aie::sin (E a) |
Performs a sine operation on a single value. | |
template<RealVector Vec> requires (arch::is(arch::AIE)) | |
auto | aie::sincos (const Vec &v) -> std::pair< aie_dm_resource_remove_t< Vec >, aie_dm_resource_remove_t< Vec > > |
Same as sin and cos, but performs both operations and returns a std::pair of vectors of result values. | |
template<typename E > requires (arch::is(arch::AIE) && (RealElem<E> || std::is_integral_v<E>)) | |
auto | aie::sincos (E a) |
Performs both sin and cos, and returns both values as an std::pair (sin first, then cos). | |
template<RealVector Vec> requires (arch::is(arch::AIE)) | |
auto | aie::sincos_complex (const Vec &v) -> vector< std::conditional_t< Vec::is_floating_point(), cfloat, cint16 >, Vec::size()> |
Same as sincos, but returns both values as the real and imaginary parts in a vector of complex values (cos in the real part, sin in the imaginary). | |
template<typename E > requires (arch::is(arch::AIE) && (RealElem<E> || std::is_integral_v<E>)) | |
auto | aie::sincos_complex (E a) -> std::conditional_t< detail::is_floating_point_v< operand_base_type_t< E > >, cfloat, cint16 > |
Same as sincos, but returns both values as the real and imaginary parts of a complex number (cos in the real part, sin in the imaginary part). | |
template<unsigned Elems> requires (arch::is(arch::AIE)) | |
accum< accfloat, Elems > | aie::sqrt (const accum< accfloat, Elems > &v) |
template<Vector Vec> | |
auto | aie::sqrt (const Vec &v) -> aie_dm_resource_remove_t< Vec > |
template<Elem E> | |
auto | aie::sqrt (E a) |
|
constexpr |
Compute the absolute square of a scalar complex value.
v | Input complex scalar |
auto aie::cos | ( | const Vec & | v | ) | -> aie_dm_resource_remove_t<Vec> |
Performs a cosine operation on all elements in the input vector.
The input vector can either be of float values in radians or integers. The floating-point range is [-Pi, Pi]. Integer values are handled as a fixed-point input value in Q1.31 format scaled with 1/Pi (input value 2^31 corresponds to Pi). In this case only the upper 20-bit of the input value are used.
According to input type, returns a vector of float or of signed Q.15 fixed-point format.
v | Input vector. The type must meet RealVector. |
auto aie::cos | ( | E | a | ) |
Performs a cosine operation on a single value.
The input can either be a float value in radians or an integer. The floating-point range is [-Pi, Pi]. Integer values are handled as a fixed-point input value in Q1.31 format scaled with 1/Pi (input value 2^31 corresponds to Pi). In this case only the upper 20-bit of the input value are used.
According to input type, the returned value is either a float or a signed Q.15 fixed-point format.
a | Value. The type must meet RealElem. |
auto aie::inv | ( | const Vec & | v | ) | -> aie_dm_resource_remove_t<Vec> |
auto aie::inv | ( | E | a | ) |
auto aie::invsqrt | ( | const Vec & | v | ) | -> aie_dm_resource_remove_t<Vec> |
auto aie::invsqrt | ( | E | a | ) |
auto aie::sin | ( | const Vec & | v | ) | -> aie_dm_resource_remove_t<Vec> |
Performs a sine operation on all elements in the input vector.
The input vector can either be of float values in radians or integers. The floating-point range is [-Pi, Pi]. Integer values are handled as a fixed-point input value in Q1.31 format scaled with 1/Pi (input value 2^31 corresponds to Pi). In this case only the upper 20-bit of the input value are used.
According to input type, returns a vector of float or of signed Q.15 fixed-point format.
v | Input vector. The type must meet RealVector. |
auto aie::sin | ( | E | a | ) |
Performs a sine operation on a single value.
The input can either be a float value in radians or an integer. The floating-point range is [-Pi, Pi]. Integer values are handled as a fixed-point input value in Q1.31 format scaled with 1/Pi (input value 2^31 corresponds to Pi). In this case only the upper 20-bit of the input value are used.
a | Value. The type must meet RealElem. |
auto aie::sincos | ( | const Vec & | v | ) | -> std::pair<aie_dm_resource_remove_t<Vec>, aie_dm_resource_remove_t<Vec>> |
Same as sin and cos, but performs both operations and returns a std::pair of vectors of result values.
The first vector contains the sine values, the second contains the cosine values
According to input type, returns a pair of vectors of float or of signed Q.15 fixed-point format.
v | Input vector. The type must meet RealVector. |
auto aie::sincos | ( | E | a | ) |
Performs both sin and cos, and returns both values as an std::pair (sin first, then cos).
The input can either be a float value in radians or an integer. The floating-point range is [-Pi, Pi]. Integer values are handled as a fixed-point input value in Q1.31 format scaled with 1/Pi (input value 2^31 corresponds to Pi). In this case only the upper 20-bit of the input value are used.
According to input type, the returned values are either float or signed Q.15 fixed-point format.
a | Value. The type must meet RealElem. |
auto aie::sincos_complex | ( | const Vec & | v | ) | -> vector<std::conditional_t<Vec::is_floating_point(), cfloat, cint16>, Vec::size()> |
Same as sincos, but returns both values as the real and imaginary parts in a vector of complex values (cos in the real part, sin in the imaginary).
According to input type, returns a vector of float or of signed Q.15 fixed-point format.
v | Input vector. The type must meet RealVector. |
auto aie::sincos_complex | ( | E | a | ) | -> std::conditional_t<detail::is_floating_point_v<operand_base_type_t<E>>, cfloat, cint16> |
Same as sincos, but returns both values as the real and imaginary parts of a complex number (cos in the real part, sin in the imaginary part).
Each part of the returned complex number is either a float or a signed Q.15 fixed-point format.
a | Value. The type must meet RealElem. |
auto aie::sqrt | ( | const Vec & | v | ) | -> aie_dm_resource_remove_t<Vec> |
auto aie::sqrt | ( | E | a | ) |