chombo-discharge
Functions
BoxLoops Namespace Reference

Namespace for encapsulating loop types. More...

Functions

template<typename Functor >
ALWAYS_INLINE void loop (const Box &a_computeBox, Functor &&kernel, const IntVect &a_stride=IntVect::Unit)
 Launch a C++ kernel over a regular grid. More...
 
template<typename Functor >
ALWAYS_INLINE void loop (const IntVectSet &a_ivs, Functor &&a_kernel)
 Launch a C++ kernel over a subset of cells. More...
 
template<typename Functor >
ALWAYS_INLINE void loop (const DenseIntVectSet &a_ivs, Functor &&a_kernel)
 Launch a C++ kernel over a subset of cells. More...
 
template<typename Functor >
ALWAYS_INLINE void loop (VoFIterator &a_iter, Functor &&a_kernel)
 Launch a C++ kernel over cut-cells. More...
 
template<typename Functor >
ALWAYS_INLINE void loop (FaceIterator &a_iter, Functor &&a_kernel)
 Launch a C++ kernel over faces. More...
 
template<typename T , typename Functor >
ALWAYS_INLINE void loop (const Vector< T > &a_subset, Functor &&a_kernel)
 Launch a C++ kernel over a specified subset of something. More...
 

Detailed Description

Namespace for encapsulating loop types.

Function Documentation

◆ loop() [1/6]

template<typename Functor >
ALWAYS_INLINE void BoxLoops::loop ( const Box &  a_computeBox,
Functor &&  kernel,
const IntVect &  a_stride = IntVect::Unit 
)

Launch a C++ kernel over a regular grid.

The stride argument lets the user use different strides along the different coordinate axes. The default is to use a stride of one along each coordinate. Note that the stride must be positive for each coordinate axis.

Parameters
[in]a_computeBoxComputation box
[in,out]a_kernelKernel to launch.
[in]a_strideStride for each loop.

◆ loop() [2/6]

template<typename Functor >
ALWAYS_INLINE void BoxLoops::loop ( const DenseIntVectSet &  a_ivs,
Functor &&  a_kernel 
)

Launch a C++ kernel over a subset of cells.

Parameters
[in,out]a_cellsGrid cells where we launch the kernel.
[in,out]a_kernelKernel to launch

◆ loop() [3/6]

template<typename Functor >
ALWAYS_INLINE void BoxLoops::loop ( const IntVectSet &  a_ivs,
Functor &&  a_kernel 
)

Launch a C++ kernel over a subset of cells.

Parameters
[in,out]a_cellsGrid cells where we launch the kernel.
[in,out]a_kernelKernel to launch

◆ loop() [4/6]

template<typename T , typename Functor >
ALWAYS_INLINE void BoxLoops::loop ( const Vector< T > &  a_subset,
Functor &&  a_kernel 
)

Launch a C++ kernel over a specified subset of something.

Parameters
[in,out]a_subsetSubset. E.g. a std::vector<VolIndex>
[in,out]a_kernelKernel to launch

◆ loop() [5/6]

template<typename Functor >
ALWAYS_INLINE void BoxLoops::loop ( FaceIterator &  a_iter,
Functor &&  a_kernel 
)

Launch a C++ kernel over faces.

Parameters
[in,out]a_faceitGrid faces where we launch the kernel.
[in,out]a_kernelKernel to launch

◆ loop() [6/6]

template<typename Functor >
ALWAYS_INLINE void BoxLoops::loop ( VoFIterator &  a_iter,
Functor &&  a_kernel 
)

Launch a C++ kernel over cut-cells.

Parameters
[in,out]a_vofitGrid cells where we launch the kernel.
[in,out]a_kernelKernel to launch