VCTR
Loading...
Searching...
No Matches
vctr::SplitComplexBase< ContainerTypeParam > Class Template Reference

A container for complex values that stores the real and imaginary parts in two separate, equally sized buffers instead of interleaved like std::complex does. More...

Public Types

using ContainerType = std::remove_const_t< ContainerTypeParam >
 The type of the containers storing the real and imaginary parts.
 
using value_type = std::remove_const_t< typename ContainerType::value_type >
 The real floating point type of the real and imaginary parts, e.g.
 
using ComplexType = std::complex< value_type >
 The std::complex type matching value_type, returned by the element access functions.
 
using element_type = std::remove_reference_t< decltype(*std::declval< ContainerType & >().data())>
 The element type of the underlying containers, which is const qualified for a SplitComplexSpan<const T>.
 

Public Member Functions

constexpr SplitComplexBase ()=default
 Creates a default constructed SplitComplexBase.
 
 SplitComplexBase (size_t size)
 Creates a SplitComplexBase with the given size and all values initialised to zero.
 
template<class Real , class Imag >
requires std::constructible_from<ContainerType, Real&&> && std::constructible_from<ContainerType, Imag&&>
constexpr SplitComplexBase (Real &&realPart, Imag &&imagPart)
 Creates a SplitComplexBase from a real and an imaginary part container of the same size.
 
template<class Other >
requires (! std::same_as<Other, ContainerTypeParam>) && std::constructible_from<ContainerType, Span<value_type>>
constexpr SplitComplexBase (SplitComplexBase< Other > &other)
 Creates a SplitComplexBase by converting from another one, e.g.
 
template<class Other >
requires (! std::same_as<Other, ContainerTypeParam>) && std::constructible_from<ContainerType, Span<const value_type>>
constexpr SplitComplexBase (const SplitComplexBase< Other > &other)
 Creates a SplitComplexBase by converting from another one, e.g.
 
template<is::anyVctrWithComplexFloatValueType Interleaved>
requires (! is::view<ContainerType>)
 SplitComplexBase (const Interleaved &interleaved)
 Creates a SplitComplexBase by deinterleaving a container of std::complex values.
 
template<is::expression RealExpression, is::expression ImagExpression>
constexpr SplitComplexBase (SplitComplexExpression< RealExpression, ImagExpression > &&expressions)
 Creates a split-complex container from a split-complex expression.
 
constexpr SplitComplexBase (const SplitComplexBase &)=default
 Copy constructor.
 
constexpr SplitComplexBase (SplitComplexBase &&)=default
 Move constructor.
 
constexpr SplitComplexBase & operator= (const SplitComplexBase &)=default
 Copy and move assignment of owning containers, e.g.
 
constexpr SplitComplexBase & operator= (SplitComplexBase &&)=default
 Copy and move assignment of owning containers, e.g.
 
constexpr SplitComplexBase & operator= (const SplitComplexBase &other)
 Copies the elements viewed by another span of the same type into the elements viewed by this span.
 
constexpr SplitComplexBase & operator= (SplitComplexBase &&other)
 Copy and move assignment of owning containers, e.g.
 
template<is::expression RealExpression, is::expression ImagExpression>
requires isMutable
constexpr void operator= (const SplitComplexExpression< RealExpression, ImagExpression > &expressions)
 Assigns the result of a split-complex expression to this container.
 
template<class Other >
requires isMutable
&&std::convertible_to< typename SplitComplexBase< Other >::value_type, value_type > constexpr void operator= (const SplitComplexBase< Other > &other)
 Copies the elements of another SplitComplexBase of identical size.
 
template<is::anyVctrWithComplexFloatValueType Interleaved>
requires isMutable
constexpr void operator= (const Interleaved &interleaved)
 Deinterleaves a container of std::complex values of identical size into this container.
 
constexpr auto real () const
 Returns a view of the real parts.
 
constexpr auto imag () const
 Returns a view of the imaginary parts.
 
constexpr auto real ()
 Returns a view of the real parts.
 
constexpr auto imag ()
 Returns a view of the imaginary parts.
 
constexpr ComplexType get (size_t i) const
 Returns a copy of the complex value at index i.
 
constexpr void set (size_t i, value_type realValue, value_type imagValue)
 Sets the real and imaginary part at index i.
 
constexpr void set (size_t i, ComplexType value)
 Sets the complex value at index i.
 
template<size_t startIdx>
constexpr auto subSpan ()
 Returns a SplitComplexSpan that views the elements from startIdx to the end.
 
