ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
Utils::Array< T, N > Struct Template Reference

#include <Array.hpp>

+ Inheritance diagram for Utils::Array< T, N >:

Public Types

using value_type = T
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 
using reference = value_type &
 
using const_reference = const value_type &
 
using iterator = value_type *
 
using const_iterator = const value_type *
 
using pointer = value_type *
 
using const_pointer = const value_type *
 

Public Member Functions

DEVICE_QUALIFIER constexpr reference at (size_type i)
 
DEVICE_QUALIFIER constexpr const_reference at (size_type i) const
 
DEVICE_QUALIFIER constexpr reference operator[] (size_type i)
 
DEVICE_QUALIFIER constexpr const_reference operator[] (size_type i) const
 
DEVICE_QUALIFIER constexpr reference front ()
 
DEVICE_QUALIFIER constexpr const_reference front () const
 
DEVICE_QUALIFIER constexpr reference back ()
 
DEVICE_QUALIFIER constexpr const_reference back () const
 
DEVICE_QUALIFIER constexpr pointer data () noexcept
 
DEVICE_QUALIFIER constexpr const_pointer data () const noexcept
 
DEVICE_QUALIFIER constexpr iterator begin () noexcept
 
DEVICE_QUALIFIER constexpr const_iterator begin () const noexcept
 
DEVICE_QUALIFIER constexpr const_iterator cbegin () const noexcept
 
DEVICE_QUALIFIER constexpr iterator end () noexcept
 
DEVICE_QUALIFIER constexpr const_iterator end () const noexcept
 
DEVICE_QUALIFIER constexpr const_iterator cend () const noexcept
 
DEVICE_QUALIFIER constexpr bool empty () const noexcept
 
DEVICE_QUALIFIER constexpr size_type size () const noexcept
 
DEVICE_QUALIFIER constexpr size_type max_size () const noexcept
 
DEVICE_QUALIFIER void fill (const value_type &value)
 

Static Public Member Functions

static DEVICE_QUALIFIER constexpr Array< T, Nbroadcast (const value_type &value)
 
static constexpr detail::ArrayFormatter formatter (char const *sep=" ")
 

Public Attributes

detail::Storage< T, Nm_storage
 

Friends

std::ostream & operator<< (std::ostream &out, Array const &a)
 
std::ostream & operator<< (detail::ArrayFormatterStream const &fmt, Array const &a)
 

Detailed Description

template<typename T, std::size_t N>
struct Utils::Array< T, N >

Definition at line 73 of file Array.hpp.

Member Typedef Documentation

◆ const_iterator

template<typename T , std::size_t N>
using Utils::Array< T, N >::const_iterator = const value_type *

Definition at line 80 of file Array.hpp.

◆ const_pointer

template<typename T , std::size_t N>
using Utils::Array< T, N >::const_pointer = const value_type *

Definition at line 82 of file Array.hpp.

◆ const_reference

template<typename T , std::size_t N>
using Utils::Array< T, N >::const_reference = const value_type &

Definition at line 78 of file Array.hpp.

◆ difference_type

template<typename T , std::size_t N>
using Utils::Array< T, N >::difference_type = std::ptrdiff_t

Definition at line 76 of file Array.hpp.

◆ iterator

template<typename T , std::size_t N>
using Utils::Array< T, N >::iterator = value_type *

Definition at line 79 of file Array.hpp.

◆ pointer

template<typename T , std::size_t N>
using Utils::Array< T, N >::pointer = value_type *

Definition at line 81 of file Array.hpp.

◆ reference

template<typename T , std::size_t N>
using Utils::Array< T, N >::reference = value_type &

Definition at line 77 of file Array.hpp.

◆ size_type

template<typename T , std::size_t N>
using Utils::Array< T, N >::size_type = std::size_t

Definition at line 75 of file Array.hpp.

◆ value_type

template<typename T , std::size_t N>
using Utils::Array< T, N >::value_type = T

Definition at line 74 of file Array.hpp.

Member Function Documentation

◆ at() [1/2]

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr reference Utils::Array< T, N >::at ( size_type  i)
inlineconstexpr

Definition at line 86 of file Array.hpp.

References DEVICE_THROW, Utils::Array< T, N >::m_storage, and N.

Referenced by calc_rg().

◆ at() [2/2]

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr const_reference Utils::Array< T, N >::at ( size_type  i) const
inlineconstexpr

