gpucoder.batchedMatrixMultiplyAdd
R2026bOptimized GPU implementation of batched matrix multiply with add operation
Syntax
Description
[
performs matrix-matrix multiplication and add of a batch of matrices
D1,D2] = gpucoder.batchedMatrixMultiplyAdd(A1,B1,C1,A2,B2,C2)A1,B1,C1 and A2,B2,C2. The
gpucoder.batchedMatrixMultiplyAdd function performs matrix-matrix
multiplication of the form:
where and are scalar multiplication factors and A,
B, C, and D are matrices with
dimensions m-by-k,
k-by-n,
m-by-n, and
m-by-n respectively.A and
B can optionally be transposed or hermitian-conjugated. By default, and are set to one and the matrices are not transposed. To specify a different
scalar multiplication factor and perform transpose operations on the input matrices, use the
name-value arguments.
All the batches passed to the
gpucoder.batchedMatrixMultiplyAdd function must be uniform. That is,
all instances must have the same dimensions
m,n,k.
___ = gpucoder.batchedMatrixMultiplyAdd(___,
performs batched matrix multiply and add operation by using the options specified by one or
more name-value arguments.Name=Value)
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2020a
See Also
Apps
Functions
codegen|coder.gpu.kernel|coder.gpu.kernelfun|gpucoder.stridedMatrixMultiply|gpucoder.stridedMatrixMultiplyAdd|gpucoder.batchedMatrixMultiply