Argon 0.1.0
Loading...
Searching...
No Matches
tail.hpp File Reference

Vectorized views that also visit the final, partial vector of a range (see with_tail() on the views). More...

#include <algorithm>
#include <array>
#include <cstddef>
#include <iterator>
#include <ranges>
#include <type_traits>
#include "argon/argon_full.hpp"
#include "argon/store.hpp"
#include "argon/vectorize/first_n.hpp"
Include dependency graph for tail.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  argon::vectorize::Partial< ScalarType, Stride >
 One vector (or, for interleaved views, one group of Stride vectors) of a range, and how many of its leading lanes lie inside the range. More...
struct  argon::vectorize::detail::TailCursor< PointerType, Stride >
 Shared position-keeping for the tail iterators. More...
class  argon::vectorize::load_tail< ScalarType, Stride >
 Read-only view of a range as vectors, including a final partial vector. More...
struct  argon::vectorize::load_tail< ScalarType, Stride >::Iterator
 Iterator over the vectors of the range; dereferences to a Partial. More...
class  argon::vectorize::store_tail< ScalarType, Stride >
 Write-only view of a range as vectors, including a final partial vector. More...
struct  argon::vectorize::store_tail< ScalarType, Stride >::Iterator
 Iterator over the vectors of the range; dereferences to a Partial to assign. More...
class  argon::vectorize::load_store_tail< ScalarType, Stride >
 In-place read/write view of a range as vectors, including a final partial vector. More...
struct  argon::vectorize::load_store_tail< ScalarType, Stride >::Iterator
 Iterator over the vectors of the range; dereferences to a Partial to read and modify. More...

Namespaces

namespace  argon
 A 128-bit SIMD vector wrapping a scalar type, providing arithmetic, logical, and data-movement operations.

Functions

template<typename ScalarType, size_t Stride>
Argon< ScalarType >::offset_type argon::vectorize::detail::frame_offsets ()
 Lane offsets {0, Stride, 2*Stride, ...}: where each frame's first element lies, in elements.
template<size_t Stride, typename ScalarType>
Partial< ScalarType, Stride >::vector_type argon::vectorize::detail::load_partial (const ScalarType *ptr, size_t count)
 Load the first count lanes at ptr (all lanes when count >= lanes); the rest are zero and not read.
template<size_t Stride, typename ScalarType>
void argon::vectorize::detail::store_partial (ScalarType *ptr, const typename Partial< ScalarType, Stride >::vector_type &value, size_t count)
 Store the first count lanes of value to ptr (all lanes when count >= lanes).

Detailed Description

Vectorized views that also visit the final, partial vector of a range (see with_tail() on the views).

Function Documentation

◆ load_partial()

template<size_t Stride, typename ScalarType>
Partial< ScalarType, Stride >::vector_type argon::vectorize::detail::load_partial ( const ScalarType * ptr,
size_t count )

Load the first count lanes at ptr (all lanes when count >= lanes); the rest are zero and not read.

On NEON a partial vector branches on count itself (see first_n.hpp), never on the lanes of a predicate.

◆ store_partial()

template<size_t Stride, typename ScalarType>
void argon::vectorize::detail::store_partial ( ScalarType * ptr,
const typename Partial< ScalarType, Stride >::vector_type & value,
size_t count )

Store the first count lanes of value to ptr (all lanes when count >= lanes).

On NEON a partial vector branches on count itself (see first_n.hpp), never on the lanes of a predicate.