SimdSigned in simba::simd - Rust
Description: A lane-wise generalization of `num::Signed` for SIMD values.
Keywords: rust, rustlang, rust-lang, SimdSigned

# Trait simba::simd::SimdSigned

source ·

    pub trait SimdSigned: SimdValue {
        fn simd_abs(&self) -> Self;
        fn simd_abs_sub(&self, other: &Self) -> Self;
        fn simd_signum(&self) -> Self;
        fn is_simd_positive(&self) -> Self::SimdBool;
        fn is_simd_negative(&self) -> Self::SimdBool;
    }

Expand description

A lane-wise generalization of `num::Signed` for SIMD values.

## Required Methods§

source

#### fn simd_abs(&self) -> Self

The absolute value of each lane of `self`.

source

#### fn simd_abs_sub(&self, other: &Self) -> Self

The absolute difference of each lane of `self`.

For each lane, this zero if the lane of self is less than or equal to the corresponding lane of other otherwise the difference between the lane of self and the lane of other is returned.

source

#### fn simd_signum(&self) -> Self

The signum of each lane of `Self`.

source

#### fn is_simd_positive(&self) -> Self::SimdBool

Tests which lane is positive.

source

#### fn is_simd_negative(&self) -> Self::SimdBool

Tests which lane is negative.

## Implementors§

source§

### impl SimdSigned for AutoSimd<[f32; 2]>

source§

### impl SimdSigned for AutoSimd<[f32; 4]>

source§

### impl SimdSigned for AutoSimd<[f32; 8]>

source§

### impl SimdSigned for AutoSimd<[f32; 16]>

source§

### impl SimdSigned for AutoSimd<[f64; 2]>

source§

### impl SimdSigned for AutoSimd<[f64; 4]>

source§

### impl SimdSigned for AutoSimd<[f64; 8]>

source§

### impl<T: Signed + SimdValue<SimdBool = bool>> SimdSigned for T