---
title: MPSGraphIfThenElseBlock
framework: metalperformanceshadersgraph
role: symbol
role_heading: Type Alias
path: metalperformanceshadersgraph/mpsgraphifthenelseblock
---

# MPSGraphIfThenElseBlock

A block of operations executed under either the if or else condition.

## Declaration

```swift
typealias MPSGraphIfThenElseBlock = () -> [MPSGraphTensor]
```

## Return Value

Return Value Tensors returned by user. If not empty, the user must define both the then and else blocks, both should have the same number of arguments, and each corresponding argument should have the same element types.
