---
title: "simd_select(_:_:_:)"
framework: simd
role: symbol
role_heading: Function
path: "simd/simd_select(_:_:_:)-4vjt"
---

# simd_select(_:_:_:)

Returns a vector that contains elements from either the first or second parameter, based on the corresponding element’s high-order bit in the mask.

## Declaration

```swift
func simd_select(_ x: simd_half4, _ y: simd_half4, _ mask: simd_short4) -> simd_half4
```

## See Also

### Logic functions

- [simd_bitselect(_:_:_:)](simd/simd_bitselect(_:_:_:)-6gy8u.md)
