Batch of complex numbers
-
template<class T, class A>
class batch<std::complex<T>, A> : public types::simd_register<T, A>, public xsimd::types::integral_only_operators<T, A> batch of complex values.
Abstract representation of an SIMD register for complex values.
- Template Parameters:
T – the type of the underlying values.
A – the architecture this batch is tied too.
Public Types
-
using batch_bool_type = batch_bool<T, A>
Associated batch type used to represented logical operations on this batch.
Public Functions
-
XSIMD_INLINE batch() = default
Create a batch initialized with undefined values.
- XSIMD_INLINE batch< T, A > broadcast (U val) noexcept
Equivalent to batch::batch(T val).
- XSIMD_INLINE batch< T, A > load_aligned (U const *mem) noexcept
Loading from aligned memory.
May involve a conversion if
U
is different fromT
.
- XSIMD_INLINE batch< T, A > load_unaligned (U const *mem) noexcept
Loading from unaligned memory.
May involve a conversion if
U
is different fromT
.
- XSIMD_INLINE batch< T, A > load (U const *mem, aligned_mode) noexcept
Equivalent to batch::load_aligned()
- XSIMD_INLINE batch< T, A > load (U const *mem, unaligned_mode) noexcept
Equivalent to batch::load_unaligned()
- XSIMD_INLINE batch< T, A > gather (U const *src, batch< V, A > const &index) noexcept
Create a new batch gathering elements starting at address
src
and offset by each element inindex
.If
T
is not of the same size asU
, astatic_cast
is performed at element gather time.
- XSIMD_INLINE void scatter (U *dst, batch< V, arch_type > const &index) const noexcept
Scatter elements from this batch into addresses starting at
dst
and offset by each element inindex
.If
T
is not of the same size asU
, astatic_cast
is performed at element scatter time.
Public Static Attributes
-
static std::size_t size = real_batch::size
Number of complex elements in this batch.
Friends
- inline friend XSIMD_INLINE batch operator+ (batch const &self, batch const &other) noexcept
Shorthand for xsimd::add()
- inline friend XSIMD_INLINE batch operator- (batch const &self, batch const &other) noexcept
Shorthand for xsimd::sub()
- inline friend XSIMD_INLINE batch operator* (batch const &self, batch const &other) noexcept
Shorthand for xsimd::mul()
- inline friend XSIMD_INLINE batch operator/ (batch const &self, batch const &other) noexcept
Shorthand for xsimd::div()
- inline friend XSIMD_INLINE batch operator& (batch const &self, batch const &other) noexcept
Shorthand for xsimd::bitwise_and()
- inline friend XSIMD_INLINE batch operator| (batch const &self, batch const &other) noexcept
Shorthand for xsimd::bitwise_or()
- inline friend XSIMD_INLINE batch operator^ (batch const &self, batch const &other) noexcept
Shorthand for xsimd::bitwise_xor()
- inline friend XSIMD_INLINE batch operator&& (batch const &self, batch const &other) noexcept
Shorthand for xsimd::logical_and()
- inline friend XSIMD_INLINE batch operator|| (batch const &self, batch const &other) noexcept
Shorthand for xsimd::logical_or()
Operations specific to batches of complex numbers
XTL complex support
If the preprocessor token XSIMD_ENABLE_XTL_COMPLEX
is defined, xsimd
provides constructors of xsimd::batch< std::complex< T >, A >
from
xtl::xcomplex
, similar to those for std::complex
. This requires xtl
to be installed.