---
title: "encodeAtomicRepresentation(_:)"
framework: swift
role: symbol
role_heading: Type Method
path: "swift/int16/encodeatomicrepresentation(_:)"
---

# encodeAtomicRepresentation(_:)

Destroys a value of Self and prepares an AtomicRepresentation storage type to be used for atomic operations.

## Declaration

```swift
static func encodeAtomicRepresentation(_ value: borrowing Int16) -> Int16.AtomicRepresentation
```

## Parameters

- `value`: A valid instance of Self that’s about to be destroyed to encode an instance of its AtomicRepresentation.

## Return Value

Return Value The newly encoded AtomicRepresentation storage.

## Discussion

Discussion note: This is not an atomic operation. This simply encodes the logical type Self into its storage representation suitable for atomic operations, AtomicRepresentation.
