QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | List of all members
quda::VectorCache< real, Vector > Class Template Reference

Class which wraps around a shared memory cache for a Vector type, where each thread in the thread block stores a unique Vector in the cache which any other thread can access. Presently, the expectation is that Vector is synonymous with the ColorSpinor class, but we could extend this to apply to the Matrix class as well. More...

Public Member Functions

__device__ void save (const Vector &a)
 Save the vector into the 3-d shared memory cache. Implicitly store the vector at coordinates given by threadIdx. More...
 
__device__ Vector load (int x, int y, int z)
 Load a vector from the shared memory cache. More...
 
__device__ void sync ()
 Synchronize the cache. More...
 

Private Member Functions

__device__ real * cache ()
 This is the handle to the shared memory. More...
 

Detailed Description

template<typename real, typename Vector>
class quda::VectorCache< real, Vector >

Class which wraps around a shared memory cache for a Vector type, where each thread in the thread block stores a unique Vector in the cache which any other thread can access. Presently, the expectation is that Vector is synonymous with the ColorSpinor class, but we could extend this to apply to the Matrix class as well.

Definition at line 21 of file shared_memory_cache_helper.cuh.

Member Function Documentation

◆ cache()

template<typename real, typename Vector>
__device__ real* quda::VectorCache< real, Vector >::cache ( )
inlineprivate

This is the handle to the shared memory.

Returns
Shared memory pointer

Definition at line 28 of file shared_memory_cache_helper.cuh.

Referenced by quda::VectorCache< real, Vector >::load(), and quda::VectorCache< real, Vector >::save().

Here is the caller graph for this function:

◆ load()

template<typename real, typename Vector>
__device__ Vector quda::VectorCache< real, Vector >::load ( int  x,
int  y,
int  z 
)
inline

Load a vector from the shared memory cache.

Parameters
[in]xThe x index to use
[in]yThe y index to use
[in]zThe z index to use
Returns
The Vector at coordinates (x,y,z)

Definition at line 57 of file shared_memory_cache_helper.cuh.

References quda::VectorCache< real, Vector >::cache().

Referenced by quda::constantInv(), quda::ndegTwistedMass(), and quda::variableInv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save()

template<typename real, typename Vector>
__device__ void quda::VectorCache< real, Vector >::save ( const Vector a)
inline

Save the vector into the 3-d shared memory cache. Implicitly store the vector at coordinates given by threadIdx.

Parameters
[in]aThe vector to store in the shared memory cache

Definition at line 40 of file shared_memory_cache_helper.cuh.

References quda::VectorCache< real, Vector >::cache().

Referenced by quda::constantInv(), quda::ndegTwistedMass(), and quda::variableInv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sync()

template<typename real, typename Vector>
__device__ void quda::VectorCache< real, Vector >::sync ( )
inline

Synchronize the cache.

Definition at line 72 of file shared_memory_cache_helper.cuh.

Referenced by quda::constantInv(), quda::ndegTwistedMass(), and quda::variableInv().

Here is the caller graph for this function:

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