Block-Structured AMR Software Framework
amrex::ReduceData< Ts > Class Template Reference

#include <AMReX_Reduce.H>

Public Types

using Type = GpuTuple< Ts... >
 

Public Member Functions

template<typename... Ps>
 ReduceData (ReduceOps< Ps... > &reduce_op)
 
 ~ReduceData ()
 
 ReduceData (ReduceData< Ts... > const &)=delete
 
 ReduceData (ReduceData< Ts... > &&)=delete
 
void operator= (ReduceData< Ts... > const &)=delete
 
void operator= (ReduceData< Ts... > &&)=delete
 
Type value ()
 
template<typename... Ps>
Type value (ReduceOps< Ps... > &reduce_op)
 
TypedevicePtr ()
 
TypedevicePtr (gpuStream_t const &s)
 
TypehostPtr ()
 
GpuArray< int, AMREX_GPU_MAX_STREAMS > & nBlocks ()
 
intnBlocks (gpuStream_t const &s)
 
int maxBlocks () const
 
int maxStreamIndex () const
 
void updateMaxStreamIndex (gpuStream_t const &s)
 

Private Attributes

int m_max_blocks
 
int m_max_stream_index = 0
 
Typem_host_tuple = nullptr
 
Typem_device_tuple = nullptr
 
GpuArray< int, AMREX_GPU_MAX_STREAMSm_nblocks
 
std::function< Type()> m_fn_value
 

Member Typedef Documentation

◆ Type

template<typename... Ts>
using amrex::ReduceData< Ts >::Type = GpuTuple<Ts...>

Constructor & Destructor Documentation

◆ ReduceData() [1/3]

template<typename... Ts>
template<typename... Ps>
amrex::ReduceData< Ts >::ReduceData ( ReduceOps< Ps... > &  reduce_op)
inlineexplicit

◆ ~ReduceData()

template<typename... Ts>
amrex::ReduceData< Ts >::~ReduceData ( )
inline

◆ ReduceData() [2/3]

template<typename... Ts>
amrex::ReduceData< Ts >::ReduceData ( ReduceData< Ts... > const &  )
delete

◆ ReduceData() [3/3]

template<typename... Ts>
amrex::ReduceData< Ts >::ReduceData ( ReduceData< Ts... > &&  )
delete

Member Function Documentation

◆ devicePtr() [1/2]

template<typename... Ts>
Type* amrex::ReduceData< Ts >::devicePtr ( )
inline

◆ devicePtr() [2/2]

template<typename... Ts>
Type* amrex::ReduceData< Ts >::devicePtr ( gpuStream_t const &  s)
inline

◆ hostPtr()

template<typename... Ts>
Type* amrex::ReduceData< Ts >::hostPtr ( )
inline

◆ maxBlocks()

template<typename... Ts>
int amrex::ReduceData< Ts >::maxBlocks ( ) const
inline

◆ maxStreamIndex()

template<typename... Ts>
int amrex::ReduceData< Ts >::maxStreamIndex ( ) const
inline

◆ nBlocks() [1/2]

template<typename... Ts>
GpuArray<int,AMREX_GPU_MAX_STREAMS>& amrex::ReduceData< Ts >::nBlocks ( )
inline

◆ nBlocks() [2/2]

template<typename... Ts>
int& amrex::ReduceData< Ts >::nBlocks ( gpuStream_t const &  s)
inline

◆ operator=() [1/2]

template<typename... Ts>
void amrex::ReduceData< Ts >::operator= ( ReduceData< Ts... > &&  )
delete

◆ operator=() [2/2]

template<typename... Ts>
void amrex::ReduceData< Ts >::operator= ( ReduceData< Ts... > const &  )
delete

◆ updateMaxStreamIndex()

template<typename... Ts>
void amrex::ReduceData< Ts >::updateMaxStreamIndex ( gpuStream_t const &  s)
inline

◆ value() [1/2]

template<typename... Ts>
Type amrex::ReduceData< Ts >::value ( )
inline

◆ value() [2/2]

template<typename... Ts>
template<typename... Ps>
Type amrex::ReduceData< Ts >::value ( ReduceOps< Ps... > &  reduce_op)
inline

Member Data Documentation

◆ m_device_tuple

template<typename... Ts>
Type* amrex::ReduceData< Ts >::m_device_tuple = nullptr
private

◆ m_fn_value

template<typename... Ts>
std::function<Type()> amrex::ReduceData< Ts >::m_fn_value
private

◆ m_host_tuple

template<typename... Ts>
Type* amrex::ReduceData< Ts >::m_host_tuple = nullptr
private

◆ m_max_blocks

template<typename... Ts>
int amrex::ReduceData< Ts >::m_max_blocks
private

◆ m_max_stream_index

template<typename... Ts>
int amrex::ReduceData< Ts >::m_max_stream_index = 0
private

◆ m_nblocks

template<typename... Ts>
GpuArray<int,AMREX_GPU_MAX_STREAMS> amrex::ReduceData< Ts >::m_nblocks
private

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