template<size_t startIdx>
constexpr auto subSpan () const
 Returns a SplitComplexSpan that views the elements from startIdx to the end.
 
constexpr auto subSpan (size_t startIdx)
 Returns a SplitComplexSpan that views the elements from startIdx to the end.
 
constexpr auto subSpan (size_t startIdx) const
 Returns a SplitComplexSpan that views the elements from startIdx to the end.
 
template<size_t startIdx, size_t numElements>
constexpr auto subSpan ()
 Returns a SplitComplexSpan that views numElements elements, starting at startIdx.
 
template<size_t startIdx, size_t numElements>
constexpr auto subSpan () const
 Returns a SplitComplexSpan that views numElements elements, starting at startIdx.
 
constexpr auto subSpan (size_t startIdx, size_t numElements)
 Returns a SplitComplexSpan that views numElements elements, starting at startIdx.
 
constexpr auto subSpan (size_t startIdx, size_t numElements) const
 Returns a SplitComplexSpan that views numElements elements, starting at startIdx.
 
constexpr size_t size () const
 Returns the number of complex values.
 
constexpr bool empty () const
 Returns true if the container holds no values.
 
constexpr void resize (size_t newSize)
 Resizes both parts.
 
constexpr void fill (ComplexType value)
 Sets all elements to the given complex value.
 
constexpr void clear ()
 Removes all elements, like std::vector::clear.
 
template<is::anySplitComplexVectorOrExpression V>
requires isMutable
constexpr void operator*= (const V &v)
 Multiplies this by a split-complex vector or expression in place.
 
constexpr void operator*= (value_type c)
 Multiplies this by a real constant in place.
 
constexpr void operator*= (ComplexType c)
 Multiplies this by a complex constant in place.
 
template<is::anySplitComplexVectorOrExpression V>
requires isMutable
constexpr void operator/= (const V &v)
 Divides this by a split-complex vector or expression in place.
 
constexpr void operator/= (value_type c)
 Divides this by a real constant in place.
 
constexpr void operator/= (ComplexType c)
 Divides this by a complex constant in place.
 
template<is::anySplitComplexVectorOrExpression V>
requires isMutable
constexpr void operator+= (const V &v)
 Adds a split-complex vector or expression to this in place.
 
constexpr void operator+= (value_type c)
 Adds a real constant to the real parts in place.
 
constexpr void operator+= (ComplexType c)
 Adds a complex constant to this in place.
 
template<is::anySplitComplexVectorOrExpression V>
requires isMutable
constexpr void operator-= (const V &v)
 Subtracts a split-complex vector or expression from this in place.
 
constexpr void operator-= (value_type c)
 Subtracts a real constant from the real parts in place.
 
constexpr void operator-= (ComplexType c)
 Subtracts a complex constant from this in place.
 

Static Public Attributes

static constexpr bool isMutable = ! std::is_const_v<element_type>
 True if the elements can be modified through this container, false for a SplitComplexSpan<const T>.
 

Detailed Description

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
class vctr::SplitComplexBase< ContainerTypeParam >

A container for complex values that stores the real and imaginary parts in two separate, equally sized buffers instead of interleaved like std::complex does.

This layout allows element-wise complex math to be evaluated without any dependencies between neighbouring elements, which is ideal for SIMD vectorisation. The math operations are available as allocation free free functions, see SplitComplexMath.h.

The ContainerTypeParam decides about ownership and size: Use SplitComplexVector for an owning, resizable container, SplitComplexArray for an owning container with a compile time size and SplitComplexSpan for a non-owning view. Use SplitComplexSpan<const T> for a read-only view.

Interleaved std::complex containers convert to split-complex containers through the constructor and assignment operator. To convert a split-complex container or expression back into interleaved values, use vctr::realImagToComplex.

Template Parameters
ContainerTypeParamAny VCTR container holding a real floating point value_type, e.g. Vector<float>, Array<float, n>, Span<float> or Span<float, n>. A const qualifier on the container type is ignored, use a const value type to make the elements read-only.

Member Typedef Documentation

◆ ComplexType

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
using vctr::SplitComplexBase< ContainerTypeParam >::ComplexType = std::complex<value_type>

The std::complex type matching value_type, returned by the element access functions.

◆ ContainerType

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
using vctr::SplitComplexBase< ContainerTypeParam >::ContainerType = std::remove_const_t<ContainerTypeParam>

The type of the containers storing the real and imaginary parts.

