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

A view that loads data from a contiguous range into SIMD vectors. More...

#include <load.hpp>

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

Classes

struct  LoadIterator
 The Iterator type for the range. More...

Public Types

using intrinsic_type = simd::Vec128_t<ScalarType>
 The SIMD vector type.
using iterator = LoadIterator
 The iterator type for the range.
using sentinel = const ScalarType*
 The sentinel type for the range.

Public Member Functions

iterator begin ()
 Returns an iterator to the beginning of the range.
const ScalarType * end ()
 Returns an iterator to the end of the range.
size_t size () const
 Returns the size of the range.
template<std::ranges::contiguous_range R>
 load (R &&r)
 Construct a load from a range.
 load (const std::span< ScalarType > span)
 Construct a load from a span.

Static Public Attributes

static constexpr size_t lanes
 The number of lanes in the SIMD vector.

Detailed Description

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

A view that loads data from a contiguous range into SIMD vectors.

Template Parameters
ScalarTypeThe scalar type of the SIMD vector (e.g., int8_t, float32_t).

Constructor & Destructor Documentation

◆ load() [1/2]

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

Construct a load from a range.

Template Parameters
RThe range type.
Parameters
rThe range to load data from.

◆ load() [2/2]

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

Construct a load from a span.

Parameters
spanThe span to load data from.

Member Function Documentation

◆ begin()

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

Returns an iterator to the beginning of the range.

Returns
An iterator to the beginning of the range.

◆ end()

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

Returns an iterator to the end of the range.

Returns
An iterator to the end of the range.

◆ size()

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

Returns the size of the range.

Returns
The size of the range.

Member Data Documentation

◆ lanes

template<typename ScalarType>
size_t argon::vectorize::load< ScalarType >::lanes
staticconstexpr
Initial value:
=
sizeof(intrinsic_type) / sizeof(ScalarType)
simd::Vec128_t< ScalarType > intrinsic_type
The SIMD vector type.
Definition load.hpp:37

The number of lanes in the SIMD vector.


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