Definition at line 93 of file Array.hpp.

References DEVICE_THROW, Utils::Array< T, N >::m_storage, and N.

◆ back() [1/2]

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr reference Utils::Array< T, N >::back ( )
inlineconstexpr

Definition at line 114 of file Array.hpp.

References Utils::Array< T, N >::end().

◆ back() [2/2]

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr const_reference Utils::Array< T, N >::back ( ) const
inlineconstexpr

Definition at line 116 of file Array.hpp.

References Utils::Array< T, N >::cend().

◆ begin() [1/2]

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr const_iterator Utils::Array< T, N >::begin ( ) const
inlineconstexprnoexcept

Definition at line 132 of file Array.hpp.

References Utils::Array< T, N >::m_storage.

◆ begin() [2/2]

◆ broadcast()

template<typename T , std::size_t N>
static DEVICE_QUALIFIER constexpr Array< T, N > Utils::Array< T, N >::broadcast ( const value_type value)
inlinestaticconstexpr

Definition at line 165 of file Array.hpp.

References N.

◆ cbegin()

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr const_iterator Utils::Array< T, N >::cbegin ( ) const
inlineconstexprnoexcept

◆ cend()

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr const_iterator Utils::Array< T, N >::cend ( ) const
inlineconstexprnoexcept

◆ data() [1/2]

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr const_pointer Utils::Array< T, N >::data ( ) const
inlineconstexprnoexcept

Definition at line 124 of file Array.hpp.

References Utils::Array< T, N >::m_storage.

◆ data() [2/2]

◆ empty()

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr bool Utils::Array< T, N >::empty ( ) const
inlineconstexprnoexcept

Definition at line 152 of file Array.hpp.

References Utils::Array< T, N >::size().

◆ end() [1/2]

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr const_iterator Utils::Array< T, N >::end ( ) const
inlineconstexprnoexcept

Definition at line 144 of file Array.hpp.

References Utils::Array< T, N >::m_storage, and N.

◆ end() [2/2]

◆ fill()

template<typename T , std::size_t N>
DEVICE_QUALIFIER void Utils::Array< T, N >::fill ( const value_type value)
inline

Definition at line 158 of file Array.hpp.

References Utils::Array< T, N >::m_storage, and Utils::Array< T, N >::size().

◆ formatter()

template<typename T , std::size_t N>
static constexpr detail::ArrayFormatter Utils::Array< T, N >::formatter ( char const *  sep = " ")
inlinestaticconstexpr

Definition at line 173 of file Array.hpp.

Referenced by ScriptInterface::LatticeIndices::throw_invalid_index().

◆ front() [1/2]

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr reference Utils::Array< T, N >::front ( )
inlineconstexpr

Definition at line 110 of file Array.hpp.

References Utils::Array< T, N >::begin().

◆ front() [2/2]

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr const_reference Utils::Array< T, N >::front ( ) const
inlineconstexpr

Definition at line 112 of file Array.hpp.

References Utils::Array< T, N >::cbegin().

◆ max_size()

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr size_type Utils::Array< T, N >::max_size ( ) const
inlineconstexprnoexcept

Definition at line 156 of file Array.hpp.

References N.

◆ operator[]() [1/2]

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr reference Utils::Array< T, N >::operator[] ( size_type  i)
inlineconstexpr

Definition at line 100 of file Array.hpp.

References DEVICE_ASSERT, Utils::Array< T, N >::m_storage, and N.

◆ operator[]() [2/2]

template<typename T , std::size_t N>
DEVICE_QUALIFIER constexpr const_reference Utils::Array< T, N >::operator[] ( size_type  i) const
inlineconstexpr

Definition at line 105 of file Array.hpp.

References DEVICE_ASSERT, Utils::Array< T, N >::m_storage, and N.

◆ size()

Friends And Related Symbol Documentation

◆ operator<< [1/2]

template<typename T , std::size_t N>
std::ostream & operator<< ( detail::ArrayFormatterStream const &  fmt,
Array< T, N > const &  a 
)
friend

Definition at line 199 of file Array.hpp.

◆ operator<< [2/2]

template<typename T , std::size_t N>
std::ostream & operator<< ( std::ostream &  out,
Array< T, N > const &  a 
)
friend

Definition at line 195 of file Array.hpp.

Member Data Documentation

◆ m_storage


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