Skip to content

Commit

Permalink
Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Jul 12, 2024
1 parent 7a4dd0e commit c8dc14f
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/util/simd/v128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ impl Simd for Simd128i {

fn eq(&self, rhs: &Self) -> Self::Mask {
let mut mask = [0u8; 16];
for i in 0..Self::LANES {
mask[i] = if self.0[i] == rhs.0[i] { 1 } else { 0 };
for (i, item) in mask.iter_mut().enumerate() {
*item = if self.0[i] == rhs.0[i] { 1 } else { 0 };
}
Mask128(mask)
}
Expand All @@ -46,16 +46,16 @@ impl Simd for Simd128i {

fn le(&self, rhs: &Self) -> Self::Mask {
let mut mask = [0u8; 16];
for i in 0..Self::LANES {
mask[i] = if self.0[i] <= rhs.0[i] { 1 } else { 0 };
for (i, item) in mask.iter_mut().enumerate() {
*item = if self.0[i] <= rhs.0[i] { 1 } else { 0 };
}
Mask128(mask)
}

fn gt(&self, rhs: &Self) -> Self::Mask {
let mut mask = [0u8; 16];
for i in 0..Self::LANES {
mask[i] = if self.0[i] > rhs.0[i] { 1 } else { 0 };
for (i, item) in mask.iter_mut().enumerate() {
*item = if self.0[i] > rhs.0[i] { 1 } else { 0 };
}
Mask128(mask)
}
Expand All @@ -81,8 +81,8 @@ impl Simd for Simd128u {

fn eq(&self, rhs: &Self) -> Self::Mask {
let mut mask = [0u8; 16];
for i in 0..Self::LANES {
mask[i] = if self.0[i] == rhs.0[i] { 1 } else { 0 };
for (i, item) in mask.iter_mut().enumerate() {
*item = if self.0[i] == rhs.0[i] { 1 } else { 0 };
}
Mask128(mask)
}
Expand All @@ -93,16 +93,16 @@ impl Simd for Simd128u {

fn le(&self, rhs: &Self) -> Self::Mask {
let mut mask = [0u8; 16];
for i in 0..Self::LANES {
mask[i] = if self.0[i] <= rhs.0[i] { 1 } else { 0 };
for (i, item) in mask.iter_mut().enumerate() {
*item = if self.0[i] <= rhs.0[i] { 1 } else { 0 };
}
Mask128(mask)
}

fn gt(&self, rhs: &Self) -> Self::Mask {
let mut mask = [0u8; 16];
for i in 0..Self::LANES {
mask[i] = if self.0[i] > rhs.0[i] { 1 } else { 0 };
for (i, item) in mask.iter_mut().enumerate() {
*item = if self.0[i] > rhs.0[i] { 1 } else { 0 };
}
Mask128(mask)
}
Expand Down Expand Up @@ -139,8 +139,8 @@ impl BitAnd for Mask128 {

fn bitand(self, rhs: Self) -> Self::Output {
let mut result = [0u8; 16];
for i in 0..16 {
result[i] = self.0[i] & rhs.0[i];
for (i, item) in result.iter_mut().enumerate() {
*item = self.0[i] & rhs.0[i];
}
Mask128(result)
}
Expand All @@ -151,8 +151,8 @@ impl BitOr for Mask128 {

fn bitor(self, rhs: Self) -> Self::Output {
let mut result = [0u8; 16];
for i in 0..16 {
result[i] = self.0[i] | rhs.0[i];
for (i, item) in result.iter_mut().enumerate() {
*item = self.0[i] | rhs.0[i];
}
Mask128(result)
}
Expand Down

0 comments on commit c8dc14f

Please sign in to comment.