<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSVector",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSVector"
  },
  "title" : "MPSVector"
}
-->

# MPSVector

A 1D array of data that stores the data’s values.

```
class MPSVector
```

## Topics

### Initializers

[`-  initWithBuffer:descriptor:`](/documentation/MetalPerformanceShaders/MPSVector/init(buffer:descriptor:))

[`-  initWithBuffer:offset:descriptor:`](/documentation/MetalPerformanceShaders/MPSVector/init(buffer:offset:descriptor:))

[`-  initWithDevice:descriptor:`](/documentation/MetalPerformanceShaders/MPSVector/init(device:descriptor:))

### Instance Properties

[`data`](/documentation/MetalPerformanceShaders/MPSVector/data)

[`dataType`](/documentation/MetalPerformanceShaders/MPSVector/dataType)

[`device`](/documentation/MetalPerformanceShaders/MPSVector/device)

[`length`](/documentation/MetalPerformanceShaders/MPSVector/length)

[`vectorBytes`](/documentation/MetalPerformanceShaders/MPSVector/vectorBytes)

[`vectors`](/documentation/MetalPerformanceShaders/MPSVector/vectors)

[`offset`](/documentation/MetalPerformanceShaders/MPSVector/offset)

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

### Inherited By

[`MPSTemporaryVector`](/documentation/MetalPerformanceShaders/MPSTemporaryVector)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)