1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
use super::*;
use core::mem;

// Newtypes for i16 vectors
// We have to do this to allow for overloading of
// __m128i etc
#[derive(Copy, Debug, Clone)]
pub struct I16x1(pub i16);
impl SimdBase<I16x1, i16> for I16x1 {}
impl SimdSmallInt<I16x1, i16> for I16x1 {}
#[derive(Copy, Debug, Clone)]
pub struct I16x8(pub __m128i);
impl SimdBase<I16x8, i16> for I16x8 {}
impl SimdSmallInt<I16x8, i16> for I16x8 {}
#[derive(Copy, Debug, Clone)]
pub struct I16x16(pub __m256i);
impl SimdBase<I16x16, i16> for I16x16 {}
impl SimdSmallInt<I16x16, i16> for I16x16 {}

// Newtypes for i32 vectors
// We have to do this to allow for overloading of
// __m128i etc
#[derive(Copy, Debug, Clone)]
pub struct I32x1(pub i32);
impl SimdBase<I32x1, i32> for I32x1 {}
impl SimdSmallInt<I32x1, i32> for I32x1 {}
#[derive(Copy, Debug, Clone)]
pub struct I32x4(pub __m128i);
impl SimdBase<I32x4, i32> for I32x4 {}
impl SimdSmallInt<I32x4, i32> for I32x4 {}
#[derive(Copy, Debug, Clone)]
pub struct I32x4_41(pub __m128i);
impl SimdBase<I32x4_41, i32> for I32x4_41 {}
impl SimdSmallInt<I32x4_41, i32> for I32x4_41 {}
#[derive(Copy, Debug, Clone)]
pub struct I32x8(pub __m256i);
impl SimdBase<I32x8, i32> for I32x8 {}
impl SimdSmallInt<I32x8, i32> for I32x8 {}

// Newtypes for i64 vectors
// We have to do this to allow for overloading of
// __m128i etc
#[derive(Copy, Debug, Clone)]
pub struct I64x1(pub i64);
impl SimdBase<I64x1, i64> for I64x1 {}
#[derive(Copy, Debug, Clone)]
pub struct I64x2(pub __m128i);
impl SimdBase<I64x2, i64> for I64x2 {}
#[derive(Copy, Debug, Clone)]
pub struct I64x2_41(pub __m128i);
impl SimdBase<I64x2_41, i64> for I64x2_41 {}
#[derive(Copy, Debug, Clone)]
pub struct I64x4(pub __m256i);
impl SimdBase<I64x4, i64> for I64x4 {}

// Newtypes for f32 vectors
// We have to do this to allow for overloading of
// __m128 etc
#[derive(Copy, Debug, Clone)]
pub struct F32x1(pub f32);
impl SimdBase<F32x1, f32> for F32x1 {}
impl SimdFloat<F32x1, f32> for F32x1 {}
#[derive(Copy, Debug, Clone)]
pub struct F32x4(pub __m128);
impl SimdBase<F32x4, f32> for F32x4 {}
impl SimdFloat<F32x4, f32> for F32x4 {}
#[derive(Copy, Debug, Clone)]
pub struct F32x8(pub __m256);
impl SimdBase<F32x8, f32> for F32x8 {}
impl SimdFloat<F32x8, f32> for F32x8 {}

// Newtypes for f64 vectors
#[derive(Copy, Debug, Clone)]
pub struct F64x1(pub f64);
impl SimdBase<F64x1, f64> for F64x1 {}
impl SimdFloat<F64x1, f64> for F64x1 {}
#[derive(Copy, Debug, Clone)]
pub struct F64x2(pub __m128d);
impl SimdBase<F64x2, f64> for F64x2 {}
impl SimdFloat<F64x2, f64> for F64x2 {}
#[derive(Copy, Debug, Clone)]
pub struct F64x4(pub __m256d);
impl SimdBase<F64x4, f64> for F64x4 {}
impl SimdFloat<F64x4, f64> for F64x4 {}

mod index;
pub use self::index::*;
mod index_mut;
pub use self::index_mut::*;
mod add;
pub use self::add::*;
mod add_assign;
pub use self::add_assign::*;
mod sub;
pub use self::sub::*;
mod sub_assign;
pub use self::sub_assign::*;
mod mul;
pub use self::mul::*;
mod mul_assign;
pub use self::mul_assign::*;
mod div;
pub use self::div::*;
mod div_assign;
pub use self::div_assign::*;
mod and;
pub use self::and::*;
mod and_assign;
pub use self::and_assign::*;
mod or;
pub use self::or::*;
mod or_assign;
pub use self::or_assign::*;
mod xor;
pub use self::xor::*;
mod xor_assign;
pub use self::xor_assign::*;
mod not;
pub use self::not::*;
mod shl;
pub use self::shl::*;
mod shl_assign;
pub use self::shl_assign::*;
mod shr;
pub use self::shr::*;
mod shr_assign;
pub use self::shr_assign::*;