---
title: "init(in1:in1_type:in2:in2_type:out:out_type:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/bnnsarithmeticbinary/init(in1:in1_type:in2:in2_type:out:out_type:)"
---

# init(in1:in1_type:in2:in2_type:out:out_type:)

Returns a new arithmetic structure that takes two inputs from the specified parameters.

## Declaration

```swift
init(in1: BNNSNDArrayDescriptor, in1_type: BNNSDescriptorType, in2: BNNSNDArrayDescriptor, in2_type: BNNSDescriptorType, out: BNNSNDArrayDescriptor, out_type: BNNSDescriptorType)
```

## Parameters

- `in1`: The descriptor of the first input.
- `in1_type`: The descriptor type of the first input.
- `in2`: The descriptor of the second input.
- `in2_type`: The descriptor type of the second input.
- `out`: The descriptor of the output.
- `out_type`: The descriptor type of the output.

## Discussion

Discussion important: The data types of the inputs must be equal to the output data type. The size of the inputs must either 1, or the maximum size of either input and the output. 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/bnnsarithmeticbinary/init().md)
