QUDA
1.0.0
|
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... | |
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.
|
inlineprivate |
This is the handle to the shared memory.
Definition at line 28 of file shared_memory_cache_helper.cuh.
Referenced by quda::VectorCache< real, Vector >::load(), and quda::VectorCache< real, Vector >::save().
|
inline |
Load a vector from the shared memory cache.
[in] | x | The x index to use |
[in] | y | The y index to use |
[in] | z | The z index to use |
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().
|
inline |
Save the vector into the 3-d shared memory cache. Implicitly store the vector at coordinates given by threadIdx.
[in] | a | The 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().
|
inline |
Synchronize the cache.
Definition at line 72 of file shared_memory_cache_helper.cuh.
Referenced by quda::constantInv(), quda::ndegTwistedMass(), and quda::variableInv().