# MemoryScope

`import { MemoryScope } from "destack:sync";`

Memory scope for atomic operations.

```ds title="MemoryScope"
export enum MemoryScope {
    Invocation,
    Subgroup,
    Workgroup,
    Device,
    CrossDevice,
    QueueFamily,
    ShaderCallGroup,
    System,
}
```

[language/library/src/sync/atomic.ds:42:59](https://github.com/destack-sh/destack/blob/main/language/library/src/sync/atomic.ds#L42-L59)

## Variants

### `Invocation`

Single invocation or thread scope.

### `Subgroup`

Subgroup or warp scope.

### `Workgroup`

Workgroup scope.

### `Device`

Device scope.

### `CrossDevice`

Cross device scope.

### `QueueFamily`

Queue family scope.

### `ShaderCallGroup`

Shader call group scope.

### `System`

System wide scope.
