QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input > Class Template Reference
Inheritance diagram for quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >:
Inheritance graph
[legend]
Collaboration diagram for quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >:
Collaboration graph
[legend]

Public Member Functions

 CopyCuda (Output &Y, Input &X, int length, int nParity)
 
virtual ~CopyCuda ()
 
TuneKey tuneKey () const
 
void apply (const cudaStream_t &stream)
 
void preTune ()
 
void postTune ()
 
void initTuneParam (TuneParam &param) const
 
void defaultTuneParam (TuneParam &param) const
 
long long flops () const
 
long long bytes () const
 
int tuningIter () const
 
- Public Member Functions inherited from quda::Tunable
 Tunable ()
 
virtual ~Tunable ()
 
virtual std::string paramString (const TuneParam &param) const
 
virtual std::string perfString (float time) const
 
virtual bool advanceTuneParam (TuneParam &param) const
 
void checkLaunchParam (TuneParam &param)
 
CUresult jitifyError () const
 
CUresult & jitifyError ()
 

Private Member Functions

unsigned int sharedBytesPerThread () const
 
unsigned int sharedBytesPerBlock (const TuneParam &param) const
 
virtual bool advanceSharedBytes (TuneParam &param) const
 

Private Attributes

Input & X
 
Output & Y
 
const int length
 
const int nParity
 

Additional Inherited Members

- Protected Member Functions inherited from quda::Tunable
virtual unsigned int minThreads () const
 
virtual bool tuneGridDim () const
 
virtual bool tuneAuxDim () const
 
virtual bool tuneSharedBytes () const
 
virtual bool advanceGridDim (TuneParam &param) const
 
virtual unsigned int maxBlockSize (const TuneParam &param) const
 
virtual unsigned int maxGridSize () const
 
virtual unsigned int minGridSize () const
 
virtual int gridStep () const
 gridStep sets the step size when iterating the grid size in advanceGridDim. More...
 
virtual int blockStep () const
 
virtual int blockMin () const
 
virtual void resetBlockDim (TuneParam &param) const
 
virtual bool advanceBlockDim (TuneParam &param) const
 
unsigned int maxBlocksPerSM () const
 For some reason this can't be queried from the device properties, so here we set set this. Based on Table 14 of the CUDA Programming Guide 10.0 (Technical Specifications per Compute Capability) More...
 
template<typename F >
void setMaxDynamicSharedBytesPerBlock (F *func) const
 Enable the maximum dynamic shared bytes for the kernel "func" (values given by maxDynamicSharedBytesPerBlock()). More...
 
unsigned int maxDynamicSharedBytesPerBlock () const
 This can't be correctly queried in CUDA for all architectures so here we set set this. Based on Table 14 of the CUDA Programming Guide 10.0 (Technical Specifications per Compute Capability). More...
 
virtual unsigned int maxSharedBytesPerBlock () const
 The maximum shared memory that a CUDA thread block can use in the autotuner. This isn't necessarily the same as maxDynamicSharedMemoryPerBlock since that may need explicit opt in to enable (by calling setMaxDynamicSharedBytes for the kernel in question). If the CUDA kernel in question does this opt in then this function can be overloaded to return maxDynamicSharedBytesPerBlock. More...
 
virtual bool advanceAux (TuneParam &param) const
 
int writeAuxString (const char *format,...)
 
- Protected Attributes inherited from quda::Tunable
char aux [TuneKey::aux_n]
 
CUresult jitify_error
 

Detailed Description

template<typename FloatN, int N, typename Output, typename Input>
class quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >

Definition at line 46 of file copy_quda.cu.

Constructor & Destructor Documentation

◆ CopyCuda()

template<typename FloatN , int N, typename Output , typename Input >
quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::CopyCuda ( Output &  Y,
Input &  X,
int  length,
int  nParity 
)
inline

Definition at line 68 of file copy_quda.cu.

◆ ~CopyCuda()

template<typename FloatN , int N, typename Output , typename Input >
virtual quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::~CopyCuda ( )
inlinevirtual

Definition at line 70 of file copy_quda.cu.

Member Function Documentation

◆ advanceSharedBytes()

