Contents

init(dimensions:columns:rowBytes:dataType:)

Creates a matrix descriptor with the specified dimensions and data type.

Declaration

convenience init(dimensions rows: Int, columns: Int, rowBytes: Int, dataType: MPSDataType)

Parameters

  • rows:

    The number of rows in the matrix.

  • columns:

    The number of columns in the matrix.

  • rowBytes:

    The stride, in bytes, between corresponding elements of consecutive rows in the matrix.

  • dataType:

    The type of the data to be stored in the matrix.

Return Value

A valid MPSMatrixDescriptor object.

Discussion

For performance considerations, the optimal row stride may not necessarily be equal to the number of columns in the matrix. The rowBytes(fromColumns:dataType:) method may be used to help you determine this value.

See Also

Methods