VTK  9.3.20241007
Public Member Functions | List of all members
vtkBatches< TBatchData > Class Template Reference

#include <vtkBatch.h>

Public Member Functions

 vtkBatches ()
 
 ~vtkBatches ()=default
 
void Initialize (vtkIdType numberOfElements, unsigned int batchSize=1000)
 Initialize the batches.
 
void TrimBatches (const std::function< bool(const vtkTBatch &)> shouldRemoveBatch)
 Remove batches that should be skipped.
 
TBatchData BuildOffsetsAndGetGlobalSum ()
 Build offsets in place and returns the Global sum for a vtkBatch with Compact Batch Data.
 
vtkIdType GetNumberOfBatches () const
 Get the number of batches.
 
unsigned int GetBatchSize () const
 Get the batch size.
 
reference operator[] (size_type pos) noexcept
 The following methods expose the underlying vector.
 
const_reference operator[] (size_type pos) const noexcept
 The following methods expose the underlying vector.
 
iterator begin () noexcept
 The following methods expose the underlying vector.
 
const_iterator begin () const noexcept
 The following methods expose the underlying vector.
 
const_iterator cbegin () const noexcept
 The following methods expose the underlying vector.
 
iterator end () noexcept
 The following methods expose the underlying vector.
 
const_iterator end () const noexcept
 The following methods expose the underlying vector.
 
const_iterator cend () const noexcept
 The following methods expose the underlying vector.
 

Detailed Description

template<typename TBatchData>
class vtkBatches< TBatchData >

Definition at line 52 of file vtkBatch.h.

Constructor & Destructor Documentation

◆ vtkBatches()

template<typename TBatchData >
vtkBatches< TBatchData >::vtkBatches ( )
inline

Definition at line 64 of file vtkBatch.h.

◆ ~vtkBatches()

template<typename TBatchData >
vtkBatches< TBatchData >::~vtkBatches ( )
default

Member Function Documentation

◆ Initialize()

template<typename TBatchData >
void vtkBatches< TBatchData >::Initialize ( vtkIdType  numberOfElements,
unsigned int  batchSize = 1000 
)
inline

Initialize the batches.

Definition at line 73 of file vtkBatch.h.

◆ TrimBatches()

template<typename TBatchData >
void vtkBatches< TBatchData >::TrimBatches ( const std::function< bool(const vtkTBatch &)>  shouldRemoveBatch)
inline

Remove batches that should be skipped.

Definition at line 99 of file vtkBatch.h.

◆ BuildOffsetsAndGetGlobalSum()

template<typename TBatchData >
TBatchData vtkBatches< TBatchData >::BuildOffsetsAndGetGlobalSum ( )
inline

Build offsets in place and returns the Global sum for a vtkBatch with Compact Batch Data.

Compact Batch Data are those that use one or more variables to calculate sums and then converts them to offsets to save memory.

Note
For this function to work, you need to implement the following overloads to Batch Data:

1) TBatchData& operator+=(const TBatchData& rhs); 2) TBatchData operator+(const TBatchData& rhs);

Definition at line 158 of file vtkBatch.h.

◆ GetNumberOfBatches()

template<typename TBatchData >
vtkIdType vtkBatches< TBatchData >::GetNumberOfBatches ( ) const
inline

Get the number of batches.

Definition at line 238 of file vtkBatch.h.

◆ GetBatchSize()

template<typename TBatchData >
unsigned int vtkBatches< TBatchData >::GetBatchSize ( ) const
inline

Get the batch size.

Definition at line 243 of file vtkBatch.h.

◆ operator[]() [1/2]

template<typename TBatchData >
reference vtkBatches< TBatchData >::operator[] ( size_type  pos)
inlinenoexcept

The following methods expose the underlying vector.

Definition at line 249 of file vtkBatch.h.

◆ operator[]() [2/2]

template<typename TBatchData >
const_reference vtkBatches< TBatchData >::operator[] ( size_type  pos) const
inlinenoexcept

The following methods expose the underlying vector.

Definition at line 250 of file vtkBatch.h.

◆ begin() [1/2]

template<typename TBatchData >
iterator vtkBatches< TBatchData >::begin ( )
inlinenoexcept

The following methods expose the underlying vector.

Definition at line 251 of file vtkBatch.h.

◆ begin() [2/2]

template<typename TBatchData >
const_iterator vtkBatches< TBatchData >::begin ( ) const
inlinenoexcept

The following methods expose the underlying vector.

Definition at line 252 of file vtkBatch.h.

◆ cbegin()

template<typename TBatchData >
const_iterator vtkBatches< TBatchData >::cbegin ( ) const
inlinenoexcept

The following methods expose the underlying vector.

Definition at line 253 of file vtkBatch.h.

◆ end() [1/2]

template<typename TBatchData >
iterator vtkBatches< TBatchData >::end ( )
inlinenoexcept

The following methods expose the underlying vector.

Definition at line 254 of file vtkBatch.h.

◆ end() [2/2]

template<typename TBatchData >
const_iterator vtkBatches< TBatchData >::end ( ) const
inlinenoexcept

The following methods expose the underlying vector.

Definition at line 255 of file vtkBatch.h.

◆ cend()

template<typename TBatchData >
const_iterator vtkBatches< TBatchData >::cend ( ) const
inlinenoexcept

The following methods expose the underlying vector.

Definition at line 256 of file vtkBatch.h.


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