// Code generated by 'tmplgen'; DO NOT EDIT. //go:build goexperiment.simdstable package archsimd // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1]} // // Emulated, CPU Feature: AVX func (x Float32x4) InterleaveLo(y Float32x4) (z Float32x4) { return x.ToBits().InterleaveLo(y.ToBits()).BitsToFloat32() } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0]} // // Emulated, CPU Feature: AVX func (x Float64x2) InterleaveLo(y Float64x2) (z Float64x2) { return x.concatPermuteScalars(0, 2, y) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 32 // // Emulated, CPU Feature: AVX2 func (x Int8x32) InterleaveLo(y Int8x32) (z Int8x32) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(0, 2, hi) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 32 // // Emulated, CPU Feature: AVX2 func (x Uint8x32) InterleaveLo(y Uint8x32) (z Uint8x32) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(0, 2, hi) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 16 // // Emulated, CPU Feature: AVX2 func (x Int16x16) InterleaveLo(y Int16x16) (z Int16x16) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(0, 2, hi) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 16 // // Emulated, CPU Feature: AVX2 func (x Uint16x16) InterleaveLo(y Uint16x16) (z Uint16x16) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(0, 2, hi) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 8 // // Emulated, CPU Feature: AVX2 func (x Int32x8) InterleaveLo(y Int32x8) (z Int32x8) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(0, 2, hi) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 8 // // Emulated, CPU Feature: AVX2 func (x Uint32x8) InterleaveLo(y Uint32x8) (z Uint32x8) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(0, 2, hi) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 8 // // Emulated, CPU Feature: AVX2 func (x Float32x8) InterleaveLo(y Float32x8) (z Float32x8) { return x.ToBits().InterleaveLo(y.ToBits()).BitsToFloat32() } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1]} // // Emulated, CPU Feature: AVX2 func (x Int64x4) InterleaveLo(y Int64x4) (z Int64x4) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(0, 2, hi) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1]} // // Emulated, CPU Feature: AVX2 func (x Uint64x4) InterleaveLo(y Uint64x4) (z Uint64x4) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(0, 2, hi) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1]} // // Emulated, CPU Feature: AVX func (x Float64x4) InterleaveLo(y Float64x4) (z Float64x4) { lo := x.concatPermuteScalarsGrouped(0, 2, y) hi := x.concatPermuteScalarsGrouped(1, 3, y) return lo.concatPermute128Scalars(0, 2, hi) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 64 // // Emulated, CPU Feature: AVX512 func (x Int8x64) InterleaveLo(y Int8x64) (z Int8x64) { return x.ToBits().InterleaveLo(y.ToBits()).BitsToInt8() } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 64 // // Emulated, CPU Feature: AVX512 func (x Uint8x64) InterleaveLo(y Uint8x64) (z Uint8x64) { if X86.AVX512VBMI() { return x.ConcatLookupMod(y, LoadUint8x64Array(&interleaveLo8x64Idx)) } lo := x.interleaveLoGrouped(y).ReshapeToUint64s() hi := x.interleaveHiGrouped(y).ReshapeToUint64s() return lo.ConcatLookupMod(hi, LoadUint64x8Array(&interleaveLo128x4Idx)).ReshapeToUint8s() } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 32 // // Emulated, CPU Feature: AVX512 func (x Int16x32) InterleaveLo(y Int16x32) (z Int16x32) { return x.ConcatLookupMod(y, LoadUint16x32Array(&interleaveLo16x32Idx)) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 32 // // Emulated, CPU Feature: AVX512 func (x Uint16x32) InterleaveLo(y Uint16x32) (z Uint16x32) { return x.ConcatLookupMod(y, LoadUint16x32Array(&interleaveLo16x32Idx)) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Int32x16) InterleaveLo(y Int32x16) (z Int32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveLo32x16Idx)) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Uint32x16) InterleaveLo(y Uint32x16) (z Uint32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveLo32x16Idx)) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Float32x16) InterleaveLo(y Float32x16) (z Float32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveLo32x16Idx)) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Int64x8) InterleaveLo(y Int64x8) (z Int64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveLo64x8Idx)) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Uint64x8) InterleaveLo(y Uint64x8) (z Uint64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveLo64x8Idx)) } // InterleaveLo interleaves the elements of the low halves of x and y. // // z = {x[0], y[0], x[1], y[1], ..., x[n/2-1], y[n/2-1]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Float64x8) InterleaveLo(y Float64x8) (z Float64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveLo64x8Idx)) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[2], y[2], x[3], y[3]} // // Emulated, CPU Feature: AVX func (x Float32x4) InterleaveHi(y Float32x4) (z Float32x4) { return x.ToBits().InterleaveHi(y.ToBits()).BitsToFloat32() } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[1], y[1]} // // Emulated, CPU Feature: AVX func (x Float64x2) InterleaveHi(y Float64x2) (z Float64x2) { return x.concatPermuteScalars(1, 3, y) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 32 // // Emulated, CPU Feature: AVX2 func (x Int8x32) InterleaveHi(y Int8x32) (z Int8x32) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(1, 3, hi) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 32 // // Emulated, CPU Feature: AVX2 func (x Uint8x32) InterleaveHi(y Uint8x32) (z Uint8x32) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(1, 3, hi) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX2 func (x Int16x16) InterleaveHi(y Int16x16) (z Int16x16) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(1, 3, hi) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX2 func (x Uint16x16) InterleaveHi(y Uint16x16) (z Uint16x16) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(1, 3, hi) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX2 func (x Int32x8) InterleaveHi(y Int32x8) (z Int32x8) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(1, 3, hi) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX2 func (x Uint32x8) InterleaveHi(y Uint32x8) (z Uint32x8) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(1, 3, hi) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX2 func (x Float32x8) InterleaveHi(y Float32x8) (z Float32x8) { return x.ToBits().InterleaveHi(y.ToBits()).BitsToFloat32() } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[2], y[2], x[3], y[3]} // // Emulated, CPU Feature: AVX2 func (x Int64x4) InterleaveHi(y Int64x4) (z Int64x4) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(1, 3, hi) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[2], y[2], x[3], y[3]} // // Emulated, CPU Feature: AVX2 func (x Uint64x4) InterleaveHi(y Uint64x4) (z Uint64x4) { lo := x.interleaveLoGrouped(y) hi := x.interleaveHiGrouped(y) return lo.concatPermute128Scalars(1, 3, hi) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[2], y[2], x[3], y[3]} // // Emulated, CPU Feature: AVX func (x Float64x4) InterleaveHi(y Float64x4) (z Float64x4) { lo := x.concatPermuteScalarsGrouped(0, 2, y) hi := x.concatPermuteScalarsGrouped(1, 3, y) return lo.concatPermute128Scalars(1, 3, hi) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 64 // // Emulated, CPU Feature: AVX512 func (x Int8x64) InterleaveHi(y Int8x64) (z Int8x64) { return x.ToBits().InterleaveHi(y.ToBits()).BitsToInt8() } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 64 // // Emulated, CPU Feature: AVX512 func (x Uint8x64) InterleaveHi(y Uint8x64) (z Uint8x64) { if X86.AVX512VBMI() { return x.ConcatLookupMod(y, LoadUint8x64Array(&interleaveHi8x64Idx)) } lo := x.interleaveLoGrouped(y).ReshapeToUint64s() hi := x.interleaveHiGrouped(y).ReshapeToUint64s() return lo.ConcatLookupMod(hi, LoadUint64x8Array(&interleaveHi128x4Idx)).ReshapeToUint8s() } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 32 // // Emulated, CPU Feature: AVX512 func (x Int16x32) InterleaveHi(y Int16x32) (z Int16x32) { return x.ConcatLookupMod(y, LoadUint16x32Array(&interleaveHi16x32Idx)) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 32 // // Emulated, CPU Feature: AVX512 func (x Uint16x32) InterleaveHi(y Uint16x32) (z Uint16x32) { return x.ConcatLookupMod(y, LoadUint16x32Array(&interleaveHi16x32Idx)) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Int32x16) InterleaveHi(y Int32x16) (z Int32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveHi32x16Idx)) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Uint32x16) InterleaveHi(y Uint32x16) (z Uint32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveHi32x16Idx)) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Float32x16) InterleaveHi(y Float32x16) (z Float32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&interleaveHi32x16Idx)) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Int64x8) InterleaveHi(y Int64x8) (z Int64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveHi64x8Idx)) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Uint64x8) InterleaveHi(y Uint64x8) (z Uint64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveHi64x8Idx)) } // InterleaveHi interleaves the elements of the high halves of x and y. // // z = {x[n/2], y[n/2], x[n/2+1], y[n/2+1], ..., x[n-1], y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Float64x8) InterleaveHi(y Float64x8) (z Float64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&interleaveHi64x8Idx)) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 16 // // Emulated, CPU Feature: AVX func (x Int8x16) ConcatEven(y Int8x16) (z Int8x16) { return x.ToBits().ConcatEven(y.ToBits()).BitsToInt8() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 16 // // Emulated, CPU Feature: AVX func (x Uint8x16) ConcatEven(y Uint8x16) (z Uint8x16) { idx := LoadInt8x16Array(&trunc16To8Idx) a := x.LookupModOrZero(idx).ReshapeToUint64s() b := y.LookupModOrZero(idx).ReshapeToUint64s() return a.InterleaveLo(b).ReshapeToUint8s() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 8 // // Emulated, CPU Feature: AVX func (x Int16x8) ConcatEven(y Int16x8) (z Int16x8) { return x.ToBits().ConcatEven(y.ToBits()).BitsToInt16() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 8 // // Emulated, CPU Feature: AVX func (x Uint16x8) ConcatEven(y Uint16x8) (z Uint16x8) { idx := LoadInt8x16Array(&trunc32To16Idx) a := x.ReshapeToUint8s().LookupModOrZero(idx).ReshapeToUint64s() b := y.ReshapeToUint8s().LookupModOrZero(idx).ReshapeToUint64s() return a.InterleaveLo(b).ReshapeToUint16s() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], y[0], y[2]} // // Emulated, CPU Feature: AVX func (x Int32x4) ConcatEven(y Int32x4) (z Int32x4) { return x.concatPermuteScalars(0, 2, 4, 6, y) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], y[0], y[2]} // // Emulated, CPU Feature: AVX func (x Uint32x4) ConcatEven(y Uint32x4) (z Uint32x4) { return x.concatPermuteScalars(0, 2, 4, 6, y) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], y[0], y[2]} // // Emulated, CPU Feature: AVX func (x Float32x4) ConcatEven(y Float32x4) (z Float32x4) { return x.concatPermuteScalars(0, 2, 4, 6, y) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], y[0]} // // Emulated, CPU Feature: AVX func (x Int64x2) ConcatEven(y Int64x2) (z Int64x2) { return x.InterleaveLo(y) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], y[0]} // // Emulated, CPU Feature: AVX func (x Uint64x2) ConcatEven(y Uint64x2) (z Uint64x2) { return x.InterleaveLo(y) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], y[0]} // // Emulated, CPU Feature: AVX func (x Float64x2) ConcatEven(y Float64x2) (z Float64x2) { return x.concatPermuteScalars(0, 2, y) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 32 // // Emulated, CPU Feature: AVX2 func (x Int8x32) ConcatEven(y Int8x32) (z Int8x32) { return x.ToBits().ConcatEven(y.ToBits()).BitsToInt8() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 32 // // Emulated, CPU Feature: AVX2 func (x Uint8x32) ConcatEven(y Uint8x32) (z Uint8x32) { if X86.AVX512VBMI() { return x.ConcatLookupMod(y, LoadUint8x32Array(&concatEven8x32Idx)) } idx := LoadInt8x32Array(&trunc16To8GroupedIdx) a := x.LookupModOrZeroGrouped(idx).ReshapeToUint64s() b := y.LookupModOrZeroGrouped(idx).ReshapeToUint64s() return gatherLo64(a.interleaveLoGrouped(b)).ReshapeToUint8s() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 16 // // Emulated, CPU Feature: AVX2 func (x Int16x16) ConcatEven(y Int16x16) (z Int16x16) { return x.ToBits().ConcatEven(y.ToBits()).BitsToInt16() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 16 // // Emulated, CPU Feature: AVX2 func (x Uint16x16) ConcatEven(y Uint16x16) (z Uint16x16) { if X86.AVX512() { return x.ConcatLookupMod(y, LoadUint16x16Array(&concatEven16x16Idx)) } idx := LoadInt8x32Array(&trunc32To16GroupedIdx) a := x.ReshapeToUint8s().LookupModOrZeroGrouped(idx).ReshapeToUint64s() b := y.ReshapeToUint8s().LookupModOrZeroGrouped(idx).ReshapeToUint64s() return gatherLo64(a.interleaveLoGrouped(b)).ReshapeToUint16s() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 8 // // Emulated, CPU Feature: AVX2 func (x Int32x8) ConcatEven(y Int32x8) (z Int32x8) { return x.ToBits().ConcatEven(y.ToBits()).BitsToInt32() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 8 // // Emulated, CPU Feature: AVX2 func (x Uint32x8) ConcatEven(y Uint32x8) (z Uint32x8) { return x.concatPermuteScalarsGrouped(0, 2, 4, 6, y).LookupMod(LoadUint32x8Array(&gatherLo64Idx)) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 8 // // Emulated, CPU Feature: AVX func (x Float32x8) ConcatEven(y Float32x8) (z Float32x8) { lo := x.concatPermute128Scalars(0, 2, y) hi := x.concatPermute128Scalars(1, 3, y) return lo.concatPermuteScalarsGrouped(0, 2, 4, 6, hi) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], y[0], y[2]} // // Emulated, CPU Feature: AVX2 func (x Int64x4) ConcatEven(y Int64x4) (z Int64x4) { return x.ToBits().ConcatEven(y.ToBits()).BitsToInt64() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], y[0], y[2]} // // Emulated, CPU Feature: AVX2 func (x Uint64x4) ConcatEven(y Uint64x4) (z Uint64x4) { return gatherLo64(x.interleaveLoGrouped(y)) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], y[0], y[2]} // // Emulated, CPU Feature: AVX func (x Float64x4) ConcatEven(y Float64x4) (z Float64x4) { lo := x.concatPermute128Scalars(0, 2, y) hi := x.concatPermute128Scalars(1, 3, y) return lo.concatPermuteScalarsGrouped(0, 2, hi) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 64 // // Emulated, CPU Feature: AVX512 func (x Int8x64) ConcatEven(y Int8x64) (z Int8x64) { return x.ToBits().ConcatEven(y.ToBits()).BitsToInt8() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 64 // // Emulated, CPU Feature: AVX512 func (x Uint8x64) ConcatEven(y Uint8x64) (z Uint8x64) { if X86.AVX512VBMI() { return x.ConcatLookupMod(y, LoadUint8x64Array(&concatEven8x64Idx)) } idx := LoadInt8x64Array(&concatEven8x64GroupedIdx) a := x.LookupModOrZeroGrouped(idx).ReshapeToUint64s() b := y.LookupModOrZeroGrouped(idx).ReshapeToUint64s() return a.ConcatLookupMod(b, LoadUint64x8Array(&concatEven64x8Idx)).ReshapeToUint8s() } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 32 // // Emulated, CPU Feature: AVX512 func (x Int16x32) ConcatEven(y Int16x32) (z Int16x32) { return x.ConcatLookupMod(y, LoadUint16x32Array(&concatEven16x32Idx)) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 32 // // Emulated, CPU Feature: AVX512 func (x Uint16x32) ConcatEven(y Uint16x32) (z Uint16x32) { return x.ConcatLookupMod(y, LoadUint16x32Array(&concatEven16x32Idx)) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Int32x16) ConcatEven(y Int32x16) (z Int32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&concatEven32x16Idx)) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Uint32x16) ConcatEven(y Uint32x16) (z Uint32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&concatEven32x16Idx)) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Float32x16) ConcatEven(y Float32x16) (z Float32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&concatEven32x16Idx)) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Int64x8) ConcatEven(y Int64x8) (z Int64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&concatEven64x8Idx)) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Uint64x8) ConcatEven(y Uint64x8) (z Uint64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&concatEven64x8Idx)) } // ConcatEven concatenates the even-indexed elements of x and y. // // z = {x[0], x[2], ..., x[n-2], y[0], y[2], ..., y[n-2]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Float64x8) ConcatEven(y Float64x8) (z Float64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&concatEven64x8Idx)) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX func (x Int8x16) ConcatOdd(y Int8x16) (z Int8x16) { return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt8() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX func (x Uint8x16) ConcatOdd(y Uint8x16) (z Uint8x16) { xo := x.ReshapeToUint16s().BitsToInt16().ShiftAllRight(8) yo := y.ReshapeToUint16s().BitsToInt16().ShiftAllRight(8) return xo.concatSaturateToInt8(yo).ToBits() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX func (x Int16x8) ConcatOdd(y Int16x8) (z Int16x8) { return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt16() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX func (x Uint16x8) ConcatOdd(y Uint16x8) (z Uint16x8) { xo := x.ReshapeToUint32s().BitsToInt32().ShiftAllRight(16) yo := y.ReshapeToUint32s().BitsToInt32().ShiftAllRight(16) return xo.ConcatSaturateToInt16(yo).ToBits() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], y[1], y[3]} // // Emulated, CPU Feature: AVX func (x Int32x4) ConcatOdd(y Int32x4) (z Int32x4) { return x.concatPermuteScalars(1, 3, 5, 7, y) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], y[1], y[3]} // // Emulated, CPU Feature: AVX func (x Uint32x4) ConcatOdd(y Uint32x4) (z Uint32x4) { return x.concatPermuteScalars(1, 3, 5, 7, y) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], y[1], y[3]} // // Emulated, CPU Feature: AVX func (x Float32x4) ConcatOdd(y Float32x4) (z Float32x4) { return x.concatPermuteScalars(1, 3, 5, 7, y) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], y[1]} // // Emulated, CPU Feature: AVX func (x Int64x2) ConcatOdd(y Int64x2) (z Int64x2) { return x.InterleaveHi(y) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], y[1]} // // Emulated, CPU Feature: AVX func (x Uint64x2) ConcatOdd(y Uint64x2) (z Uint64x2) { return x.InterleaveHi(y) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], y[1]} // // Emulated, CPU Feature: AVX func (x Float64x2) ConcatOdd(y Float64x2) (z Float64x2) { return x.concatPermuteScalars(1, 3, y) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 32 // // Emulated, CPU Feature: AVX2 func (x Int8x32) ConcatOdd(y Int8x32) (z Int8x32) { return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt8() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 32 // // Emulated, CPU Feature: AVX2 func (x Uint8x32) ConcatOdd(y Uint8x32) (z Uint8x32) { if X86.AVX512VBMI() { return x.ConcatLookupMod(y, LoadUint8x32Array(&concatOdd8x32Idx)) } xo := x.ReshapeToUint16s().BitsToInt16().ShiftAllRight(8) yo := y.ReshapeToUint16s().BitsToInt16().ShiftAllRight(8) return gatherLo64(xo.concatSaturateToInt8Grouped(yo).ToBits().ReshapeToUint64s()).ReshapeToUint8s() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX2 func (x Int16x16) ConcatOdd(y Int16x16) (z Int16x16) { return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt16() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX2 func (x Uint16x16) ConcatOdd(y Uint16x16) (z Uint16x16) { if X86.AVX512() { return x.ConcatLookupMod(y, LoadUint16x16Array(&concatOdd16x16Idx)) } xo := x.ReshapeToUint32s().BitsToInt32().ShiftAllRight(16) yo := y.ReshapeToUint32s().BitsToInt32().ShiftAllRight(16) return gatherLo64(xo.ConcatSaturateToInt16Grouped(yo).ToBits().ReshapeToUint64s()).ReshapeToUint16s() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX2 func (x Int32x8) ConcatOdd(y Int32x8) (z Int32x8) { return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt32() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX2 func (x Uint32x8) ConcatOdd(y Uint32x8) (z Uint32x8) { return x.concatPermuteScalarsGrouped(1, 3, 5, 7, y).LookupMod(LoadUint32x8Array(&gatherLo64Idx)) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX func (x Float32x8) ConcatOdd(y Float32x8) (z Float32x8) { lo := x.concatPermute128Scalars(0, 2, y) hi := x.concatPermute128Scalars(1, 3, y) return lo.concatPermuteScalarsGrouped(1, 3, 5, 7, hi) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], y[1], y[3]} // // Emulated, CPU Feature: AVX2 func (x Int64x4) ConcatOdd(y Int64x4) (z Int64x4) { return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt64() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], y[1], y[3]} // // Emulated, CPU Feature: AVX2 func (x Uint64x4) ConcatOdd(y Uint64x4) (z Uint64x4) { return gatherLo64(x.interleaveHiGrouped(y)) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], y[1], y[3]} // // Emulated, CPU Feature: AVX func (x Float64x4) ConcatOdd(y Float64x4) (z Float64x4) { lo := x.concatPermute128Scalars(0, 2, y) hi := x.concatPermute128Scalars(1, 3, y) return lo.concatPermuteScalarsGrouped(1, 3, hi) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 64 // // Emulated, CPU Feature: AVX512 func (x Int8x64) ConcatOdd(y Int8x64) (z Int8x64) { return x.ToBits().ConcatOdd(y.ToBits()).BitsToInt8() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 64 // // Emulated, CPU Feature: AVX512 func (x Uint8x64) ConcatOdd(y Uint8x64) (z Uint8x64) { if X86.AVX512VBMI() { return x.ConcatLookupMod(y, LoadUint8x64Array(&concatOdd8x64Idx)) } idx := LoadInt8x64Array(&concatOdd8x64GroupedIdx) a := x.LookupModOrZeroGrouped(idx).ReshapeToUint64s() b := y.LookupModOrZeroGrouped(idx).ReshapeToUint64s() return a.ConcatLookupMod(b, LoadUint64x8Array(&concatEven64x8Idx)).ReshapeToUint8s() } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 32 // // Emulated, CPU Feature: AVX512 func (x Int16x32) ConcatOdd(y Int16x32) (z Int16x32) { return x.ConcatLookupMod(y, LoadUint16x32Array(&concatOdd16x32Idx)) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 32 // // Emulated, CPU Feature: AVX512 func (x Uint16x32) ConcatOdd(y Uint16x32) (z Uint16x32) { return x.ConcatLookupMod(y, LoadUint16x32Array(&concatOdd16x32Idx)) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Int32x16) ConcatOdd(y Int32x16) (z Int32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&concatOdd32x16Idx)) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Uint32x16) ConcatOdd(y Uint32x16) (z Uint32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&concatOdd32x16Idx)) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 16 // // Emulated, CPU Feature: AVX512 func (x Float32x16) ConcatOdd(y Float32x16) (z Float32x16) { return x.ConcatLookupMod(y, LoadUint32x16Array(&concatOdd32x16Idx)) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Int64x8) ConcatOdd(y Int64x8) (z Int64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&concatOdd64x8Idx)) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Uint64x8) ConcatOdd(y Uint64x8) (z Uint64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&concatOdd64x8Idx)) } // ConcatOdd concatenates the odd-indexed elements of x and y. // // z = {x[1], x[3], ..., x[n-1], y[1], y[3], ..., y[n-1]}, where n = 8 // // Emulated, CPU Feature: AVX512 func (x Float64x8) ConcatOdd(y Float64x8) (z Float64x8) { return x.ConcatLookupMod(y, LoadUint64x8Array(&concatOdd64x8Idx)) }