---
title: MTLHeapType.automatic
framework: metal
role: symbol
role_heading: Case
path: metal/mtlheaptype/automatic
---

# MTLHeapType.automatic

A heap that automatically places new resource allocations.

## Declaration

```swift
case automatic
```

## Discussion

Discussion In an automatic heap, Metal automatically determines the locations of resources allocated by the heap, with a layout specific to the GPU. Automatic heaps may perform better than manually placing resources in the heap (MTLHeapType.placement). Use automatic heaps when the heap primarily contains temporary resources that you write to often.

## See Also

### Specifying the heap type

- [MTLHeapType.placement](metal/mtlheaptype/placement.md)
- [MTLHeapType.sparse](metal/mtlheaptype/sparse.md)
