SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::counted_simd_iterator< index_simd_t > Class Template Reference

Implements a special version of a counted iterator over a simd vector. More...

#include <seqan3/utility/simd/views/iota_simd.hpp>

+ Inheritance diagram for seqan3::detail::counted_simd_iterator< index_simd_t >:

Public Types

Associated types
using value_type = index_simd_t
 The value type.
 
using reference = value_type
 The reference type.
 
using pointer = void
 The pointer type.
 
using difference_type = std::ptrdiff_t
 The difference type.
 
using iterator_category = std::forward_iterator_tag
 The iterator category.
 

Public Member Functions

Constructor, assignment and destructor
 counted_simd_iterator ()=default
 Defaulted.
 
 counted_simd_iterator (counted_simd_iterator const &)=default
 Defaulted.
 
 counted_simd_iterator (counted_simd_iterator &&)=default
 Defaulted.
 
counted_simd_iteratoroperator= (counted_simd_iterator const &)=default
 Defaulted.
 
counted_simd_iteratoroperator= (counted_simd_iterator &&)=default
 Defaulted.
 
 ~counted_simd_iterator ()=default
 Defaulted.
 
template<arithmetic index_scalar_t>
 counted_simd_iterator (index_scalar_t const scalar_index) noexcept
 Constructs and initialises the iterator with the given index.
 
Element access
reference operator* () const
 Return the current simd index.
 
Arithmetic operators
counted_simd_iteratoroperator++ ()
 Increments the iterator.
 
counted_simd_iterator operator++ (int)
 Increments the iterator and returns the iterator pointing to the previous index.
 
difference_type operator- (counted_simd_iterator const &rhs) const
 Returns the distance between two iterators.
 

Private Attributes

index_simd_t count_simd {}
 The currently represented count.
 

Friends

Comparison operators
bool operator== (counted_simd_iterator const &lhs, counted_simd_iterator const &rhs) noexcept
 Tests whether lhs == rhs.
 
bool operator!= (counted_simd_iterator const &lhs, counted_simd_iterator const &rhs) noexcept
 Tests whether lhs != rhs.
 

Detailed Description

template<simd_concept index_simd_t>
class seqan3::detail::counted_simd_iterator< index_simd_t >

Implements a special version of a counted iterator over a simd vector.

Template Parameters
index_simd_tThe type of the index; must model seqan3::simd::simd_concept.

Uses a simd count vector to increment the counted iterator. This seems to be in general faster than calling seqan3::simd::fill when dereferencing the iterator, although this is just a constant and fast operation.

Constructor & Destructor Documentation

◆ counted_simd_iterator()

template<simd_concept index_simd_t>
template<arithmetic index_scalar_t>
seqan3::detail::counted_simd_iterator< index_simd_t >::counted_simd_iterator ( index_scalar_t const  scalar_index)
inlineexplicitnoexcept

Constructs and initialises the iterator with the given index.

Template Parameters
index_scalar_tThe scalar index type; must model seqan3::arithmetic.
Parameters
[in]scalar_indexThe scalar index the iterator shall represent.

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