---
title: "lessThan(_:_:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/lessthan(_:_:name:)"
---

# lessThan(_:_:name:)

Checks in an elementwise manner if the first input tensor is less than the second.

## Declaration

```swift
func lessThan(_ primaryTensor: MPSGraphTensor, _ secondaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

- `primaryTensor`: The LHS tensor of the binary Op.
- `secondaryTensor`: The RHS tensor of the binary Op.
- `name`: An optional string which serves as an identifier for the operation.

## Return Value

Return Value A valid MPSGraphTensor object containing the elementwise result of the applied operation.

## Discussion

Discussion This operation creates a lessThan operation and returns the result tensor. It supports broadcasting as well. resultTensor = primaryTensor < secondaryTensor
