38 template <
typename AccumulatorsPerThread_,
39 typename ThreadsPerWarp_,
73 for (
int j = 0; j < AccumulatorsPerThread::kH; ++j) {
74 for (
int i = 0; i < AccumulatorsPerThread::kW; ++i) {
75 d[j * AccumulatorsPerThread::kW + i] = a[i] * b[j] + c[j * AccumulatorsPerThread::kW + i];
ThreadsPerWarp_ ThreadsPerWarp
The number of threads per warp.
Definition: thread_multiply_add.h:49
Shape< A_::kD *B_::kD, A_::kH *B_::kH, A_::kW *B_::kW, A_::kC *B_::kC > Shape
Definition: shape.h:119
A template defining Fragment Concept.
Definition: fragment.h:99
Fragment< ScalarA, AccumulatorsPerThread::kW > FragmentA
The fragment for A.
Definition: thread_multiply_add.h:55
CUTLASS_DEVICE void multiply_add(FragmentA const &a, FragmentB const &b, Accumulators const &c, Accumulators &d)
Multiply : d = a*b + c.
Definition: thread_multiply_add.h:69
Shape< 1, 1, 1, 1 > InstructionShape
The shape of the instruction.
Definition: thread_multiply_add.h:45
ScalarC_ ScalarC
The type for C and D.
Definition: thread_multiply_add.h:61
CUTLASS_DEVICE ThreadMultiplyAdd()
Ctor.
Definition: thread_multiply_add.h:66
A Shape implementing Layout Concept describing the dimensions of a cube.
Definition: shape.h:64
AccumulatorsPerThread_ AccumulatorsPerThread
The number of accumulators per thread.
Definition: thread_multiply_add.h:47
ScalarB_ ScalarB
The type for B.
Definition: thread_multiply_add.h:57
Fragment< ScalarC, AccumulatorsPerThread::kH *AccumulatorsPerThread::kW, 16 > Accumulators
The accumulators.
Definition: thread_multiply_add.h:63
Template performing matrix multiply-add operation within a thread.
Definition: thread_multiply_add.h:43
ScalarA_ ScalarA
The type for A.
Definition: thread_multiply_add.h:53
Fragment< ScalarB, AccumulatorsPerThread::kH > FragmentB
The fragment for B.
Definition: thread_multiply_add.h:59
Defines Fragment, a statically-sized array for storing parts of matrices within a thread's registers...
ShapeMul< AccumulatorsPerThread, ThreadsPerWarp >::Shape AccumulatorsPerWarp
The number of accumulators per warp.
Definition: thread_multiply_add.h:51