AI Engine API User Guide (AIE) 2023.2
|
Bitwise logical operations. More...
Overview
Bitwise logical operations.
Functions | |
template<Vector Vec1, Vector Vec2> requires (is_same_vector_v<Vec1, Vec2> && (!detail::is_complex_v<typename Vec1::value_type>) && (!detail::is_floating_point_v<typename Vec1::value_type>)) | |
auto | aie::bit_and (const Vec1 &v1, const Vec2 &v2) -> aie_dm_resource_remove_t< Vec1 > |
Returns a vector with the bit-wise AND of the elements of the two input vectors. | |
template<Elem E, Vector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type> && (!detail::is_complex_v<typename Vec::value_type>) && (!detail::is_floating_point_v<typename Vec::value_type>)) | |
auto | aie::bit_and (E a, const Vec &v) -> aie_dm_resource_remove_t< Vec > |
Returns a vector with the bit-wise AND of a value and all the elements of the input vector. | |
template<Vector Vec> requires ((!detail::is_complex_v<typename Vec::value_type>) && (!detail::is_floating_point_v<typename Vec::value_type>)) | |
auto | aie::bit_not (const Vec &v) -> aie_dm_resource_remove_t< Vec > |
Returns a vector with the bit-wise NEG of the elements of the input vector. | |
template<Vector Vec1, Vector Vec2> requires (is_same_vector_v<Vec1, Vec2> && (!detail::is_complex_v<typename Vec1::value_type>) && (!detail::is_floating_point_v<typename Vec1::value_type>)) | |
auto | aie::bit_or (const Vec1 &v1, const Vec2 &v2) -> aie_dm_resource_remove_t< Vec1 > |
Returns a vector with the bit-wise OR of the elements of the two input vectors. | |
template<Elem E, Vector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type> && (!detail::is_complex_v<typename Vec::value_type>) && (!detail::is_floating_point_v<typename Vec::value_type>)) | |
auto | aie::bit_or (E a, const Vec &v) -> aie_dm_resource_remove_t< Vec > |
Returns a vector with the bit-wise OR of a value and all the elements of the input vector. | |
template<Vector Vec1, Vector Vec2> requires (is_same_vector_v<Vec1, Vec2> && (!detail::is_complex_v<typename Vec1::value_type>) && (!detail::is_floating_point_v<typename Vec1::value_type>)) | |
auto | aie::bit_xor (const Vec1 &v1, const Vec2 &v2) -> aie_dm_resource_remove_t< Vec1 > |
Returns a vector with the bit-wise XOR of the elements of the two input vectors. | |
template<Elem E, Vector Vec> requires (is_valid_elem_op_v<E, typename Vec::value_type> && (!detail::is_complex_v<typename Vec::value_type>) && (!detail::is_floating_point_v<typename Vec::value_type>)) | |
auto | aie::bit_xor (E a, const Vec &v) -> aie_dm_resource_remove_t< Vec > |
Returns a vector with the bit-wise XOR of a value and all the elements of the input vector. | |
template<Vector Vec> | |
constexpr auto | aie::downshift (const Vec &v, unsigned shift) -> aie_dm_resource_remove_t< Vec > |
Returns a vector with all values arithmetically downshifted by specified number of bits. | |
template<Vector Vec> | |
constexpr auto | aie::logical_downshift (const Vec &v, unsigned shift) -> aie_dm_resource_remove_t< Vec > |
Returns a vector with all values logically downshifted by specified number of bits. | |
template<Vector Vec> | |
constexpr auto | aie::upshift (const Vec &v, unsigned shift) -> aie_dm_resource_remove_t< Vec > |
Returns a vector with all values upshifted by specified number of bits. | |
Function Documentation
◆ bit_and() [1/2]
requires (is_same_vector_v<Vec1, Vec2> && (!detail::is_complex_v<typename Vec1::value_type>) && (!detail::is_floating_point_v<typename Vec1::value_type>))
auto aie::bit_and | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) | -> aie_dm_resource_remove_t<Vec1> |
Returns a vector with the bit-wise AND of the elements of the two input vectors.
The vectors must have the same type and size.
- Note
- This is a scalar operation on AIE
◆ bit_and() [2/2]
requires (is_valid_elem_op_v<E, typename Vec::value_type> && (!detail::is_complex_v<typename Vec::value_type>) && (!detail::is_floating_point_v<typename Vec::value_type>))
auto aie::bit_and | ( | E | a, |
const Vec & | v | ||
) | -> aie_dm_resource_remove_t<Vec> |
Returns a vector with the bit-wise AND of a value and all the elements of the input vector.
The type of the value and the type of the vector elements must be the same.
- Note
- This is a scalar operation on AIE
◆ bit_not()
requires ((!detail::is_complex_v<typename Vec::value_type>) && (!detail::is_floating_point_v<typename Vec::value_type>))
auto aie::bit_not | ( | const Vec & | v | ) | -> aie_dm_resource_remove_t<Vec> |
Returns a vector with the bit-wise NEG of the elements of the input vector.
- Note
- This is a scalar operation on AIE
- Parameters
-
v Input vector. The type must meet Vector.
◆ bit_or() [1/2]
requires (is_same_vector_v<Vec1, Vec2> && (!detail::is_complex_v<typename Vec1::value_type>) && (!detail::is_floating_point_v<typename Vec1::value_type>))
auto aie::bit_or | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) | -> aie_dm_resource_remove_t<Vec1> |
Returns a vector with the bit-wise OR of the elements of the two input vectors.
The vectors must have the same type and size.
- Note
- This is a scalar operation on AIE
◆ bit_or() [2/2]
requires (is_valid_elem_op_v<E, typename Vec::value_type> && (!detail::is_complex_v<typename Vec::value_type>) && (!detail::is_floating_point_v<typename Vec::value_type>))
auto aie::bit_or | ( | E | a, |
const Vec & | v | ||
) | -> aie_dm_resource_remove_t<Vec> |
Returns a vector with the bit-wise OR of a value and all the elements of the input vector.
The type of the value and the type of the vector elements must be the same.
- Note
- This is a scalar operation on AIE
◆ bit_xor() [1/2]
requires (is_same_vector_v<Vec1, Vec2> && (!detail::is_complex_v<typename Vec1::value_type>) && (!detail::is_floating_point_v<typename Vec1::value_type>))
auto aie::bit_xor | ( | const Vec1 & | v1, |
const Vec2 & | v2 | ||
) | -> aie_dm_resource_remove_t<Vec1> |
Returns a vector with the bit-wise XOR of the elements of the two input vectors.
The vectors must have the same type and size.
- Note
- This is a scalar operation on AIE
◆ bit_xor() [2/2]
requires (is_valid_elem_op_v<E, typename Vec::value_type> && (!detail::is_complex_v<typename Vec::value_type>) && (!detail::is_floating_point_v<typename Vec::value_type>))
auto aie::bit_xor | ( | E | a, |
const Vec & | v | ||
) | -> aie_dm_resource_remove_t<Vec> |
Returns a vector with the bit-wise XOR of a value and all the elements of the input vector.
The type of the value and the type of the vector elements must be the same.
- Note
- This is a scalar operation on AIE
◆ downshift()
|
constexpr |
Returns a vector with all values arithmetically downshifted by specified number of bits.
- Parameters
-
v Input vector shift Number of bits to downshift by
◆ logical_downshift()
|
constexpr |
Returns a vector with all values logically downshifted by specified number of bits.
- Parameters
-
v Input vector shift Number of bits to downshift by
◆ upshift()
|
constexpr |
Returns a vector with all values upshifted by specified number of bits.
- Parameters
-
v Input vector shift Number of bits to upshift by