---
title: "init(accelerationStructureSize:buildScratchBufferSize:refitScratchBufferSize:)"
framework: metal
role: symbol
role_heading: Initializer
path: "metal/mtlaccelerationstructuresizes/init(accelerationstructuresize:buildscratchbuffersize:refitscratchbuffersize:)"
---

# init(accelerationStructureSize:buildScratchBufferSize:refitScratchBufferSize:)

Creates an acceleration sizes instance with specific values.

## Declaration

```swift
init(accelerationStructureSize: Int, buildScratchBufferSize: Int, refitScratchBufferSize: Int)
```

## Parameters

- `accelerationStructureSize`: The size of the acceleration structure, in bytes.
- `buildScratchBufferSize`: The amount of scratch memory, in bytes, the GPU devices needs to build the acceleration structure.
- `refitScratchBufferSize`: The amount of scratch memory, in bytes, the GPU device needs to refit the acceleration structure.

## See Also

### Creating an acceleration size structure

- [init()](metal/mtlaccelerationstructuresizes/init().md)
