.TH "MPSMatrixVectorMultiplication" 3 "Mon Jul 9 2018" "Version MetalPerformanceShaders-119.3" "MetalPerformanceShaders.framework" \" -*- nroff -*- .ad l .nh .SH NAME MPSMatrixVectorMultiplication .SH SYNOPSIS .br .PP .PP \fC#import \fP .PP Inherits \fBMPSMatrixBinaryKernel\fP\&. .SS "Instance Methods" .in +1c .ti -1c .RI "(nonnull instancetype) \- \fBinitWithDevice:transpose:rows:columns:alpha:beta:\fP" .br .ti -1c .RI "(nonnull instancetype) \- \fBinitWithDevice:rows:columns:\fP" .br .ti -1c .RI "(nonnull instancetype) \- \fBinitWithDevice:\fP" .br .ti -1c .RI "(void) \- \fBencodeToCommandBuffer:inputMatrix:inputVector:resultVector:\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP This depends on Metal\&.framework\&. .PP \fBA\fP matrix-vector multiplication kernel\&. .PP \fBA\fP \fBMPSMatrixVectorMultiplication\fP object computes: .PP .nf 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. .fi .PP .SH "Method Documentation" .PP .SS "\- (void) encodeToCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(\fBMPSMatrix\fP *__nonnull) inputMatrix(\fBMPSVector\fP *__nonnull) inputVector(\fBMPSVector\fP *__nonnull) resultVector" Encode a \fBMPSMatrixVectorMultiplication\fP object to a command buffer\&. .PP \fBParameters:\fP .RS 4 \fIcommandBuffer\fP \fBA\fP valid MTLCommandBuffer to receive the encoded kernel\&. .br \fIinputMatrix\fP \fBA\fP valid \fBMPSMatrix\fP object which specifies the input matrix \fBA\fP\&. .br \fIinputVector\fP \fBA\fP valid \fBMPSVector\fP object which specifies the input vector x\&. .br \fIresultVector\fP \fBA\fP valid \fBMPSVector\fP object which specifies the addend vector which will also be overwritten by the result\&. .RE .PP The left input matrix must be large enough to hold an array of size (rows x columns) elements beginning at primarySourceMatrixOrigin\&. .PP 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\&. .PP 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\&. .SS "\- (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device" Use the above initialization method instead\&. .PP Reimplemented from \fBMPSKernel\fP\&. .SS "\- (nonnull instancetype) \fBinitWithDevice:\fP (nonnull id< MTLDevice >) device(NSUInteger) rows(NSUInteger) columns" 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\&. .PP \fBParameters:\fP .RS 4 \fIdevice\fP The device on which the kernel will execute\&. .br \fIrows\fP The number of rows in the input matrix \fBA\fP, and the number of elements in the vector y\&. .br \fIcolumns\fP The number of columns in the input matrix \fBA\fP, and the number of elements in the input vector x\&. .RE .PP \fBReturns:\fP .RS 4 \fBA\fP valid \fBMPSMatrixVectorMultiplication\fP object or nil, if failure\&. .RE .PP .SS "\- (nonnull instancetype) \fBinitWithDevice:\fP (nonnull id< MTLDevice >) device(BOOL) transpose(NSUInteger) rows(NSUInteger) columns(double) alpha(double) beta" Initialize an \fBMPSMatrixVectorMultiplication\fP object on a device for a given size and desired transpose and scale values\&. .PP \fBParameters:\fP .RS 4 \fIdevice\fP The device on which the kernel will execute\&. .br \fItranspose\fP \fBA\fP boolean value which indicates if the input matrix should be used in transposed form\&. if 'YES' then op(A) == A**T, otherwise op(A) == \fBA\fP\&. .br \fIrows\fP The number of rows in the input matrix op(A), and the number of elements in the vector y\&. .br \fIcolumns\fP The number of columns in the input matrix op(A), and the number of elements in the input vector x\&. .br \fIalpha\fP The scale factor to apply to the product\&. Specified in double precision\&. Will be converted to the appropriate precision in the implementation subject to rounding and/or clamping as necessary\&. .br \fIbeta\fP The scale factor to apply to the initial values of y\&. Specified in double precision\&. Will be converted to the appropriate precision in the implementation subject to rounding and/or clamping as necessary\&. .RE .PP \fBReturns:\fP .RS 4 \fBA\fP valid \fBMPSMatrixVectorMultiplication\fP object or nil, if failure\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for MetalPerformanceShaders\&.framework from the source code\&.