Grid 0.7.0
Lattice_reduction_gpu.h File Reference

Go to the source code of this file.

Functions

 NAMESPACE_BEGIN (Grid)
template<class Iterator>
unsigned int nextPow2 (Iterator x)
template<class Iterator>
int getNumBlocksAndThreads (const Iterator n, const size_t sizeofsobj, Iterator &threads, Iterator &blocks)
template<class sobj, class Iterator>
__device__ void reduceBlock (volatile sobj *sdata, sobj mySum, const Iterator tid)
template<class vobj, class sobj, class Iterator>
__device__ void reduceBlocks (const vobj *g_idata, sobj *g_odata, Iterator n)
template<class vobj, class sobj, class Iterator>
__global__ void reduceKernel (const vobj *lat, sobj *buffer, Iterator n)
template<class vobj>
vobj::scalar_objectD sumD_gpu_small (const vobj *lat, Integer osites)
template<class vobj>
vobj::scalar_objectD sumD_gpu_large (const vobj *lat, Integer osites)
template<class vobj>
vobj::scalar_objectD sumD_gpu (const vobj *lat, Integer osites)
template<class vobj>
vobj::scalar_object sum_gpu (const vobj *lat, Integer osites)
template<class vobj>
vobj::scalar_object sum_gpu_large (const vobj *lat, Integer osites)
 NAMESPACE_END (Grid)

Variables

__device__ unsigned int retirementCount

Function Documentation

◆ NAMESPACE_BEGIN()

NAMESPACE_BEGIN ( Grid )

◆ nextPow2()

template<class Iterator>
unsigned int nextPow2 ( Iterator x)

Definition at line 15 of file Lattice_reduction_gpu.h.

Referenced by getNumBlocksAndThreads().

◆ getNumBlocksAndThreads()

template<class Iterator>
int getNumBlocksAndThreads ( const Iterator n,
const size_t sizeofsobj,
Iterator & threads,
Iterator & blocks )

Definition at line 26 of file Lattice_reduction_gpu.h.

References GridLogError, and nextPow2().

Referenced by sumD_gpu(), and sumD_gpu_small().

◆ reduceBlock()

template<class sobj, class Iterator>
__device__ void reduceBlock ( volatile sobj * sdata,
sobj mySum,
const Iterator tid )

Definition at line 65 of file Lattice_reduction_gpu.h.

References acceleratorSynchronise(), and acceleratorSynchroniseAll().

Referenced by reduceBlocks(), and reduceKernel().

◆ reduceBlocks()

template<class vobj, class sobj, class Iterator>
__device__ void reduceBlocks ( const vobj * g_idata,
sobj * g_odata,
Iterator n )

Definition at line 102 of file Lattice_reduction_gpu.h.

References COALESCE_GRANULARITY, extractLane(), and reduceBlock().

Referenced by reduceKernel().

◆ reduceKernel()

template<class vobj, class sobj, class Iterator>
__global__ void reduceKernel ( const vobj * lat,
sobj * buffer,
Iterator n )

◆ sumD_gpu_small()

template<class vobj>
vobj::scalar_objectD sumD_gpu_small ( const vobj * lat,
Integer osites )
inline

◆ sumD_gpu_large()

template<class vobj>
vobj::scalar_objectD sumD_gpu_large ( const vobj * lat,
Integer osites )
inline

Definition at line 227 of file Lattice_reduction_gpu.h.

References accelerator_for, and sumD_gpu_small().

Referenced by sum_gpu_large(), sumD_gpu(), and sumD_large().

◆ sumD_gpu()

template<class vobj>
vobj::scalar_objectD sumD_gpu ( const vobj * lat,
Integer osites )
inline

Definition at line 253 of file Lattice_reduction_gpu.h.

References getNumBlocksAndThreads(), sumD_gpu_large(), and sumD_gpu_small().

Referenced by sum_gpu(), and sumD().

◆ sum_gpu()

template<class vobj>
vobj::scalar_object sum_gpu ( const vobj * lat,
Integer osites )
inline

Definition at line 275 of file Lattice_reduction_gpu.h.

References sumD_gpu().

Referenced by rankSum(), and sum().

◆ sum_gpu_large()

template<class vobj>
vobj::scalar_object sum_gpu_large ( const vobj * lat,
Integer osites )
inline

Definition at line 284 of file Lattice_reduction_gpu.h.

References sumD_gpu_large().

Referenced by rankSumLarge().

◆ NAMESPACE_END()

NAMESPACE_END ( Grid )

Variable Documentation

◆ retirementCount

__device__ unsigned int retirementCount

Definition at line 12 of file Lattice_reduction_gpu.h.

Referenced by reduceKernel().