<!--
{
  "availability" : [
    "iOS: 14.0.0 - 18.0.0",
    "iPadOS: 14.0.0 - 18.0.0",
    "macCatalyst: 14.0.0 - 18.0.0",
    "macOS: 11.0.0 - 15.0.0",
    "tvOS: 14.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 7.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSArithmeticBinary/init(in1:in1_type:in2:in2_type:out:out_type:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:So20BNNSArithmeticBinarya3in10C5_type3in20e1_D03out0f1_D0ABSo21BNNSNDArrayDescriptora_So18BNNSDescriptorTypeaAjljLtcfc"
  },
  "title" : "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.

```
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

> 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 ``doc://com.apple.accelerate/documentation/Accelerate/BNNS/DataLayout/vector``, ``doc://com.apple.accelerate/documentation/Accelerate/BNNS/DataLayout/matrixRowMajor``, ``doc://com.apple.accelerate/documentation/Accelerate/BNNS/DataLayout/matrixColumnMajor``, or ``doc://com.apple.accelerate/documentation/Accelerate/BNNS/DataLayout/imageCHW``.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)