---
title: "init(reductionMode:offsets:strides:dilationRates:explicitPadding:boundaryMode:paddingStyle:paddingConstant:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Initializer
path: "metalperformanceshadersgraph/mpsgraphstencilopdescriptor/init(reductionmode:offsets:strides:dilationrates:explicitpadding:boundarymode:paddingstyle:paddingconstant:)"
---

# init(reductionMode:offsets:strides:dilationRates:explicitPadding:boundaryMode:paddingStyle:paddingConstant:)

Creates a stencil operation descriptor with given values.

## Declaration

```swift
convenience init?(reductionMode: MPSGraphReductionMode, offsets: [NSNumber], strides: [NSNumber], dilationRates: [NSNumber], explicitPadding: [NSNumber], boundaryMode: MPSGraphPaddingMode, paddingStyle: MPSGraphPaddingStyle, paddingConstant: Float)
```

## Parameters

- `reductionMode`: See reductionMode property.
- `offsets`: See offsets property.
- `strides`: See strides property.
- `dilationRates`: See dilationRates property.
- `explicitPadding`: See explicitPadding property.
- `boundaryMode`: See boundaryMode property.
- `paddingStyle`: See paddingStyle property.
- `paddingConstant`: See paddingConstant property.

## Return Value

Return Value A valid MPSGraphStencilOpDescriptor object
