---
title: MPSMatrixCopyToImage
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsmatrixcopytoimage
---

# MPSMatrixCopyToImage

A kernel that copies matrix data to a Metal Performance Shaders image.

## Declaration

```swift
class MPSMatrixCopyToImage
```

## Topics

### Initializers

- [init(coder:device:)](metalperformanceshaders/mpsmatrixcopytoimage/init(coder:device:).md)
- [init(device:dataLayout:)](metalperformanceshaders/mpsmatrixcopytoimage/init(device:datalayout:).md)

### Instance Properties

- [dataLayout](metalperformanceshaders/mpsmatrixcopytoimage/datalayout.md)
- [sourceMatrixBatchIndex](metalperformanceshaders/mpsmatrixcopytoimage/sourcematrixbatchindex.md)
- [sourceMatrixOrigin](metalperformanceshaders/mpsmatrixcopytoimage/sourcematrixorigin.md)

### Instance Methods

- [encode(commandBuffer:sourceMatrix:destinationImage:)](metalperformanceshaders/mpsmatrixcopytoimage/encode(commandbuffer:sourcematrix:destinationimage:).md)
- [encodeBatch(commandBuffer:sourceMatrix:destinationImages:)](metalperformanceshaders/mpsmatrixcopytoimage/encodebatch(commandbuffer:sourcematrix:destinationimages:).md)

## Relationships

### Inherits From

- [MPSKernel](metalperformanceshaders/mpskernel.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Matrix Copying Operations

- [MPSMatrixCopy](metalperformanceshaders/mpsmatrixcopy.md)
- [MPSMatrixCopyDescriptor](metalperformanceshaders/mpsmatrixcopydescriptor.md)
- [MPSImageCopyToMatrix](metalperformanceshaders/mpsimagecopytomatrix.md)
