OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::ConstSpan< T > Class Template Reference

#include <communicatable.h>

+ Collaboration diagram for olb::ConstSpan< T >:

Public Member Functions

 ConstSpan (const T *base, std::size_t size)
 
 ConstSpan (const std::vector< T > &v)
 
const T * data () const
 
operator[] (std::size_t i) const
 
const T * begin () const
 
const T * end () const
 
std::size_t size () const
 

Detailed Description

template<typename T>
class olb::ConstSpan< T >

Definition at line 36 of file communicatable.h.

Constructor & Destructor Documentation

◆ ConstSpan() [1/2]

template<typename T >
olb::ConstSpan< T >::ConstSpan ( const T * base,
std::size_t size )
inline

Definition at line 42 of file communicatable.h.

42 :
43 _base(base), _size(size) { }
std::size_t size() const

◆ ConstSpan() [2/2]

template<typename T >
olb::ConstSpan< T >::ConstSpan ( const std::vector< T > & v)
inline

Definition at line 45 of file communicatable.h.

45 :
46 ConstSpan{v.data(), v.size()} { }
ConstSpan(const T *base, std::size_t size)

Member Function Documentation

◆ begin()

template<typename T >
const T * olb::ConstSpan< T >::begin ( ) const
inline

Definition at line 56 of file communicatable.h.

56 {
57 return _base;
58 }
+ Here is the caller graph for this function:

◆ data()

template<typename T >
const T * olb::ConstSpan< T >::data ( ) const
inline

Definition at line 48 of file communicatable.h.

48 {
49 return _base;
50 }
+ Here is the caller graph for this function:

◆ end()

template<typename T >
const T * olb::ConstSpan< T >::end ( ) const
inline

Definition at line 59 of file communicatable.h.

59 {
60 return _base + _size;
61 }
+ Here is the caller graph for this function:

◆ operator[]()

template<typename T >
T olb::ConstSpan< T >::operator[] ( std::size_t i) const
inline

Definition at line 52 of file communicatable.h.

52 {
53 return _base[i];
54 }

◆ size()

template<typename T >
std::size_t olb::ConstSpan< T >::size ( ) const
inline

Definition at line 63 of file communicatable.h.

63 {
64 return _size;
65 }
+ Here is the caller graph for this function:

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