package archsimd
const (
_LLLL = iota
_HLLL
_LHLL
_HHLL
_LLHL
_HLHL
_LHHL
_HHHL
_LLLH
_HLLH
_LHLH
_HHLH
_LLHH
_HLHH
_LHHH
_HHHH
)
const (
_LL = iota
_HL
_LH
_HH
)
func (x Int32x4 ) SelectFromPair (a , b , c , d uint8 , y Int32x4 ) Int32x4 {
pattern := a >>2 + (b &4 )>>1 + (c & 4 ) + (d &4 )<<1
a , b , c , d = a &3 , b &3 , c &3 , d &3
switch pattern {
case _LLLL :
return x .concatSelectedConstant (cscimm4 (a , b , c , d ), x )
case _HHHH :
return y .concatSelectedConstant (cscimm4 (a , b , c , d ), y )
case _LLHH :
return x .concatSelectedConstant (cscimm4 (a , b , c , d ), y )
case _HHLL :
return y .concatSelectedConstant (cscimm4 (a , b , c , d ), x )
case _HLLL :
z := y .concatSelectedConstant (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), x )
case _LHLL :
z := x .concatSelectedConstant (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), x )
case _HLHH :
z := y .concatSelectedConstant (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), y )
case _LHHH :
z := x .concatSelectedConstant (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), y )
case _LLLH :
z := x .concatSelectedConstant (cscimm4 (c , c , d , d ), y )
return x .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _LLHL :
z := y .concatSelectedConstant (cscimm4 (c , c , d , d ), x )
return x .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _HHLH :
z := x .concatSelectedConstant (cscimm4 (c , c , d , d ), y )
return y .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _HHHL :
z := y .concatSelectedConstant (cscimm4 (c , c , d , d ), x )
return y .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _LHLH :
z := x .concatSelectedConstant (cscimm4 (a , c , b , d ), y )
return z .concatSelectedConstant (0b11_01_10_00 , z )
case _HLHL :
z := x .concatSelectedConstant (cscimm4 (b , d , a , c ), y )
return z .concatSelectedConstant (0b01_11_00_10 , z )
case _HLLH :
z := x .concatSelectedConstant (cscimm4 (b , c , a , d ), y )
return z .concatSelectedConstant (0b11_01_00_10 , z )
case _LHHL :
z := x .concatSelectedConstant (cscimm4 (a , d , b , c ), y )
return z .concatSelectedConstant (0b01_11_10_00 , z )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Uint32x4 ) SelectFromPair (a , b , c , d uint8 , y Uint32x4 ) Uint32x4 {
pattern := a >>2 + (b &4 )>>1 + (c & 4 ) + (d &4 )<<1
a , b , c , d = a &3 , b &3 , c &3 , d &3
switch pattern {
case _LLLL :
return x .concatSelectedConstant (cscimm4 (a , b , c , d ), x )
case _HHHH :
return y .concatSelectedConstant (cscimm4 (a , b , c , d ), y )
case _LLHH :
return x .concatSelectedConstant (cscimm4 (a , b , c , d ), y )
case _HHLL :
return y .concatSelectedConstant (cscimm4 (a , b , c , d ), x )
case _HLLL :
z := y .concatSelectedConstant (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), x )
case _LHLL :
z := x .concatSelectedConstant (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), x )
case _HLHH :
z := y .concatSelectedConstant (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), y )
case _LHHH :
z := x .concatSelectedConstant (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), y )
case _LLLH :
z := x .concatSelectedConstant (cscimm4 (c , c , d , d ), y )
return x .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _LLHL :
z := y .concatSelectedConstant (cscimm4 (c , c , d , d ), x )
return x .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _HHLH :
z := x .concatSelectedConstant (cscimm4 (c , c , d , d ), y )
return y .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _HHHL :
z := y .concatSelectedConstant (cscimm4 (c , c , d , d ), x )
return y .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _LHLH :
z := x .concatSelectedConstant (cscimm4 (a , c , b , d ), y )
return z .concatSelectedConstant (0b11_01_10_00 , z )
case _HLHL :
z := x .concatSelectedConstant (cscimm4 (b , d , a , c ), y )
return z .concatSelectedConstant (0b01_11_00_10 , z )
case _HLLH :
z := x .concatSelectedConstant (cscimm4 (b , c , a , d ), y )
return z .concatSelectedConstant (0b11_01_00_10 , z )
case _LHHL :
z := x .concatSelectedConstant (cscimm4 (a , d , b , c ), y )
return z .concatSelectedConstant (0b01_11_10_00 , z )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Float32x4 ) SelectFromPair (a , b , c , d uint8 , y Float32x4 ) Float32x4 {
pattern := a >>2 + (b &4 )>>1 + (c & 4 ) + (d &4 )<<1
a , b , c , d = a &3 , b &3 , c &3 , d &3
switch pattern {
case _LLLL :
return x .concatSelectedConstant (cscimm4 (a , b , c , d ), x )
case _HHHH :
return y .concatSelectedConstant (cscimm4 (a , b , c , d ), y )
case _LLHH :
return x .concatSelectedConstant (cscimm4 (a , b , c , d ), y )
case _HHLL :
return y .concatSelectedConstant (cscimm4 (a , b , c , d ), x )
case _HLLL :
z := y .concatSelectedConstant (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), x )
case _LHLL :
z := x .concatSelectedConstant (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), x )
case _HLHH :
z := y .concatSelectedConstant (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), y )
case _LHHH :
z := x .concatSelectedConstant (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstant (cscimm4 (0 , 2 , c , d ), y )
case _LLLH :
z := x .concatSelectedConstant (cscimm4 (c , c , d , d ), y )
return x .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _LLHL :
z := y .concatSelectedConstant (cscimm4 (c , c , d , d ), x )
return x .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _HHLH :
z := x .concatSelectedConstant (cscimm4 (c , c , d , d ), y )
return y .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _HHHL :
z := y .concatSelectedConstant (cscimm4 (c , c , d , d ), x )
return y .concatSelectedConstant (cscimm4 (a , b , 0 , 2 ), z )
case _LHLH :
z := x .concatSelectedConstant (cscimm4 (a , c , b , d ), y )
return z .concatSelectedConstant (0b11_01_10_00 , z )
case _HLHL :
z := x .concatSelectedConstant (cscimm4 (b , d , a , c ), y )
return z .concatSelectedConstant (0b01_11_00_10 , z )
case _HLLH :
z := x .concatSelectedConstant (cscimm4 (b , c , a , d ), y )
return z .concatSelectedConstant (0b11_01_00_10 , z )
case _LHHL :
z := x .concatSelectedConstant (cscimm4 (a , d , b , c ), y )
return z .concatSelectedConstant (0b01_11_10_00 , z )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Int32x8 ) SelectFromPairGrouped (a , b , c , d uint8 , y Int32x8 ) Int32x8 {
pattern := a >>2 + (b &4 )>>1 + (c & 4 ) + (d &4 )<<1
a , b , c , d = a &3 , b &3 , c &3 , d &3
switch pattern {
case _LLLL :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HHHH :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _LLHH :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _HHLL :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HLLL :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _LHLL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _HLHH :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LHHH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LLHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , c , b , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_10_00 , z )
case _HLHL :
z := x .concatSelectedConstantGrouped (cscimm4 (b , d , a , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_00_10 , z )
case _HLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (b , c , a , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_00_10 , z )
case _LHHL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , d , b , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_10_00 , z )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Uint32x8 ) SelectFromPairGrouped (a , b , c , d uint8 , y Uint32x8 ) Uint32x8 {
pattern := a >>2 + (b &4 )>>1 + (c & 4 ) + (d &4 )<<1
a , b , c , d = a &3 , b &3 , c &3 , d &3
switch pattern {
case _LLLL :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HHHH :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _LLHH :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _HHLL :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HLLL :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _LHLL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _HLHH :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LHHH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LLHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , c , b , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_10_00 , z )
case _HLHL :
z := x .concatSelectedConstantGrouped (cscimm4 (b , d , a , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_00_10 , z )
case _HLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (b , c , a , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_00_10 , z )
case _LHHL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , d , b , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_10_00 , z )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Float32x8 ) SelectFromPairGrouped (a , b , c , d uint8 , y Float32x8 ) Float32x8 {
pattern := a >>2 + (b &4 )>>1 + (c & 4 ) + (d &4 )<<1
a , b , c , d = a &3 , b &3 , c &3 , d &3
switch pattern {
case _LLLL :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HHHH :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _LLHH :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _HHLL :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HLLL :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _LHLL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _HLHH :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LHHH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LLHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , c , b , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_10_00 , z )
case _HLHL :
z := x .concatSelectedConstantGrouped (cscimm4 (b , d , a , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_00_10 , z )
case _HLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (b , c , a , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_00_10 , z )
case _LHHL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , d , b , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_10_00 , z )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Int32x16 ) SelectFromPairGrouped (a , b , c , d uint8 , y Int32x16 ) Int32x16 {
pattern := a >>2 + (b &4 )>>1 + (c & 4 ) + (d &4 )<<1
a , b , c , d = a &3 , b &3 , c &3 , d &3
switch pattern {
case _LLLL :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HHHH :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _LLHH :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _HHLL :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HLLL :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _LHLL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _HLHH :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LHHH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LLHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , c , b , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_10_00 , z )
case _HLHL :
z := x .concatSelectedConstantGrouped (cscimm4 (b , d , a , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_00_10 , z )
case _HLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (b , c , a , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_00_10 , z )
case _LHHL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , d , b , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_10_00 , z )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Uint32x16 ) SelectFromPairGrouped (a , b , c , d uint8 , y Uint32x16 ) Uint32x16 {
pattern := a >>2 + (b &4 )>>1 + (c & 4 ) + (d &4 )<<1
a , b , c , d = a &3 , b &3 , c &3 , d &3
switch pattern {
case _LLLL :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HHHH :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _LLHH :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _HHLL :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HLLL :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _LHLL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _HLHH :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LHHH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LLHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , c , b , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_10_00 , z )
case _HLHL :
z := x .concatSelectedConstantGrouped (cscimm4 (b , d , a , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_00_10 , z )
case _HLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (b , c , a , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_00_10 , z )
case _LHHL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , d , b , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_10_00 , z )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Float32x16 ) SelectFromPairGrouped (a , b , c , d uint8 , y Float32x16 ) Float32x16 {
pattern := a >>2 + (b &4 )>>1 + (c & 4 ) + (d &4 )<<1
a , b , c , d = a &3 , b &3 , c &3 , d &3
switch pattern {
case _LLLL :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HHHH :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _LLHH :
return x .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), y )
case _HHLL :
return y .concatSelectedConstantGrouped (cscimm4 (a , b , c , d ), x )
case _HLLL :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _LHLL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), x )
case _HLHH :
z := y .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), x )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LHHH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , a , b , b ), y )
return z .concatSelectedConstantGrouped (cscimm4 (0 , 2 , c , d ), y )
case _LLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LLHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return x .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), y )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _HHHL :
z := y .concatSelectedConstantGrouped (cscimm4 (c , c , d , d ), x )
return y .concatSelectedConstantGrouped (cscimm4 (a , b , 0 , 2 ), z )
case _LHLH :
z := x .concatSelectedConstantGrouped (cscimm4 (a , c , b , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_10_00 , z )
case _HLHL :
z := x .concatSelectedConstantGrouped (cscimm4 (b , d , a , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_00_10 , z )
case _HLLH :
z := x .concatSelectedConstantGrouped (cscimm4 (b , c , a , d ), y )
return z .concatSelectedConstantGrouped (0b11_01_00_10 , z )
case _LHHL :
z := x .concatSelectedConstantGrouped (cscimm4 (a , d , b , c ), y )
return z .concatSelectedConstantGrouped (0b01_11_10_00 , z )
}
panic ("missing case, switch should be exhaustive" )
}
func cscimm4(a , b , c , d uint8 ) uint8 {
return uint8 (a + b <<2 + c <<4 + d <<6 )
}
func cscimm2(a , b uint8 ) uint8 {
return uint8 (a + b <<1 )
}
func cscimm2g2(a , b uint8 ) uint8 {
g := cscimm2 (a , b )
return g + g <<2
}
func cscimm2g4(a , b uint8 ) uint8 {
g := cscimm2g2 (a , b )
return g + g <<4
}
func (x Uint64x2 ) SelectFromPair (a , b uint8 , y Uint64x2 ) Uint64x2 {
pattern := (a &2 )>>1 + (b & 2 )
a , b = a &1 , b &1
switch pattern {
case _LL :
return x .concatSelectedConstant (cscimm2 (a , b ), x )
case _HH :
return y .concatSelectedConstant (cscimm2 (a , b ), y )
case _LH :
return x .concatSelectedConstant (cscimm2 (a , b ), y )
case _HL :
return y .concatSelectedConstant (cscimm2 (a , b ), x )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Uint64x4 ) SelectFromPairGrouped (a , b uint8 , y Uint64x4 ) Uint64x4 {
pattern := (a &2 )>>1 + (b & 2 )
a , b = a &1 , b &1
switch pattern {
case _LL :
return x .concatSelectedConstantGrouped (cscimm2g2 (a , b ), x )
case _HH :
return y .concatSelectedConstantGrouped (cscimm2g2 (a , b ), y )
case _LH :
return x .concatSelectedConstantGrouped (cscimm2g2 (a , b ), y )
case _HL :
return y .concatSelectedConstantGrouped (cscimm2g2 (a , b ), x )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Uint64x8 ) SelectFromPairGrouped (a , b uint8 , y Uint64x8 ) Uint64x8 {
pattern := (a &2 )>>1 + (b & 2 )
a , b = a &1 , b &1
switch pattern {
case _LL :
return x .concatSelectedConstantGrouped (cscimm2g4 (a , b ), x )
case _HH :
return y .concatSelectedConstantGrouped (cscimm2g4 (a , b ), y )
case _LH :
return x .concatSelectedConstantGrouped (cscimm2g4 (a , b ), y )
case _HL :
return y .concatSelectedConstantGrouped (cscimm2g4 (a , b ), x )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Float64x2 ) SelectFromPair (a , b uint8 , y Float64x2 ) Float64x2 {
pattern := (a &2 )>>1 + (b & 2 )
a , b = a &1 , b &1
switch pattern {
case _LL :
return x .concatSelectedConstant (cscimm2 (a , b ), x )
case _HH :
return y .concatSelectedConstant (cscimm2 (a , b ), y )
case _LH :
return x .concatSelectedConstant (cscimm2 (a , b ), y )
case _HL :
return y .concatSelectedConstant (cscimm2 (a , b ), x )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Float64x4 ) SelectFromPairGrouped (a , b uint8 , y Float64x4 ) Float64x4 {
pattern := (a &2 )>>1 + (b & 2 )
a , b = a &1 , b &1
switch pattern {
case _LL :
return x .concatSelectedConstantGrouped (cscimm2g2 (a , b ), x )
case _HH :
return y .concatSelectedConstantGrouped (cscimm2g2 (a , b ), y )
case _LH :
return x .concatSelectedConstantGrouped (cscimm2g2 (a , b ), y )
case _HL :
return y .concatSelectedConstantGrouped (cscimm2g2 (a , b ), x )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Float64x8 ) SelectFromPairGrouped (a , b uint8 , y Float64x8 ) Float64x8 {
pattern := (a &2 )>>1 + (b & 2 )
a , b = a &1 , b &1
switch pattern {
case _LL :
return x .concatSelectedConstantGrouped (cscimm2g4 (a , b ), x )
case _HH :
return y .concatSelectedConstantGrouped (cscimm2g4 (a , b ), y )
case _LH :
return x .concatSelectedConstantGrouped (cscimm2g4 (a , b ), y )
case _HL :
return y .concatSelectedConstantGrouped (cscimm2g4 (a , b ), x )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Int64x2 ) SelectFromPair (a , b uint8 , y Int64x2 ) Int64x2 {
pattern := (a &2 )>>1 + (b & 2 )
a , b = a &1 , b &1
switch pattern {
case _LL :
return x .concatSelectedConstant (cscimm2 (a , b ), x )
case _HH :
return y .concatSelectedConstant (cscimm2 (a , b ), y )
case _LH :
return x .concatSelectedConstant (cscimm2 (a , b ), y )
case _HL :
return y .concatSelectedConstant (cscimm2 (a , b ), x )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Int64x4 ) SelectFromPairGrouped (a , b uint8 , y Int64x4 ) Int64x4 {
pattern := (a &2 )>>1 + (b & 2 )
a , b = a &1 , b &1
switch pattern {
case _LL :
return x .concatSelectedConstantGrouped (cscimm2g2 (a , b ), x )
case _HH :
return y .concatSelectedConstantGrouped (cscimm2g2 (a , b ), y )
case _LH :
return x .concatSelectedConstantGrouped (cscimm2g2 (a , b ), y )
case _HL :
return y .concatSelectedConstantGrouped (cscimm2g2 (a , b ), x )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Int64x8 ) SelectFromPairGrouped (a , b uint8 , y Int64x8 ) Int64x8 {
pattern := (a &2 )>>1 + (b & 2 )
a , b = a &1 , b &1
switch pattern {
case _LL :
return x .concatSelectedConstantGrouped (cscimm2g4 (a , b ), x )
case _HH :
return y .concatSelectedConstantGrouped (cscimm2g4 (a , b ), y )
case _LH :
return x .concatSelectedConstantGrouped (cscimm2g4 (a , b ), y )
case _HL :
return y .concatSelectedConstantGrouped (cscimm2g4 (a , b ), x )
}
panic ("missing case, switch should be exhaustive" )
}
func (x Int32x4 ) PermuteScalars (a , b , c , d uint8 ) Int32x4 {
return x .permuteScalars (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Uint32x4 ) PermuteScalars (a , b , c , d uint8 ) Uint32x4 {
return x .permuteScalars (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Int32x8 ) PermuteScalarsGrouped (a , b , c , d uint8 ) Int32x8 {
return x .permuteScalarsGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Int32x16 ) PermuteScalarsGrouped (a , b , c , d uint8 ) Int32x16 {
return x .permuteScalarsGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Uint32x8 ) PermuteScalarsGrouped (a , b , c , d uint8 ) Uint32x8 {
return x .permuteScalarsGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Uint32x16 ) PermuteScalarsGrouped (a , b , c , d uint8 ) Uint32x16 {
return x .permuteScalarsGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Int16x8 ) PermuteScalarsHi (a , b , c , d uint8 ) Int16x8 {
return x .permuteScalarsHi (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Uint16x8 ) PermuteScalarsHi (a , b , c , d uint8 ) Uint16x8 {
return x .permuteScalarsHi (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Int16x16 ) PermuteScalarsHiGrouped (a , b , c , d uint8 ) Int16x16 {
return x .permuteScalarsHiGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Int16x32 ) PermuteScalarsHiGrouped (a , b , c , d uint8 ) Int16x32 {
return x .permuteScalarsHiGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Uint16x16 ) PermuteScalarsHiGrouped (a , b , c , d uint8 ) Uint16x16 {
return x .permuteScalarsHiGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Uint16x32 ) PermuteScalarsHiGrouped (a , b , c , d uint8 ) Uint16x32 {
return x .permuteScalarsHiGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Int16x8 ) PermuteScalarsLo (a , b , c , d uint8 ) Int16x8 {
return x .permuteScalarsLo (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Uint16x8 ) PermuteScalarsLo (a , b , c , d uint8 ) Uint16x8 {
return x .permuteScalarsLo (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Int16x16 ) PermuteScalarsLoGrouped (a , b , c , d uint8 ) Int16x16 {
return x .permuteScalarsLoGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Int16x32 ) PermuteScalarsLoGrouped (a , b , c , d uint8 ) Int16x32 {
return x .permuteScalarsLoGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Uint16x16 ) PermuteScalarsLoGrouped (a , b , c , d uint8 ) Uint16x16 {
return x .permuteScalarsLoGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Uint16x32 ) PermuteScalarsLoGrouped (a , b , c , d uint8 ) Uint16x32 {
return x .permuteScalarsLoGrouped (a &3 | (b &3 )<<2 | (c &3 )<<4 | d <<6 )
}
func (x Uint64x2 ) CarrylessMultiply (a , b uint8 , y Uint64x2 ) Uint64x2 {
return x .carrylessMultiply (a &1 +((b &1 )<<4 ), y )
}
func (x Uint64x4 ) CarrylessMultiplyGrouped (a , b uint8 , y Uint64x4 ) Uint64x4 {
return x .carrylessMultiply (a &1 +((b &1 )<<4 ), y )
}
func (x Uint64x8 ) CarrylessMultiplyGrouped (a , b uint8 , y Uint64x8 ) Uint64x8 {
return x .carrylessMultiply (a &1 +((b &1 )<<4 ), y )
}
The pages are generated with Golds v0.8.3-preview . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .