diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2023-04-10 00:11:37 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2023-04-22 17:58:54 -0700 |
| commit | 92259a4a6c20b02e87e0589a286bef7b71cd95a9 (patch) | |
| tree | 8970bf3cd099786d47033940f480452373265cc5 | |
| parent | 71d4c368509536f7277e9a1cb6e6286ba6de7911 (diff) | |
| download | rust-92259a4a6c20b02e87e0589a286bef7b71cd95a9.tar.gz rust-92259a4a6c20b02e87e0589a286bef7b71cd95a9.zip | |
Clarify elementwise cmp reduces
Saying "elementwise (non-)equal" may suggest it returns a vector. The comments should be clear that it instead reduces to a scalar. Co-authored-by: Jacob Lifshay <programmerjake@gmail.com>
| -rw-r--r-- | crates/core_simd/src/vector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/core_simd/src/vector.rs b/crates/core_simd/src/vector.rs index 154b467752b..b7b5e0b002f 100644 --- a/crates/core_simd/src/vector.rs +++ b/crates/core_simd/src/vector.rs @@ -709,7 +709,7 @@ where Mask::from_int_unchecked(tfvec) }; - // Two vectors are equal if they are elementwise equal + // Two vectors are equal if all elements are equal when compared elementwise mask.all() } @@ -722,7 +722,7 @@ where Mask::from_int_unchecked(tfvec) }; - // Two vectors are non-equal if they are elementwise non-equal + // Two vectors are non-equal if any elements are non-equal when compared elementwise mask.any() } } |
