blob: a5fb1e398d830dd462227c1699efe7ed67b21933 [file]
// Code generated by 'go run -C $GOROOT/src/simd/archsimd/_gen/midway'; DO NOT EDIT.
//go:build goexperiment.simd && arm64
package simd
import (
"simd/archsimd"
"simd/internal/bridge"
)
func (x Int8s) ToArch() any
type archSimdInt8s interface {
archsimd.Int8x16
}
func Int8sFromArch[T archSimdInt8s](x T) Int8s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Int8s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Int8x16:
var t bridge.Int8x16 = bridge.Int8x16(a)
return (any(t)).(Int8s)
}
panic("wrong type")
}
func (x Int16s) ToArch() any
type archSimdInt16s interface {
archsimd.Int16x8
}
func Int16sFromArch[T archSimdInt16s](x T) Int16s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Int16s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Int16x8:
var t bridge.Int16x8 = bridge.Int16x8(a)
return (any(t)).(Int16s)
}
panic("wrong type")
}
func (x Int32s) ToArch() any
type archSimdInt32s interface {
archsimd.Int32x4
}
func Int32sFromArch[T archSimdInt32s](x T) Int32s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Int32s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Int32x4:
var t bridge.Int32x4 = bridge.Int32x4(a)
return (any(t)).(Int32s)
}
panic("wrong type")
}
func (x Int64s) ToArch() any
type archSimdInt64s interface {
archsimd.Int64x2
}
func Int64sFromArch[T archSimdInt64s](x T) Int64s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Int64s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Int64x2:
var t bridge.Int64x2 = bridge.Int64x2(a)
return (any(t)).(Int64s)
}
panic("wrong type")
}
func (x Uint8s) ToArch() any
type archSimdUint8s interface {
archsimd.Uint8x16
}
func Uint8sFromArch[T archSimdUint8s](x T) Uint8s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Uint8s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Uint8x16:
var t bridge.Uint8x16 = bridge.Uint8x16(a)
return (any(t)).(Uint8s)
}
panic("wrong type")
}
func (x Uint16s) ToArch() any
type archSimdUint16s interface {
archsimd.Uint16x8
}
func Uint16sFromArch[T archSimdUint16s](x T) Uint16s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Uint16s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Uint16x8:
var t bridge.Uint16x8 = bridge.Uint16x8(a)
return (any(t)).(Uint16s)
}
panic("wrong type")
}
func (x Uint32s) ToArch() any
type archSimdUint32s interface {
archsimd.Uint32x4
}
func Uint32sFromArch[T archSimdUint32s](x T) Uint32s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Uint32s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Uint32x4:
var t bridge.Uint32x4 = bridge.Uint32x4(a)
return (any(t)).(Uint32s)
}
panic("wrong type")
}
func (x Uint64s) ToArch() any
type archSimdUint64s interface {
archsimd.Uint64x2
}
func Uint64sFromArch[T archSimdUint64s](x T) Uint64s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Uint64s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Uint64x2:
var t bridge.Uint64x2 = bridge.Uint64x2(a)
return (any(t)).(Uint64s)
}
panic("wrong type")
}
func (x Float32s) ToArch() any
type archSimdFloat32s interface {
archsimd.Float32x4
}
func Float32sFromArch[T archSimdFloat32s](x T) Float32s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Float32s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Float32x4:
var t bridge.Float32x4 = bridge.Float32x4(a)
return (any(t)).(Float32s)
}
panic("wrong type")
}
func (x Float64s) ToArch() any
type archSimdFloat64s interface {
archsimd.Float64x2
}
func Float64sFromArch[T archSimdFloat64s](x T) Float64s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Float64s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Float64x2:
var t bridge.Float64x2 = bridge.Float64x2(a)
return (any(t)).(Float64s)
}
panic("wrong type")
}
func (x Mask8s) ToArch() any
type archSimdMask8s interface {
archsimd.Mask8x16
}
func Mask8sFromArch[T archSimdMask8s](x T) Mask8s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Mask8s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Mask8x16:
var t bridge.Mask8x16 = bridge.Mask8x16(a)
return (any(t)).(Mask8s)
}
panic("wrong type")
}
func (x Mask16s) ToArch() any
type archSimdMask16s interface {
archsimd.Mask16x8
}
func Mask16sFromArch[T archSimdMask16s](x T) Mask16s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Mask16s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Mask16x8:
var t bridge.Mask16x8 = bridge.Mask16x8(a)
return (any(t)).(Mask16s)
}
panic("wrong type")
}
func (x Mask32s) ToArch() any
type archSimdMask32s interface {
archsimd.Mask32x4
}
func Mask32sFromArch[T archSimdMask32s](x T) Mask32s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Mask32s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Mask32x4:
var t bridge.Mask32x4 = bridge.Mask32x4(a)
return (any(t)).(Mask32s)
}
panic("wrong type")
}
func (x Mask64s) ToArch() any
type archSimdMask64s interface {
archsimd.Mask64x2
}
func Mask64sFromArch[T archSimdMask64s](x T) Mask64s {
switch a := any(x).(type) {
// The return expression is written this way because the code will be rewritten
// with Mask64s replaced by one of the arch types, and without the any-assert
// hack the rewritten code would not pass type checking.
// The backend of the compiler will eat this and turn it into no code at all,
// assuming it inlines.
case archsimd.Mask64x2:
var t bridge.Mask64x2 = bridge.Mask64x2(a)
return (any(t)).(Mask64s)
}
panic("wrong type")
}