EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
EBGeometry::PODSpan< T > Struct Template Reference

Raw pointer + size view into a Pool block, for hot inner loops. More...

#include <EBGeometry_PODVector.hpp>

Public Member Functions

T & operator[] (uint32_t a_i) const noexcept
 Element access.
 
T * begin () const noexcept
 Iterator to the first element.
 
T * end () const noexcept
 Iterator past the last element.
 
uint32_t size () const noexcept
 Number of elements.
 

Public Attributes

T * m_ptr = nullptr
 Raw pointer to element 0 inside the pool's block, as resolved when the span was bound.
 
uint32_t m_size = 0
 Number of elements.
 

Detailed Description

template<class T>
struct EBGeometry::PODSpan< T >

Raw pointer + size view into a Pool block, for hot inner loops.

Obtained from PODVector::bind. Because it captures a raw pointer, it is valid only until the next Pool::reserve on that pool (which may move the block) or the pool's destruction: resolve, use, discard. Against a frozen (or mirrored) pool no reserve can follow.

Template Parameters
TElement type.

Member Function Documentation

◆ begin()

template<class T >
T * EBGeometry::PODSpan< T >::begin ( ) const
inlinenoexcept

Iterator to the first element.

Returns
Pointer to element 0.

◆ end()

template<class T >
T * EBGeometry::PODSpan< T >::end ( ) const
inlinenoexcept

Iterator past the last element.

Returns
Pointer to one past element m_size-1.

◆ operator[]()

template<class T >
T & EBGeometry::PODSpan< T >::operator[] ( uint32_t  a_i) const
inlinenoexcept

Element access.

Parameters
[in]a_iElement index (must be < m_size).
Returns
Reference to element a_i.

◆ size()

template<class T >
uint32_t EBGeometry::PODSpan< T >::size ( ) const
inlinenoexcept

Number of elements.

Returns
m_size.

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