Prev | Next |
atomic_mat_mul mat_mul(name)
call_id = mat_mul.set(n_left, n_middle, n_right)
mat_mul.get(call_id, n_left, n_middle, n_right)
mat_mul(call_id, x, y)
C = A * B
.
A
and
C
.
This is an argument (return value) for the set
(get
) routine.
A
and row dimension of the matrix
B
This is an argument (return value) for the set
(get
) routine.
B
and
C
.
This is an argument (return value) for the set
(get
) routine.
set
(get
) routine.
x
to denote the argument to the atomic function.
The size of this vector must be
n = n_left * n_middle + n_middle * n_right
The matrix
A
is stored in row major order at the beginning of
x
; i.e. its
(i,k)
element is
A(i,k) = x[ i * n_middle + k]
The matrix
B
is stored in row major order at the end of
x
; i.e. its
(k,j)
element is
B(k,j) = x[ n_left * n_middle + k * n_right + j ]
y
to denote the result of the atomic function.
The size of this vector must be
m = n_middle * n_right
.
The matrix
C
is stored in row major order in
y
;
i.e. its
(i,k)
element is
C(i,j) = y[ i * n_right + j]
k
-th order Taylor coefficient
@(@
C^{(k)}
@)@ is given by
@[@
C^{(k)} = \sum_{\ell = 0}^{k} A^{(\ell)} B^{(k-\ell)}
@]@
atomic_four_mat_mul_implement | Implementing Atomic Matrix Multiply |
atomic_four_mat_mul_forward.cpp | Atomic Matrix Multiply Forward Mode: Example and Test |
atomic_four_mat_mul_reverse.cpp | Atomic Matrix Multiply Reverse Mode: Example and Test |
atomic_four_mat_mul_sparsity.cpp | Atomic Matrix Multiply Sparsity Patterns: Example and Test |
atomic_four_mat_mul_rev_depend.cpp | Atomic Matrix Multiply Reverse Dependency: Example and Test |
atomic_four_mat_mul_identical_zero.cpp | Atomic Matrix Multiply Identical Zero: Example and Test |