simdpp::to_int64
From libsimdpp-docs
< conv
template<unsigned N, class E>
int64<N, _DETAIL_> to_int64( Vec<N,E> a ); |
||
Converts elements within a vector to 64-bit signed values.
The implementation behaves as if the following set of overloads is provided:
Vec
|
---|
int8 |
uint8 |
int16 |
uint16 |
int32 |
uint32 |
int64 |
uint64 |
float32
(available only if SIMDPP_HAS_FLOAT32_TO_INT64_CONVERSION evaluates to nonzero value) |
float64
(available only if SIMDPP_HAS_FLOAT64_TO_INT64_CONVERSION evaluates to nonzero value) |
The return type is a vector expression.
The conversion rules are as follows:
- 32-bit and narrower signed integers are sign-extended to 64 bits.
- 32-bit and narrower unsigned integers are zero-extended to 64 bits.
- if floating-point value can not be represented in 64-bit signed integer, the behavior depends on the instruction set used.
Parameters[edit]
a | - | vector to convert |
Return value[edit]
A vector expression evaluating to vector with values converted to 64-bit signed integers.
Equivalent operation[edit]
r0 = int64_t(a0) ... rN = int64_t(aN)
See also[edit]
converts vector elements to 64-bit unsigned integers (function template) |