about summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-25 00:02:48 +0000
committerbors <bors@rust-lang.org>2018-03-25 00:02:48 +0000
commit77e2bcb613c58ed2aeb86fdb07f470440f94f205 (patch)
tree438d72590cd19b2f68363d305303edd48b90a90e /src/liballoc/string.rs
parentf5631d9ac7745dd6eaea2bc6c236d5f8e54e9a18 (diff)
parent4eff4d9500968e8a6275185eac153e102996edb5 (diff)
downloadrust-77e2bcb613c58ed2aeb86fdb07f470440f94f205.tar.gz
rust-77e2bcb613c58ed2aeb86fdb07f470440f94f205.zip
Auto merge of #49141 - gnzlbg:simd_select, r=alexcrichton
adds simd_select intrinsic

The select SIMD intrinsic is used to select elements from two SIMD vectors using a mask:

```rust
let mask = b8x4::new(true, false, false, true);
let a = f32x4::new(1., 2., 3., 4.);
let b = f32x4::new(5., 6., 7., 8.);
assert_eq!(simd_select(mask, a, b), f32x4::new(1., 6., 7., 4.));
```

The number of lanes between the mask and the vectors must match, but the vector width of the mask does not need to match that of the vectors. The mask is required to be a vector of signed integers.

Note: this intrinsic will be exposed via `std::simd`'s vector masks - users are not expected to use it directly.
Diffstat (limited to 'src/liballoc/string.rs')
0 files changed, 0 insertions, 0 deletions