template<typename FloatN , int N, typename Output , typename Input >
virtual bool quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::advanceSharedBytes ( TuneParam param) const
inlineprivatevirtual

The goal here is to throttle the number of thread blocks per SM by over-allocating shared memory (in order to improve L2 utilization, etc.). We thus request the smallest amount of dynamic shared memory that guarantees throttling to a given number of blocks, in order to allow some extra leeway.

Reimplemented from quda::Tunable.

Definition at line 57 of file copy_quda.cu.

References quda::Tunable::advanceBlockDim(), quda::TuneParam::block, quda::TuneParam::shared_bytes, quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::sharedBytesPerBlock(), and quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::sharedBytesPerThread().

Here is the call graph for this function:

◆ apply()

template<typename FloatN , int N, typename Output , typename Input >
void quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::apply ( const cudaStream_t &  stream)
inlinevirtual

◆ bytes()

template<typename FloatN , int N, typename Output , typename Input >
long long quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::bytes ( ) const
inlinevirtual

◆ defaultTuneParam()

template<typename FloatN , int N, typename Output , typename Input >
void quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::defaultTuneParam ( TuneParam param) const
inlinevirtual

sets default values for when tuning is disabled

Reimplemented from quda::Tunable.

Definition at line 89 of file copy_quda.cu.

References quda::Tunable::defaultTuneParam(), quda::TuneParam::grid, and quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::nParity.

Here is the call graph for this function:

◆ flops()

template<typename FloatN , int N, typename Output , typename Input >
long long quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::flops ( ) const
inlinevirtual

Implements quda::Tunable.

Definition at line 94 of file copy_quda.cu.

◆ initTuneParam()

template<typename FloatN , int N, typename Output , typename Input >
void quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::initTuneParam ( TuneParam param) const
inlinevirtual

Reimplemented from quda::Tunable.

Definition at line 84 of file copy_quda.cu.

References quda::TuneParam::grid, quda::Tunable::initTuneParam(), and quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::nParity.

Here is the call graph for this function:

◆ postTune()

template<typename FloatN , int N, typename Output , typename Input >
void quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::postTune ( )
inlinevirtual

Reimplemented from quda::Tunable.

Definition at line 82 of file copy_quda.cu.

◆ preTune()

template<typename FloatN , int N, typename Output , typename Input >
void quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::preTune ( )
inlinevirtual

Reimplemented from quda::Tunable.

Definition at line 81 of file copy_quda.cu.

◆ sharedBytesPerBlock()

template<typename FloatN , int N, typename Output , typename Input >
unsigned int quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::sharedBytesPerBlock ( const TuneParam param) const
inlineprivatevirtual

Implements quda::Tunable.

Definition at line 55 of file copy_quda.cu.

Referenced by quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::advanceSharedBytes().

Here is the caller graph for this function:

◆ sharedBytesPerThread()

template<typename FloatN , int N, typename Output , typename Input >
unsigned int quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::sharedBytesPerThread ( ) const
inlineprivatevirtual

Implements quda::Tunable.

Definition at line 54 of file copy_quda.cu.

Referenced by quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::advanceSharedBytes().

Here is the caller graph for this function:

◆ tuneKey()

template<typename FloatN , int N, typename Output , typename Input >
TuneKey quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::tuneKey ( ) const
inlinevirtual

Implements quda::Tunable.

Definition at line 72 of file copy_quda.cu.

References quda::blas::copy_ns::blasStrings.

◆ tuningIter()

template<typename FloatN , int N, typename Output , typename Input >
int quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::tuningIter ( ) const
inlinevirtual

Reimplemented from quda::Tunable.

Definition at line 102 of file copy_quda.cu.

Member Data Documentation

◆ length

template<typename FloatN , int N, typename Output , typename Input >
const int quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::length
private

◆ nParity

template<typename FloatN , int N, typename Output , typename Input >
const int quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::nParity
private

◆ X

template<typename FloatN , int N, typename Output , typename Input >
Input& quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::X
private

◆ Y

template<typename FloatN , int N, typename Output , typename Input >
Output& quda::blas::copy_ns::CopyCuda< FloatN, N, Output, Input >::Y
private

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