Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mpsmatrixcopydescriptor(3) [mojave man page]

MPSMatrixCopyDescriptor(3)				 MetalPerformanceShaders.framework				MPSMatrixCopyDescriptor(3)

NAME
MPSMatrixCopyDescriptor SYNOPSIS
#import <MPSMatrixCombination.h> Inherits NSObject. Instance Methods (nonnull instancetype) - initWithDevice:count: (void) - setCopyOperationAtIndex:sourceMatrix:destinationMatrix:offsets: (nonnull instancetype) - initWithSourceMatrices:destinationMatrices:offsetVector:offset: (nonnull instancetype) - init Class Methods (nonnull instancetype) + descriptorWithSourceMatrix:destinationMatrix:offsets: Method Documentation + (nonnull instancetype) descriptorWithSourceMatrix: (MPSMatrix *__nonnull) sourceMatrix(MPSMatrix *__nonnull) destinationMatrix(MPSMatrixCopyOffsets) offsets convenience allocator for single copies - (nonnull instancetype) init - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(NSUInteger) count initialize a MPSMatrixCopyDescriptor with default values. Use -setCopyOperationAtIndex:sourceMatrix:destinationMatrix:copyOffsets to initialize. All indices must be initialized before use. Parameters: device The device on which the copy will be performed count The number of copy operations the object will encode Returns: A MPSMatrixCopyDescriptor. It still needs to be initialized with -setCopyOperationAtIndex:sourceMatrix:destinationMatrix:copyOffsets - (nonnull instancetype) initWithSourceMatrices: (NSArray< MPSMatrix * > *__nonnull) sourceMatrices(NSArray< MPSMatrix * > *__nonnull) destinationMatrices(MPSVector *__nullable) offsets(NSUInteger) byteOffset Initialize a MPSMatrixCopyDescriptor using offsets generated on the GPU Use this method when the offsets needed are coming from GPU based computation. Parameters: sourceMatrices A list of matrices from which the matrix data is read destinationMatrices A list of matrices to which to write the data. The count must match the number of source matrices. offsets A MPSVector of type MPSDataTypeUInt32 containing the list of offsets, stored as a packed array of MPSMatrixCopyOffsets. byteOffset A byte offset into the offsets vector where the data starts in 'offsets'. This value must be a multiple of 16. Returns: A valid MPSMatrixCopyDescriptor to represent the list of copy operations - (void) setCopyOperationAtIndex: (NSUInteger) index(MPSMatrix *__nonnull) sourceMatrix(MPSMatrix *__nonnull) destinationMatrix(MPSMatrixCopyOffsets) offsets Initialize a MPSMatrixCopyDescriptor using offsets generated on the CPU This is for one at a time intialization of the copy operations Parameters: index The index of the copy operation sourceMatrix The source matrix for this copy operation destinationMatrix The destination matrix for this copy operation offsets The offsets to use for the copy operation Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSMatrixCopyDescriptor(3)

Check Out this Related Man Page

MPSImageCopyToMatrix(3) 				 MetalPerformanceShaders.framework				   MPSImageCopyToMatrix(3)

NAME
MPSImageCopyToMatrix SYNOPSIS
#import <MPSImageCopy.h> Inherits MPSKernel. Instance Methods (nonnull instancetype) - initWithDevice:dataLayout: (nullable instancetype) - initWithCoder:device: (void) - encodeToCommandBuffer:sourceImage:destinationMatrix: Properties MTLOrigin destinationMatrixOrigin NSUInteger destinationMatrixBatchIndex MPSDataLayout dataLayout Additional Inherited Members Detailed Description MPSImageCopy.h MetalPerformanceShaders.framework Copyright: Copyright (c) 2017 Apple Inc. All rights reserved. MetalPerformanceShaders histogram filters The MPSImageCopyToMatrix copies image data to a MPSMatrix. The image data is stored in a row of a matrix. The dataLayout specifies the order in which the feature channels in the MPSImage get stored in the matrix. If MPSImage stores a batch of images, the images are copied into multiple rows, one row per image. The number of elements in a row in the matrix must be >= image width * image height * number of featureChannels in the image. Method Documentation - (void) encodeToCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(nonnull MPSImage *) sourceImage(nonnull MPSMatrix *) destinationMatrix Encode a kernel that copies a MPSImage to a MPSMatrix into a command buffer using a MTLComputeCommandEncoder. The kernel copies feature channels from sourceImage to the buffer associated with destinationMatrix. The kernel will not begin to execute until after the command buffer has been enqueued and committed. NOTE: The destinationMatrix.dataType must match the feature channel data type in sourceImage. Parameters: commandBuffer A valid MTLCommandBuffer. sourceImage A valid MPSImage describing the image to copy from. destinationMatrix A valid MPSMatrix or MPSTemporaryMatrix object describing the matrix to copy to. - (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device NSSecureCoding compatability While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. Parameters: aDecoder The NSCoder subclass with your serialized MPSKernel device The MTLDevice on which to make the MPSKernel Returns: A new MPSKernel object, or nil if failure. Reimplemented from MPSKernel. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(MPSDataLayout) dataLayout Initialize a MPSMatrixCopy object on a device Parameters: device The device the kernel will run on dataLayout The data layout Returns: A valid MPSMatrixCopy object or nil, if failure. Property Documentation - dataLayout [read], [nonatomic], [assign] The data layout to use Returns the data layout. When copying from a MPSImage to a MPSMatrix, this describes the order in which the image values are stored in the buffer associated with the MPSMatrix. Default: MPSDataLayoutFeatureChannelsxHeightxWidth - destinationMatrixBatchIndex [read], [write], [nonatomic], [assign] The index of the destination matrix in the batch. This property is modifiable and defaults to 0 at initialization time. - destinationMatrixOrigin [read], [write], [nonatomic], [assign] The origin, relative to [0, 0] in the destination matrix, at which to start writing results. This property is modifiable and defaults to [0, 0] at initialization time. If a different origin is desired then this should be modified prior to encoding the kernel. The z value must be 0. Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSImageCopyToMatrix(3)
Man Page