This is ContainerTypeParam without a const qualifier, so the members stay assignable and movable even if a const container type is passed.

◆ element_type

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
using vctr::SplitComplexBase< ContainerTypeParam >::element_type = std::remove_reference_t<decltype (*std::declval<ContainerType&>().data())>

The element type of the underlying containers, which is const qualified for a SplitComplexSpan<const T>.

Note that ContainerType::value_type can't be used for this, as VctrBase strips the const qualifier from it.

◆ value_type

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
using vctr::SplitComplexBase< ContainerTypeParam >::value_type = std::remove_const_t<typename ContainerType::value_type>

The real floating point type of the real and imaginary parts, e.g.

float or double.

Constructor & Destructor Documentation

◆ SplitComplexBase() [1/9]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr vctr::SplitComplexBase< ContainerTypeParam >::SplitComplexBase ( )
constexprdefault

Creates a default constructed SplitComplexBase.

Only available for owning containers.

For a SplitComplexVector this creates an empty container, for a SplitComplexArray the elements are uninitialised, just like for a default constructed vctr::Array.

◆ SplitComplexBase() [2/9]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
vctr::SplitComplexBase< ContainerTypeParam >::SplitComplexBase ( size_t  size)
inlineexplicit

Creates a SplitComplexBase with the given size and all values initialised to zero.

Only available for a SplitComplexVector.

◆ SplitComplexBase() [3/9]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<class Real , class Imag >
requires std::constructible_from<ContainerType, Real&&> && std::constructible_from<ContainerType, Imag&&>
constexpr vctr::SplitComplexBase< ContainerTypeParam >::SplitComplexBase ( Real &&  realPart,
Imag &&  imagPart 
)
inlineconstexpr

Creates a SplitComplexBase from a real and an imaginary part container of the same size.

Owning containers copy the data, views refer to the passed containers.

◆ SplitComplexBase() [4/9]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<class Other >
requires (! std::same_as<Other, ContainerTypeParam>) && std::constructible_from<ContainerType, Span<value_type>>
constexpr vctr::SplitComplexBase< ContainerTypeParam >::SplitComplexBase ( SplitComplexBase< Other > &  other)
inlineconstexpr

Creates a SplitComplexBase by converting from another one, e.g.

a SplitComplexSpan viewing a SplitComplexVector, or a SplitComplexVector holding a copy of a SplitComplexSpan.

◆ SplitComplexBase() [5/9]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<class Other >
requires (! std::same_as<Other, ContainerTypeParam>) && std::constructible_from<ContainerType, Span<const value_type>>
constexpr vctr::SplitComplexBase< ContainerTypeParam >::SplitComplexBase ( const SplitComplexBase< Other > &  other)
inlineconstexpr

Creates a SplitComplexBase by converting from another one, e.g.

a SplitComplexSpan viewing a SplitComplexVector, or a SplitComplexVector holding a copy of a SplitComplexSpan.

◆ SplitComplexBase() [6/9]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<is::anyVctrWithComplexFloatValueType Interleaved>
requires (! is::view<ContainerType>)
vctr::SplitComplexBase< ContainerTypeParam >::SplitComplexBase ( const Interleaved &  interleaved)
inline

Creates a SplitComplexBase by deinterleaving a container of std::complex values.

Only available for owning containers.

Allows implicit conversion from an interleaved container. For containers with a compile time size, the size of the interleaved container has to match.

◆ SplitComplexBase() [7/9]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<is::expression RealExpression, is::expression ImagExpression>
constexpr vctr::SplitComplexBase< ContainerTypeParam >::SplitComplexBase ( SplitComplexExpression< RealExpression, ImagExpression > &&  expressions)
inlineconstexpr

Creates a split-complex container from a split-complex expression.

The real and imaginary component expressions are assigned to the corresponding parts of this container.

◆ SplitComplexBase() [8/9]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr vctr::SplitComplexBase< ContainerTypeParam >::SplitComplexBase ( const SplitComplexBase< ContainerTypeParam > &  )
constexprdefault

Copy constructor.

Owning containers copy the data, views refer to the same data as the other view.

◆ SplitComplexBase() [9/9]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr vctr::SplitComplexBase< ContainerTypeParam >::SplitComplexBase ( SplitComplexBase< ContainerTypeParam > &&  )
constexprdefault

Move constructor.

A SplitComplexVector takes over the buffers of the other container.

Member Function Documentation

◆ clear()

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::clear ( )
inlineconstexpr

