Batch of complex numbers

template<class T, class A>
class batch<std::complex<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 value_type = std::complex<T>

Type of the complex elements within this batch.

using real_batch = batch<T, A>

Type of the scalar elements within this batch.

using arch_type = A

SIMD Architecture abstracted by this batch.

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.

Public Static Attributes

static constexpr 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()

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.