Argon 0.1.0
Loading...
Searching...
No Matches
argon::vectorize::load_store< ScalarType > Struct Template Reference

A SIMD vectorized view of a range of data. More...

#include <load_store.hpp>

Inheritance diagram for argon::vectorize::load_store< ScalarType >:
Collaboration diagram for argon::vectorize::load_store< ScalarType >:

Classes

struct  ConstIterator
 A const iterator for the vectorized view. More...
struct  Iterator
 An iterator for the vectorized view. More...

Public Types

using intrinsic_type = simd::Vec128_t<ScalarType>
 The SIMD vector type used for vectorization.
using iterator = Iterator
 The iterator type for the vectorized view.
using const_iterator = ConstIterator
 The const iterator type for the vectorized view.

Public Member Functions

 load_store (ScalarType *start, ScalarType *end)
 Constructs a vectorized view from a pointer to the start of the range and the end of the range.
 load_store (ScalarType *start, const size_t size)
 Constructs a vectorized view from a pointer to the start of the range and the size of the range.
 load_store (std::span< ScalarType > span)
 Constructs a vectorized view from a span.
template<std::ranges::contiguous_range R>
 load_store (R &&r)
 Constructs a vectorized view from a range.
iterator begin () const
 Returns an iterator to the beginning.
ScalarType * end () const
 Returns an iterator to the end.
const_iterator cbegin () const
 Returns a const iterator to the beginning of the range.
const ScalarType * cend () const
 Returns a const iterator to the end of the range.
size_t size () const
 Get the size of the view.

Static Public Attributes

static constexpr size_t lanes = sizeof(intrinsic_type) / sizeof(ScalarType)
 The number of lanes in the SIMD vector.

Detailed Description

template<typename ScalarType>
struct argon::vectorize::load_store< ScalarType >

A SIMD vectorized view of a range of data.

Template Parameters
ScalarTypeThe type of the elements in the range.

Constructor & Destructor Documentation

◆ load_store() [1/4]

template<typename ScalarType>
argon::vectorize::load_store< ScalarType >::load_store ( ScalarType * start,
ScalarType * end )
inline

Constructs a vectorized view from a pointer to the start of the range and the end of the range.

Parameters
startA pointer to the start of the range.
endA pointer to the end of the range.

◆ load_store() [2/4]

template<typename ScalarType>
argon::vectorize::load_store< ScalarType >::load_store ( ScalarType * start,
const size_t size )
inline

Constructs a vectorized view from a pointer to the start of the range and the size of the range.

Parameters
startA pointer to the start of the range.
sizeThe size of the range.

◆ load_store() [3/4]

template<typename ScalarType>
argon::vectorize::load_store< ScalarType >::load_store ( std::span< ScalarType > span)
inline

Constructs a vectorized view from a span.

Parameters
spanA span representing the range of data.

◆ load_store() [4/4]

template<typename ScalarType>
template<std::ranges::contiguous_range R>
argon::vectorize::load_store< ScalarType >::load_store ( R && r)
inline

Constructs a vectorized view from a range.

Template Parameters
RThe type of the range.
Parameters
rA range representing the range of data.

Member Function Documentation

◆ begin()

template<typename ScalarType>
iterator argon::vectorize::load_store< ScalarType >::begin ( ) const
inline

Returns an iterator to the beginning.

Returns
An iterator to the start of the view.

◆ cbegin()

template<typename ScalarType>
const_iterator argon::vectorize::load_store< ScalarType >::cbegin ( ) const
inline

Returns a const iterator to the beginning of the range.

Returns
A const iterator to the start of the view.

◆ cend()

template<typename ScalarType>
const ScalarType * argon::vectorize::load_store< ScalarType >::cend ( ) const
inline

Returns a const iterator to the end of the range.

Returns
A const iterator to the end of the view.

◆ end()

template<typename ScalarType>
ScalarType * argon::vectorize::load_store< ScalarType >::end ( ) const
inline

Returns an iterator to the end.

Returns
An iterator to the end of the view.

◆ size()

template<typename ScalarType>
size_t argon::vectorize::load_store< ScalarType >::size ( ) const
inline

Get the size of the view.

Returns
The size of the view.
Note
The size is the number of vectorized elements in the view.

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