---
title: ComputeNodeGraph.StateType
framework: Compute Graph
role: symbol
role_heading: Enumeration
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: computegraph/computenodegraph/statetype
---

# ComputeNodeGraph.StateType

The shape of a value stored in a compute graph’s state.

## Declaration

```swift
enum StateType
```

## Overview

Overview StateType describes what kind of value a state holds. The shape determines the slot’s size, alignment, and how it is surfaced in generated Metal source and in graph serialization.

## Topics

### Enumeration Cases

- [ComputeNodeGraph.StateType.array(definition:)](computegraph/computenodegraph/statetype/array(definition:).md)
- [ComputeNodeGraph.StateType.data(length:)](computegraph/computenodegraph/statetype/data(length:).md)
- [ComputeNodeGraph.StateType.dataType(type:)](computegraph/computenodegraph/statetype/datatype(type:).md)
- [ComputeNodeGraph.StateType.primitive(type:)](computegraph/computenodegraph/statetype/primitive(type:).md)
- [ComputeNodeGraph.StateType.structure(definition:)](computegraph/computenodegraph/statetype/structure(definition:).md)

### Instance Methods

- [loadBuffer(from:)](computegraph/computenodegraph/statetype/loadbuffer(from:).md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
