Reference documentation for deal.II version GIT relicensing-464-g14f7274e4d 2024-04-22 15:40:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
VectorizedArrayBase< VectorizedArrayType, width > Class Template Reference

#include <deal.II/base/vectorization.h>

Inheritance diagram for VectorizedArrayBase< VectorizedArrayType, width >:
Inheritance graph
[legend]

Public Member Functions

constexpr VectorizedArrayBase ()=default
 
template<typename U >
constexpr VectorizedArrayBase (const std::initializer_list< U > &list)
 
constexpr VectorizedArrayIterator< VectorizedArrayType > begin ()
 
constexpr VectorizedArrayIterator< const VectorizedArrayType > begin () const
 
constexpr VectorizedArrayIterator< VectorizedArrayType > end ()
 
constexpr VectorizedArrayIterator< const VectorizedArrayType > end () const
 
auto dot_product (const VectorizedArrayType &v) const
 

Static Public Member Functions

static constexpr std::size_t size ()
 

Detailed Description

template<typename VectorizedArrayType, std::size_t width>
class VectorizedArrayBase< VectorizedArrayType, width >

A base class for the various VectorizedArray template specializations, containing common functionalities.

Template Parameters
VectorizedArrayTypeType of the actual vectorized array this class is operating on. We are using the Curiously Recurring Template Pattern (see https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern) in this class to avoid having to resort to virtual member functions. In other words, VectorizedArrayType is a class derived from the current class.

Definition at line 250 of file vectorization.h.

Constructor & Destructor Documentation

◆ VectorizedArrayBase() [1/2]

template<typename VectorizedArrayType , std::size_t width>
constexpr VectorizedArrayBase< VectorizedArrayType, width >::VectorizedArrayBase ( )
constexprdefault

Default constructor.

◆ VectorizedArrayBase() [2/2]

template<typename VectorizedArrayType , std::size_t width>
template<typename U >
constexpr VectorizedArrayBase< VectorizedArrayType, width >::VectorizedArrayBase ( const std::initializer_list< U > &  list)
inlineconstexpr

Construct an array with the given initializer list.

The initializer list must have at most as many elements as the vector length. Elements not listed in the initializer list are zero-initialized.

Definition at line 266 of file vectorization.h.

Member Function Documentation

◆ size()

template<typename VectorizedArrayType , std::size_t width>
static constexpr std::size_t VectorizedArrayBase< VectorizedArrayType, width >::size ( )
inlinestaticconstexpr

Return the number of elements in the array.

Definition at line 285 of file vectorization.h.

◆ begin() [1/2]

template<typename VectorizedArrayType , std::size_t width>
constexpr VectorizedArrayIterator< VectorizedArrayType > VectorizedArrayBase< VectorizedArrayType, width >::begin ( )
inlineconstexpr
Returns
An iterator pointing to the beginning of the underlying data.

Definition at line 294 of file vectorization.h.

◆ begin() [2/2]

template<typename VectorizedArrayType , std::size_t width>
constexpr VectorizedArrayIterator< const VectorizedArrayType > VectorizedArrayBase< VectorizedArrayType, width >::begin ( ) const
inlineconstexpr
Returns
An iterator pointing to the beginning of the underlying data (const version).

Definition at line 305 of file vectorization.h.

◆ end() [1/2]

template<typename VectorizedArrayType , std::size_t width>
constexpr VectorizedArrayIterator< VectorizedArrayType > VectorizedArrayBase< VectorizedArrayType, width >::end ( )
inlineconstexpr
Returns
An iterator pointing to the end of the underlying data.

Definition at line 315 of file vectorization.h.

◆ end() [2/2]

template<typename VectorizedArrayType , std::size_t width>
constexpr VectorizedArrayIterator< const VectorizedArrayType > VectorizedArrayBase< VectorizedArrayType, width >::end ( ) const
inlineconstexpr
Returns
An iterator pointing to the end of the underlying data (const version).

Definition at line 326 of file vectorization.h.

◆ dot_product()

template<typename VectorizedArrayType , std::size_t width>
auto VectorizedArrayBase< VectorizedArrayType, width >::dot_product ( const VectorizedArrayType &  v) const
inline

A default implementation for computing the dot product between two vectorized arrays. It first forms the lane-by-lane product between the current object and the argument, and then the across-lanes sum of the product. The function returns the kind of object that the VectorizedArray::sum() function returns.

This function is inherited by all derived classes and provides the dot product to them unless they override it with their own implementation (presumably using a more efficient approach).

Definition at line 344 of file vectorization.h.


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