AI Engine API User Guide (AIE) 2023.2
|
Vector comparison operations. More...
Vector comparison operations.
Functions | |
template<Vector Vec, Elem E> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::eq (const Vec &v, E a) |
Compares a value with the elements of the input vector and returns a mask that says what elements in the vector are equal to the value. | |
template<Vector Vec1, Vector Vec2> requires (is_same_vector_v<Vec1, Vec2>) | |
mask< Vec1::size()> | aie::eq (const Vec1 &v1, const Vec2 &v2) |
Compares the elements of the two input vectors and returns a mask that says what elements are equal. | |
template<Elem E, Vector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::eq (E a, const Vec &v) |
Compares a value with the elements of the input vector and returns a mask that says what elements in the vector are equal to the value. | |
template<Vector Vec1, Vector Vec2> requires (is_same_vector_v<Vec1, Vec2>) | |
constexpr bool | aie::equal (const Vec1 &v1, const Vec2 &v2) |
Return whether all the elements of the two input vectors are equal. | |
template<RealVector Vec, RealElem E> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::ge (const Vec &v, E a) |
Compares the elements of the input vector with a value and returns a mask that says if the elements in the vector are greater or equal than the value. | |
template<RealVector Vec1, RealVector Vec2> requires (is_same_vector_v<Vec1, Vec2>) | |
mask< Vec1::size()> | aie::ge (const Vec1 &v1, const Vec2 &v2) |
Compares the elements of the two input vectors and returns a mask that says what elements from the first vector are greater or equal than the corresponding elements in the second vector. | |
template<RealElem E, RealVector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::ge (E a, const Vec &v) |
Compares a value with the elements of the input vector and returns a mask that says if the value is greater or equal than the elements in the vector. | |
template<RealVector Vec, RealElem E> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::gt (const Vec &v, E a) |
Compares the elements of the input vector with a value and returns a mask that says if the elements in the vector are greater than the value. | |
template<RealVector Vec1, RealVector Vec2> requires (is_same_vector_v<Vec1, Vec2>) | |
mask< Vec1::size()> | aie::gt (const Vec1 &v1, const Vec2 &v2) |
Compares the elements of the two input vectors and returns a mask that says what elements from the first vector are greater than the corresponding elements in the second vector. | |
template<RealElem E, RealVector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::gt (E a, const Vec &v) |
Compares a value with the elements of the input vector and returns a mask that says if the value is greater than the elements in the vector. | |
template<RealVector Vec, RealElem E> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::le (const Vec &v, E a) |
Compares the elements of the input vector with a value and returns a mask that says if the elements in the vector are smaller or equal than the value. | |
template<RealVector Vec1, RealVector Vec2> requires (is_same_vector_v<Vec1, Vec2>) | |
mask< Vec1::size()> | aie::le (const Vec1 &v1, const Vec2 &v2) |
Compares the elements of the two input vectors and returns a mask that says what elements from the first vector are smaller or equal than the corresponding elements in the second vector. | |
template<RealElem E, RealVector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::le (E a, const Vec &v) |
Compares a value with the elements of the input vector and returns a mask that says if the value is smaller or equal than the elements in the vector. | |
template<RealVector Vec, RealElem E> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::lt (const Vec &v, E a) |
Compares the elements of the input vector with a value and returns a mask that says if the elements in the vector are smaller than the value. | |
template<RealVector Vec1, RealVector Vec2> requires (is_same_vector_v<Vec1, Vec2>) | |
mask< Vec1::size()> | aie::lt (const Vec1 &v1, const Vec2 &v2) |
Compares the elements of the two input vectors and returns a mask that says what elements from the first vector are smaller than the corresponding elements in the second vector. | |
template<RealElem E, RealVector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::lt (E a, const Vec &v) |
Compares a value with the elements of the input vector and returns a mask that says if the value is smaller than the elements in the vector. | |
template<RealVector Vec, RealElem E> requires (is_valid_elem_op_v<typename Vec::value_type, E>) | |
auto | aie::max (const Vec &v, E a) -> aie_dm_resource_remove_t< Vec > |
Compares the elements of the input vector with a value and returns a vector with the maximum values. | |
template<RealVector Vec, RealElem E> requires (arch::is(arch::AIE_ML) && is_valid_elem_op_v<typename Vec::value_type, E>) | |
auto | aie::max (const Vec &v, E a, bool sign) -> aie_dm_resource_remove_t< Vec > |
Compares the elements of the input vector with a value and returns a vector with the maximum values. | |
template<RealVector Vec1, RealVector Vec2> requires (is_same_vector_v<Vec1, Vec2>) | |
auto | aie::max (const Vec1 &v1, const Vec2 &v2) -> aie_dm_resource_remove_t< Vec1 > |
Compares the elements of the two input vectors and returns a vector with the maximum values. | |
template<RealVector Vec1, RealVector Vec2> requires (arch::is(arch::AIE_ML) && is_same_vector_v<Vec1, Vec2>) | |
auto | aie::max (const Vec1 &v1, const Vec2 &v2, bool sign) -> aie_dm_resource_remove_t< Vec1 > |
Compares the elements of the two input vectors and returns a vector with the maximum values. | |
template<RealElem E, RealVector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
auto | aie::max (E a, const Vec &v) -> aie_dm_resource_remove_t< Vec > |
Compares a value with the elements of the input vector and returns a vector with the maximum values. | |
template<RealElem E, RealVector Vec> requires (arch::is(arch::AIE_ML) && is_valid_elem_op_v<E, typename Vec::value_type>) | |
auto | aie::max (E a, const Vec &v, bool sign) -> aie_dm_resource_remove_t< Vec > |
Compares a value with the elements of the input vector and returns a vector with the maximum values. | |
template<RealVector Vec, RealElem E> requires (is_valid_elem_op_v<typename Vec::value_type, E>) | |
auto | aie::maxdiff (const Vec &v, E a) -> aie_dm_resource_remove_t< Vec > |
Compares the elements of the input vector with a value and returns a vector whose values are their difference if it is positive, or zero otherwise. | |
template<RealVector Vec, RealElem E> requires (arch::is(arch::AIE_ML) && is_valid_elem_op_v<typename Vec::value_type, E>) | |
auto | aie::maxdiff (const Vec &v, E a, bool sign) -> aie_dm_resource_remove_t< Vec > |
Compares the elements of the input vector with a value and returns a vector whose values are their difference if it is positive, or zero otherwise. | |
template<RealVector Vec1, RealVector Vec2> requires (is_same_vector_v<Vec1, Vec2>) | |
auto | aie::maxdiff (const Vec1 &v1, const Vec2 &v2) -> aie_dm_resource_remove_t< Vec1 > |
Compares the elements of the two input vectors and returns a vector whose values are their difference if it is positive, or zero otherwise. | |
template<RealVector Vec1, RealVector Vec2> requires (arch::is(arch::AIE_ML) && is_same_vector_v<Vec1, Vec2>) | |
auto | aie::maxdiff (const Vec1 &v1, const Vec2 &v2, bool sign) -> aie_dm_resource_remove_t< Vec1 > |
Compares the elements of the two input vectors and returns a vector whose values are their difference if it is positive, or zero otherwise. | |
template<RealElem E, RealVector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
auto | aie::maxdiff (E a, const Vec &v) -> aie_dm_resource_remove_t< Vec > |
Compares a value with the elements of the input vector and returns a vector whose values are their difference if it is positive, or zero otherwise. | |
template<RealElem E, RealVector Vec> requires (arch::is(arch::AIE_ML) && is_valid_elem_op_v<E, typename Vec::value_type>) | |
auto | aie::maxdiff (E a, const Vec &v, bool sign) -> aie_dm_resource_remove_t< Vec > |
Compares a value with the elements of the input vector and returns a vector whose values are their difference if it is positive, or zero otherwise. | |
template<RealVector Vec, RealElem E> requires (is_valid_elem_op_v<typename Vec::value_type, E>) | |
auto | aie::min (const Vec &v, E a) -> aie_dm_resource_remove_t< Vec > |
Compares the elements of the input vector with a value and returns a vector with the minimum values. | |
template<RealVector Vec, RealElem E> requires (arch::is(arch::AIE_ML) && is_valid_elem_op_v<typename Vec::value_type, E>) | |
auto | aie::min (const Vec &v, E a, bool sign) -> aie_dm_resource_remove_t< Vec > |
Compares the elements of the input vector with a value and returns a vector with the minimum values. | |
template<RealVector Vec1, RealVector Vec2> requires (is_same_vector_v<Vec1, Vec2>) | |
auto | aie::min (const Vec1 &v1, const Vec2 &v2) -> aie_dm_resource_remove_t< Vec1 > |
Compares the elements of the two input vectors and returns a vector with the minimum values. | |
template<RealVector Vec1, RealVector Vec2> requires (arch::is(arch::AIE_ML) && is_same_vector_v<Vec1, Vec2>) | |
auto | aie::min (const Vec1 &v1, const Vec2 &v2, bool sign) -> aie_dm_resource_remove_t< Vec1 > |
Compares the elements of the two input vectors and returns a vector with the minimum values. | |
template<RealElem E, RealVector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
auto | aie::min (E a, const Vec &v) -> aie_dm_resource_remove_t< Vec > |
Compares a value with the elements of the input vector and returns a vector with the minimum values. | |
template<RealElem E, RealVector Vec> requires (arch::is(arch::AIE_ML) && is_valid_elem_op_v<E, typename Vec::value_type>) | |
auto | aie::min (E a, const Vec &v, bool sign) -> aie_dm_resource_remove_t< Vec > |
Compares a value with the elements of the input vector and returns a vector with the minimum values. | |
template<Vector Vec, Elem E> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::neq (const Vec &v, E a) |
Compares a value with the elements of the input vector and returns a mask that says what elements in the vector are different than the value. | |
template<Vector Vec1, Vector Vec2> requires (is_same_vector_v<Vec1, Vec2>) | |
mask< Vec1::size()> | aie::neq (const Vec1 &v1, const Vec2 &v2) |
Compares the elements of the two input vectors and returns a mask that says what elements are different. | |
template<Elem E, Vector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type>) | |
mask< Vec::size()> | aie::neq (E a, const Vec &v) |
Compares a value with the elements of the input vector and returns a mask that says what elements in the vector are different than the value. | |
template<Vector Vec1, Vector Vec2> requires (is_same_vector_v<Vec1, Vec2>) | |
constexpr bool | aie::not_equal (const Vec1 &v1, const Vec2 &v2) |
Return whether some elements in the two input vectors are not equal. | |
mask< Vec::size()> aie::eq | ( | const Vec & | v, |
E | a | ||
) |
Compares a value with the elements of the input vector and returns a mask that says what elements in the vector are equal to the value.
The type of the value and the type of the vector elements must be the same.
mask< Vec1::size()> aie::eq | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) |
Compares the elements of the two input vectors and returns a mask that says what elements are equal.
The vectors must have the same type and size.
mask< Vec::size()> aie::eq | ( | E | a, |
const Vec & | v | ||
) |
Compares a value with the elements of the input vector and returns a mask that says what elements in the vector are equal to the value.
The type of the value and the type of the vector elements must be the same.
|
constexpr |
Return whether all the elements of the two input vectors are equal.
The vectors must have the same type and size.
mask< Vec::size()> aie::ge | ( | const Vec & | v, |
E | a | ||
) |
Compares the elements of the input vector with a value and returns a mask that says if the elements in the vector are greater or equal than the value.
The type of the value and the type of the vector elements must be the same.
v | Input vector. The type must meet RealVector. |
a | Value. The type must meet RealElem. |
mask< Vec1::size()> aie::ge | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) |
Compares the elements of the two input vectors and returns a mask that says what elements from the first vector are greater or equal than the corresponding elements in the second vector.
The vectors must have the same type and size.
v1 | First input vector. The type must meet RealVector. |
v2 | Second input vector. The type must meet RealVector. |
mask< Vec::size()> aie::ge | ( | E | a, |
const Vec & | v | ||
) |
Compares a value with the elements of the input vector and returns a mask that says if the value is greater or equal than the elements in the vector.
The type of the value and the type of the vector elements must be the same.
a | Value. The type must meet RealElem. |
v | Input vector. The type must meet RealVector. |
mask< Vec::size()> aie::gt | ( | const Vec & | v, |
E | a | ||
) |
Compares the elements of the input vector with a value and returns a mask that says if the elements in the vector are greater than the value.
The type of the value and the type of the vector elements must be the same.
v | Input vector. The type must meet RealVector. |
a | Value. The type must meet RealElem. |
mask< Vec1::size()> aie::gt | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) |
Compares the elements of the two input vectors and returns a mask that says what elements from the first vector are greater than the corresponding elements in the second vector.
The vectors must have the same type and size.
v1 | First input vector. The type must meet RealVector. |
v2 | Second input vector. The type must meet RealVector. |
mask< Vec::size()> aie::gt | ( | E | a, |
const Vec & | v | ||
) |
Compares a value with the elements of the input vector and returns a mask that says if the value is greater than the elements in the vector.
The type of the value and the type of the vector elements must be the same.
a | Value. The type must meet RealElem. |
v | Input vector. The type must meet RealVector. |
mask< Vec::size()> aie::le | ( | const Vec & | v, |
E | a | ||
) |
Compares the elements of the input vector with a value and returns a mask that says if the elements in the vector are smaller or equal than the value.
The type of the value and the type of the vector elements must be the same.
v | Input vector. The type must meet RealVector. |
a | Value. The type must meet RealElem. |
mask< Vec1::size()> aie::le | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) |
Compares the elements of the two input vectors and returns a mask that says what elements from the first vector are smaller or equal than the corresponding elements in the second vector.
The vectors must have the same type and size.
v1 | First input vector. The type must meet RealVector. |
v2 | Second input vector. The type must meet RealVector. |
mask< Vec::size()> aie::le | ( | E | a, |
const Vec & | v | ||
) |
Compares a value with the elements of the input vector and returns a mask that says if the value is smaller or equal than the elements in the vector.
The type of the value and the type of the vector elements must be the same.
a | Value. The type must meet RealElem. |
v | Input vector. The type must meet RealVector. |
mask< Vec::size()> aie::lt | ( | const Vec & | v, |
E | a | ||
) |
Compares the elements of the input vector with a value and returns a mask that says if the elements in the vector are smaller than the value.
The type of the value and the type of the vector elements must be the same.
v | Input vector. The type must meet RealVector. |
a | Value. The type must meet RealElem. |
mask< Vec1::size()> aie::lt | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) |
Compares the elements of the two input vectors and returns a mask that says what elements from the first vector are smaller than the corresponding elements in the second vector.
The vectors must have the same type and size.
v1 | First input vector. The type must meet RealVector. |
v2 | Second input vector. The type must meet RealVector. |
mask< Vec::size()> aie::lt | ( | E | a, |
const Vec & | v | ||
) |
Compares a value with the elements of the input vector and returns a mask that says if the value is smaller than the elements in the vector.
The type of the value and the type of the vector elements must be the same.
a | Value. The type must meet RealElem. |
v | Input vector. The type must meet RealVector. |
auto aie::max | ( | const Vec & | v, |
E | a | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares the elements of the input vector with a value and returns a vector with the maximum values.
The type of the value and the type of the vector elements must be the same.
v | Input vector. The type must meet RealVector. |
a | Value. The type must meet RealElem. |
auto aie::max | ( | const Vec & | v, |
E | a, | ||
bool | sign | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares the elements of the input vector with a value and returns a vector with the maximum values.
The type of the value and the type of the vector elements must be the same.
v | Input vector. The type must meet RealVector. |
a | Value. The type must meet RealElem. |
sign | Whether the inputs need to be interpreted as signed values. |
auto aie::max | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) | -> aie_dm_resource_remove_t<Vec1> |
Compares the elements of the two input vectors and returns a vector with the maximum values.
The vectors must have the same type and size.
v1 | First input vector. The type must meet RealVector. |
v2 | Second input vector. The type must meet RealVector. |
auto aie::max | ( | const Vec1 & | v1, |
const Vec2 & | v2, | ||
bool | sign | ||
) | -> aie_dm_resource_remove_t<Vec1> |
Compares the elements of the two input vectors and returns a vector with the maximum values.
The vectors must have the same type and size.
v1 | First input vector. The type must meet RealVector. |
v2 | Second input vector. The type must meet RealVector. |
sign | Whether the inputs need to be interpreted as signed values. |
auto aie::max | ( | E | a, |
const Vec & | v | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares a value with the elements of the input vector and returns a vector with the maximum values.
The type of the value and the type of the vector elements must be the same.
a | Value. The type must meet RealElem. |
v | Input vector. The type must meet RealVector. |
auto aie::max | ( | E | a, |
const Vec & | v, | ||
bool | sign | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares a value with the elements of the input vector and returns a vector with the maximum values.
The type of the value and the type of the vector elements must be the same.
a | Value. The type must meet RealElem. |
v | Input vector. The type must meet RealVector. |
sign | Whether the inputs need to be interpreted as signed values. |
auto aie::maxdiff | ( | const Vec & | v, |
E | a | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares the elements of the input vector with a value and returns a vector whose values are their difference if it is positive, or zero otherwise.
The type of the value and the type of the vector elements must be the same.
auto aie::maxdiff | ( | const Vec & | v, |
E | a, | ||
bool | sign | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares the elements of the input vector with a value and returns a vector whose values are their difference if it is positive, or zero otherwise.
The type of the value and the type of the vector elements must be the same.
auto aie::maxdiff | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) | -> aie_dm_resource_remove_t<Vec1> |
Compares the elements of the two input vectors and returns a vector whose values are their difference if it is positive, or zero otherwise.
The vectors must have the same type and size.
v1 | First input vector. The type must meet RealVector. |
v2 | Second input vector. The type must meet RealVector. |
auto aie::maxdiff | ( | const Vec1 & | v1, |
const Vec2 & | v2, | ||
bool | sign | ||
) | -> aie_dm_resource_remove_t<Vec1> |
Compares the elements of the two input vectors and returns a vector whose values are their difference if it is positive, or zero otherwise.
The vectors must have the same type and size.
v1 | First input vector. The type must meet RealVector. |
v2 | Second input vector. The type must meet RealVector. |
sign | Whether the inputs need to be interpreted as signed values. |
auto aie::maxdiff | ( | E | a, |
const Vec & | v | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares a value with the elements of the input vector and returns a vector whose values are their difference if it is positive, or zero otherwise.
The type of the value and the type of the vector elements must be the same.
auto aie::maxdiff | ( | E | a, |
const Vec & | v, | ||
bool | sign | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares a value with the elements of the input vector and returns a vector whose values are their difference if it is positive, or zero otherwise.
The type of the value and the type of the vector elements must be the same.
auto aie::min | ( | const Vec & | v, |
E | a | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares the elements of the input vector with a value and returns a vector with the minimum values.
The type of the value and the type of the vector elements must be the same.
v | Input vector. The type must meet RealVector. |
a | Value. The type must meet RealElem. |
auto aie::min | ( | const Vec & | v, |
E | a, | ||
bool | sign | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares the elements of the input vector with a value and returns a vector with the minimum values.
The type of the value and the type of the vector elements must be the same.
v | Input vector. The type must meet RealVector. |
a | Value. The type must meet RealElem. |
sign | Whether the inputs need to be interpreted as signed values. |
auto aie::min | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) | -> aie_dm_resource_remove_t<Vec1> |
Compares the elements of the two input vectors and returns a vector with the minimum values.
The vectors must have the same type and size.
v1 | First input vector. The type must meet RealVector. |
v2 | Second input vector. The type must meet RealVector. |
auto aie::min | ( | const Vec1 & | v1, |
const Vec2 & | v2, | ||
bool | sign | ||
) | -> aie_dm_resource_remove_t<Vec1> |
Compares the elements of the two input vectors and returns a vector with the minimum values.
The vectors must have the same type and size.
v1 | First input vector. The type must meet RealVector. |
v2 | Second input vector. The type must meet RealVector. |
sign | Whether the inputs need to be interpreted as signed values. |
auto aie::min | ( | E | a, |
const Vec & | v | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares a value with the elements of the input vector and returns a vector with the minimum values.
The type of the value and the type of the vector elements must be the same.
a | Value. The type must meet RealElem. |
v | Input vector. The type must meet RealVector. |
auto aie::min | ( | E | a, |
const Vec & | v, | ||
bool | sign | ||
) | -> aie_dm_resource_remove_t<Vec> |
Compares a value with the elements of the input vector and returns a vector with the minimum values.
The type of the value and the type of the vector elements must be the same.
a | Value. The type must meet RealElem. |
v | Input vector. The type must meet RealVector. |
sign | Whether the inputs need to be interpreted as signed values. |
mask< Vec::size()> aie::neq | ( | const Vec & | v, |
E | a | ||
) |
Compares a value with the elements of the input vector and returns a mask that says what elements in the vector are different than the value.
The type of the value and the type of the vector elements must be the same.
mask< Vec1::size()> aie::neq | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) |
Compares the elements of the two input vectors and returns a mask that says what elements are different.
The vectors must have the same type and size.
mask< Vec::size()> aie::neq | ( | E | a, |
const Vec & | v | ||
) |
Compares a value with the elements of the input vector and returns a mask that says what elements in the vector are different than the value.
The type of the value and the type of the vector elements must be the same.
|
constexpr |
Return whether some elements in the two input vectors are not equal.
The vectors must have the same type and size.