---
title: "init(in:in_type:out:out_type:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/bnnsarithmeticunary/init(in:in_type:out:out_type:)"
---

# init(in:in_type:out:out_type:)

Returns a new arithmetic structure that takes a single input from the specified parameters.

## Declaration

```swift
init(in: BNNSNDArrayDescriptor, in_type: BNNSDescriptorType, out: BNNSNDArrayDescriptor, out_type: BNNSDescriptorType)
```

## Parameters

- `in`: The descriptor of the input.
- `in_type`: The descriptor type of the input.
- `out`: The descriptor of the output.
- `out_type`: The descriptor type of the output.

## Discussion

Discussion important: The input data type must be equal to the output data type. The input size must equal the output size or 1. Arithmetic layers only support arrays with a data type of float, and a data layout of BNNS.DataLayout.vector, BNNS.DataLayout.matrixRowMajor, BNNS.DataLayout.matrixColumnMajor, or BNNS.DataLayout.imageCHW.

## See Also

### Creating an Arithmetic Structure

- [init()](accelerate/bnnsarithmeticunary/init().md)
