<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/ComputeNodeGraph/StructureDefinition",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Compute Graph",
      "ComputeGraph"
    ],
    "preciseIdentifier" : "s:12ComputeGraph0a4NodeB0V19StructureDefinitionV"
  },
  "title" : "ComputeNodeGraph.StructureDefinition"
}
-->

# ComputeNodeGraph.StructureDefinition

A named structure type, pairing a type name with its in-memory layout.

```
struct StructureDefinition
```

## Overview

A structure definition describes a composite value that can flow through a
compute graph. It associates a Swift- or Metal-visible type name with a
[`ComputeNodeGraph.StructureLayout`](/documentation/ComputeGraph/ComputeNodeGraph/StructureLayout) that lays out the structure’s members,
their offsets, and its overall size and stride.

Use a structure definition to refer to user-defined aggregate types from
other graph types, such as [`ComputeNodeGraph.ValueType.structure(definition:)`](/documentation/ComputeGraph/ComputeNodeGraph/ValueType/structure(definition:))
or `ComputeNodeGraph/StateType/structure(typeName:layout:)`.

## Topics

### Initializers

[`init(typeName: String, layout: ComputeNodeGraph.StructureLayout)`](/documentation/ComputeGraph/ComputeNodeGraph/StructureDefinition/init(typeName:layout:))

### Instance Properties

[`var layout: ComputeNodeGraph.StructureLayout`](/documentation/ComputeGraph/ComputeNodeGraph/StructureDefinition/layout)

The in-memory layout of the structure’s members.

[`var typeName: String`](/documentation/ComputeGraph/ComputeNodeGraph/StructureDefinition/typeName)

The name used to refer to the structure type.

## Relationships

### Conforms To

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

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

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

---

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)