Argon 0.1.0
Loading...
Searching...
No Matches
argon::vectorize::InterleavedStep< ScalarType, Stride, full > Class Template Reference

One step of vectorize::for_each_interleaved: the frames [index(), index() + count()), each of Stride interleaved elements (a stereo pair, an RGB pixel), loaded as one vector per channel. More...

#include <for_each.hpp>

Public Types

using argon_type = Argon<ScalarType>
 The vector type of one channel.
using frame_type = std::array<argon_type, Stride>
 One vector per channel.
using predicate_type = typename argon_type::argon_bool_type
 The predicate type of active().

Public Member Functions

 InterleavedStep (std::ptrdiff_t index, std::ptrdiff_t remaining)
std::ptrdiff_t index () const
 The index of this step's first frame.
std::ptrdiff_t count () const
 The number of this step's frames inside the range.
predicate_type active () const
 The lanes (frames) inside the range.
frame_type Load (const ScalarType *base) const
 Load this step's frames of the interleaved array at base, one vector per channel; lanes past the end of the range are zero and not read.
void Store (ScalarType *base, const frame_type &channels) const
 Store one vector per channel, interleaved, to this step's frames of the array at base; frames past the end of the range are not written.

Static Public Attributes

static constexpr std::ptrdiff_t lanes = argon_type::lanes
 Frames per step.

Detailed Description

template<typename ScalarType, size_t Stride, bool full>
class argon::vectorize::InterleavedStep< ScalarType, Stride, full >

One step of vectorize::for_each_interleaved: the frames [index(), index() + count()), each of Stride interleaved elements (a stereo pair, an RGB pixel), loaded as one vector per channel.

Template Parameters
fullWhether every lane (frame) is in range: full steps use the structured loads and stores (vld2-vld4, vst2-vst4), which can't be predicated. On NEON partial ones use them on the frames inside the range, a doubleword or one frame at a time, branching on the scalar count; on MVE they gather and scatter each channel under a predicate.

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