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

# simd_bitselect(_:_:_:)

Returns a vector that contains elements from either the first or second parameter, based on the corresponding element in the third parameter.

## Declaration

```swift
func simd_bitselect(_ x: simd_ushort8, _ y: simd_ushort8, _ mask: simd_short8) -> simd_ushort8
```

## See Also

### Logic and Bitwise Functions

- [simd_any(_:)](simd/simd_any(_:)-6pgp3.md)
- [simd_all(_:)](simd/simd_all(_:)-1yk7d.md)