Removes all elements, like std::vector::clear.

Only available for a SplitComplexVector.

To set all elements to zero while keeping the size, use fill ({}).

◆ empty()

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr bool vctr::SplitComplexBase< ContainerTypeParam >::empty ( ) const
inlineconstexpr

Returns true if the container holds no values.

◆ fill()

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::fill ( ComplexType  value)
inlineconstexpr

Sets all elements to the given complex value.

◆ get()

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr ComplexType vctr::SplitComplexBase< ContainerTypeParam >::get ( size_t  i) const
inlineconstexpr

Returns a copy of the complex value at index i.

Use set to modify it.

◆ imag() [1/2]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::imag ( )
inlineconstexpr

Returns a view of the imaginary parts.

It is mutable unless this is a SplitComplexSpan<const T>.

◆ imag() [2/2]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::imag ( ) const
inlineconstexpr

Returns a view of the imaginary parts.

See real() const for the constness of the returned view.

◆ operator*=() [1/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator*= ( ComplexType  c)
inlineconstexpr

Multiplies this by a complex constant in place.

◆ operator*=() [2/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<is::anySplitComplexVectorOrExpression V>
requires isMutable
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator*= ( const V &  v)
inlineconstexpr

Multiplies this by a split-complex vector or expression in place.

◆ operator*=() [3/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator*= ( value_type  c)
inlineconstexpr

Multiplies this by a real constant in place.

◆ operator+=() [1/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator+= ( ComplexType  c)
inlineconstexpr

Adds a complex constant to this in place.

◆ operator+=() [2/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<is::anySplitComplexVectorOrExpression V>
requires isMutable
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator+= ( const V &  v)
inlineconstexpr

Adds a split-complex vector or expression to this in place.

◆ operator+=() [3/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator+= ( value_type  c)
inlineconstexpr

Adds a real constant to the real parts in place.

◆ operator-=() [1/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator-= ( ComplexType  c)
inlineconstexpr

Subtracts a complex constant from this in place.

◆ operator-=() [2/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<is::anySplitComplexVectorOrExpression V>
requires isMutable
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator-= ( const V &  v)
inlineconstexpr

Subtracts a split-complex vector or expression from this in place.

◆ operator-=() [3/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator-= ( value_type  c)
inlineconstexpr

Subtracts a real constant from the real parts in place.

◆ operator/=() [1/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator/= ( ComplexType  c)
inlineconstexpr

Divides this by a complex constant in place.

◆ operator/=() [2/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<is::anySplitComplexVectorOrExpression V>
requires isMutable
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator/= ( const V &  v)
inlineconstexpr

Divides this by a split-complex vector or expression in place.

◆ operator/=() [3/3]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator/= ( value_type  c)
inlineconstexpr

Divides this by a real constant in place.

◆ operator=() [1/7]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<is::anyVctrWithComplexFloatValueType Interleaved>
requires isMutable
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator= ( const Interleaved &  interleaved)
inlineconstexpr

Deinterleaves a container of std::complex values of identical size into this container.

◆ operator=() [2/7]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr SplitComplexBase & vctr::SplitComplexBase< ContainerTypeParam >::operator= ( const SplitComplexBase< ContainerTypeParam > &  )
constexprdefault

Copy and move assignment of owning containers, e.g.

a SplitComplexVector or SplitComplexArray.

◆ operator=() [3/7]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr SplitComplexBase & vctr::SplitComplexBase< ContainerTypeParam >::operator= ( const SplitComplexBase< ContainerTypeParam > &  other)
inlineconstexpr

Copies the elements viewed by another span of the same type into the elements viewed by this span.

Like vctr::Span, a SplitComplexSpan never rebinds on assignment. This makes assigning a span of the same type behave like assigning any other split complex container. Both spans need to have the same size. A read-only SplitComplexSpan<const T> can't be assigned to.

◆ operator=() [4/7]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<class Other >
requires isMutable
&&std::convertible_to< typename SplitComplexBase< Other >::value_type, value_type > constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator= ( const SplitComplexBase< Other > &  other)
inlineconstexpr

Copies the elements of another SplitComplexBase of identical size.

◆ operator=() [5/7]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<is::expression RealExpression, is::expression ImagExpression>
requires isMutable
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::operator= ( const SplitComplexExpression< RealExpression, ImagExpression > &  expressions)
inlineconstexpr

Assigns the result of a split-complex expression to this container.

The underlying containers may resize if their size differs from the expression size.

◆ operator=() [6/7]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr SplitComplexBase & vctr::SplitComplexBase< ContainerTypeParam >::operator= ( SplitComplexBase< ContainerTypeParam > &&  )
constexprdefault

Copy and move assignment of owning containers, e.g.

a SplitComplexVector or SplitComplexArray.

◆ operator=() [7/7]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr SplitComplexBase & vctr::SplitComplexBase< ContainerTypeParam >::operator= ( SplitComplexBase< ContainerTypeParam > &&  other)
inlineconstexpr

Copy and move assignment of owning containers, e.g.

a SplitComplexVector or SplitComplexArray.

◆ real() [1/2]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::real ( )
inlineconstexpr

Returns a view of the real parts.

It is mutable unless this is a SplitComplexSpan<const T>.

◆ real() [2/2]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::real ( ) const
inlineconstexpr

Returns a view of the real parts.

The constness of the elements is deduced from the underlying container: It is read-only for a const owning container or a SplitComplexSpan<const T>. Like vctr::Span, a const SplitComplexSpan<T> still returns a mutable view.

◆ resize()

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::resize ( size_t  newSize)
inlineconstexpr

Resizes both parts.

Only available for a SplitComplexVector. New elements are zero.

◆ set() [1/2]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::set ( size_t  i,
ComplexType  value 
)
inlineconstexpr

Sets the complex value at index i.

◆ set() [2/2]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr void vctr::SplitComplexBase< ContainerTypeParam >::set ( size_t  i,
value_type  realValue,
value_type  imagValue 
)
inlineconstexpr

Sets the real and imaginary part at index i.

◆ size()

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr size_t vctr::SplitComplexBase< ContainerTypeParam >::size ( ) const
inlineconstexpr

Returns the number of complex values.

◆ subSpan() [1/8]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<size_t startIdx>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::subSpan ( )
inlineconstexpr

Returns a SplitComplexSpan that views the elements from startIdx to the end.

This overload with a compile time start index returns a SplitComplexSpan with a static extent in case this container also has a static extent.

◆ subSpan() [2/8]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<size_t startIdx, size_t numElements>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::subSpan ( )
inlineconstexpr

Returns a SplitComplexSpan that views numElements elements, starting at startIdx.

This overload with a compile time length always returns a SplitComplexSpan with a static extent.

◆ subSpan() [3/8]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<size_t startIdx>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::subSpan ( ) const
inlineconstexpr

Returns a SplitComplexSpan that views the elements from startIdx to the end.

This overload with a compile time start index returns a SplitComplexSpan with a static extent in case this container also has a static extent.

◆ subSpan() [4/8]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
template<size_t startIdx, size_t numElements>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::subSpan ( ) const
inlineconstexpr

Returns a SplitComplexSpan that views numElements elements, starting at startIdx.

This overload with a compile time length always returns a SplitComplexSpan with a static extent.

◆ subSpan() [5/8]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::subSpan ( size_t  startIdx)
inlineconstexpr

Returns a SplitComplexSpan that views the elements from startIdx to the end.

This overload with a runtime start index always returns a SplitComplexSpan with a dynamic extent.

◆ subSpan() [6/8]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::subSpan ( size_t  startIdx) const
inlineconstexpr

Returns a SplitComplexSpan that views the elements from startIdx to the end.

This overload with a runtime start index always returns a SplitComplexSpan with a dynamic extent.

◆ subSpan() [7/8]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::subSpan ( size_t  startIdx,
size_t  numElements 
)
inlineconstexpr

Returns a SplitComplexSpan that views numElements elements, starting at startIdx.

This overload with a runtime length always returns a SplitComplexSpan with a dynamic extent.

◆ subSpan() [8/8]

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr auto vctr::SplitComplexBase< ContainerTypeParam >::subSpan ( size_t  startIdx,
size_t  numElements 
) const
inlineconstexpr

Returns a SplitComplexSpan that views numElements elements, starting at startIdx.

This overload with a runtime length always returns a SplitComplexSpan with a dynamic extent.

Member Data Documentation

◆ isMutable

template<is::anyVctrWithRealFloatValueType ContainerTypeParam>
constexpr bool vctr::SplitComplexBase< ContainerTypeParam >::isMutable = ! std::is_const_v<element_type>
staticconstexpr

True if the elements can be modified through this container, false for a SplitComplexSpan<const T>.


The documentation for this class was generated from the following file: