MPSMatrixVectorMultiplication(3) | MetalPerformanceShaders.framework | MPSMatrixVectorMultiplication(3) |
MPSMatrixVectorMultiplication
#import <MPSMatrixMultiplication.h>
Inherits MPSMatrixBinaryKernel.
(nonnull instancetype) -
initWithDevice:transpose:rows:columns:alpha:beta:
(nonnull instancetype) - initWithDevice:rows:columns:
(nonnull instancetype) - initWithDevice:
(void) - encodeToCommandBuffer:inputMatrix:inputVector:resultVector:
This depends on Metal.framework.
A matrix-vector multiplication kernel.
A MPSMatrixVectorMultiplication object computes:
y = alpha * op(A) * x + beta * y
A is a matrix represented by a MPSMatrix object. alpha and beta
are scalar values (of the same data type as values of y) which are
applied as shown above. A may have an optional transposition
operation applied.
A MPSMatrixVectorMultiplication object is initialized with the transpose
operator to apply to A, sizes for the operation to perform,
and the scalar values alpha and beta.
Encode a MPSMatrixVectorMultiplication object to a command buffer.
Parameters:
The left input matrix must be large enough to hold an array of size (rows x columns) elements beginning at primarySourceMatrixOrigin.
The input vector must be large enough to hold an array of size (columns) elements beginning at secondarySourceMatrixOrigin.x secondarySourceMatrixOrigin.y and secondarySourceMatrixOrigin.z must be zero.
The result vector must be large enough to hold an array of size (rows) elements beginning at resultMatrixOrigin.x. resultMatrixOrigin.y and resultMatrixOrigin.z must be zero.
Use the above initialization method instead.
Reimplemented from MPSKernel.
Convenience initialization for a matrix-vector multiplication with no transposition, unit scaling of the product, and no accumulation of the result. The scaling factors alpha and beta are taken to be 1.0 and 0.0 respectively.
Parameters:
Returns:
Initialize an MPSMatrixVectorMultiplication object on a device for a given size and desired transpose and scale values.
Parameters:
Returns:
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |