// Code generated by 'simdgen -o godefs -goroot $GOROOT -arch amd64 -xedPath $XED_PATH go_amd64.yaml types.yaml categories.yaml'; DO NOT EDIT. //go:build goexperiment.simd package archsimd /* AESDecryptLastRound */ // AESDecryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of dw array in use. // result = AddRoundKey(InvShiftRows(InvSubBytes(x)), y) // // Asm: VAESDECLAST, CPU Feature: AVXAES func (x Uint8x16) AESDecryptLastRound(y Uint32x4) Uint8x16 // AESDecryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of dw array in use. // result = AddRoundKey(InvShiftRows(InvSubBytes(x)), y) // // Asm: VAESDECLAST, CPU Feature: AVX2AES func (x Uint8x32) AESDecryptLastRound(y Uint32x8) Uint8x32 // AESDecryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of dw array in use. // result = AddRoundKey(InvShiftRows(InvSubBytes(x)), y) // // Asm: VAESDECLAST, CPU Feature: AVX512AES func (x Uint8x64) AESDecryptLastRound(y Uint32x16) Uint8x64 /* AESDecryptOneRound */ // AESDecryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of dw array in use. // result = AddRoundKey(InvMixColumns(InvShiftRows(InvSubBytes(x))), y) // // Asm: VAESDEC, CPU Feature: AVXAES func (x Uint8x16) AESDecryptOneRound(y Uint32x4) Uint8x16 // AESDecryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of dw array in use. // result = AddRoundKey(InvMixColumns(InvShiftRows(InvSubBytes(x))), y) // // Asm: VAESDEC, CPU Feature: AVX2AES func (x Uint8x32) AESDecryptOneRound(y Uint32x8) Uint8x32 // AESDecryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of dw array in use. // result = AddRoundKey(InvMixColumns(InvShiftRows(InvSubBytes(x))), y) // // Asm: VAESDEC, CPU Feature: AVX512AES func (x Uint8x64) AESDecryptOneRound(y Uint32x16) Uint8x64 /* AESEncryptLastRound */ // AESEncryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of w array in use. // result = AddRoundKey((ShiftRows(SubBytes(x))), y) // // Asm: VAESENCLAST, CPU Feature: AVXAES func (x Uint8x16) AESEncryptLastRound(y Uint32x4) Uint8x16 // AESEncryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of w array in use. // result = AddRoundKey((ShiftRows(SubBytes(x))), y) // // Asm: VAESENCLAST, CPU Feature: AVX2AES func (x Uint8x32) AESEncryptLastRound(y Uint32x8) Uint8x32 // AESEncryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of w array in use. // result = AddRoundKey((ShiftRows(SubBytes(x))), y) // // Asm: VAESENCLAST, CPU Feature: AVX512AES func (x Uint8x64) AESEncryptLastRound(y Uint32x16) Uint8x64 /* AESEncryptOneRound */ // AESEncryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of w array in use. // result = AddRoundKey(MixColumns(ShiftRows(SubBytes(x))), y) // // Asm: VAESENC, CPU Feature: AVXAES func (x Uint8x16) AESEncryptOneRound(y Uint32x4) Uint8x16 // AESEncryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of w array in use. // result = AddRoundKey(MixColumns(ShiftRows(SubBytes(x))), y) // // Asm: VAESENC, CPU Feature: AVX2AES func (x Uint8x32) AESEncryptOneRound(y Uint32x8) Uint8x32 // AESEncryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. // y is the chunk of w array in use. // result = AddRoundKey(MixColumns(ShiftRows(SubBytes(x))), y) // // Asm: VAESENC, CPU Feature: AVX512AES func (x Uint8x64) AESEncryptOneRound(y Uint32x16) Uint8x64 /* AESInvMixColumns */ // AESInvMixColumns performs the InvMixColumns operation in AES cipher algorithm defined in FIPS 197. // x is the chunk of w array in use. // result = InvMixColumns(x) // // Asm: VAESIMC, CPU Feature: AVXAES func (x Uint32x4) AESInvMixColumns() Uint32x4 /* AESRoundKeyGenAssist */ // AESRoundKeyGenAssist performs some components of KeyExpansion in AES cipher algorithm defined in FIPS 197. // x is an array of AES words, but only x[0] and x[2] are used. // r is a value from the Rcon constant array. // result[0] = XOR(SubWord(RotWord(x[0])), r) // result[1] = SubWord(x[1]) // result[2] = XOR(SubWord(RotWord(x[2])), r) // result[3] = SubWord(x[3]) // // Performance: A non-constant value of rconVal may result in significantly worse performance for this operation. // // Asm: VAESKEYGENASSIST, CPU Feature: AVXAES func (x Uint32x4) AESRoundKeyGenAssist(rconVal uint8) Uint32x4 /* AddOddSubEven */ // AddOddSubEven adds the odd-indexed elements of x and y and subtracts the // even-indexed elements of y from those of x. // // z[2*i+1] = x[2*i+1] + y[2*i+1] // Add odd // z[2*i] = x[2*i] - y[2*i] // Subtract even // // Asm: VADDSUBPS, CPU Feature: AVX func (x Float32x4) AddOddSubEven(y Float32x4) (z Float32x4) // AddOddSubEven adds the odd-indexed elements of x and y and subtracts the // even-indexed elements of y from those of x. // // z[2*i+1] = x[2*i+1] + y[2*i+1] // Add odd // z[2*i] = x[2*i] - y[2*i] // Subtract even // // Asm: VADDSUBPS, CPU Feature: AVX func (x Float32x8) AddOddSubEven(y Float32x8) (z Float32x8) // AddOddSubEven adds the odd-indexed elements of x and y and subtracts the // even-indexed elements of y from those of x. // // z[2*i+1] = x[2*i+1] + y[2*i+1] // Add odd // z[2*i] = x[2*i] - y[2*i] // Subtract even // // Asm: VADDSUBPD, CPU Feature: AVX func (x Float64x2) AddOddSubEven(y Float64x2) (z Float64x2) // AddOddSubEven adds the odd-indexed elements of x and y and subtracts the // even-indexed elements of y from those of x. // // z[2*i+1] = x[2*i+1] + y[2*i+1] // Add odd // z[2*i] = x[2*i] - y[2*i] // Subtract even // // Asm: VADDSUBPD, CPU Feature: AVX func (x Float64x4) AddOddSubEven(y Float64x4) (z Float64x4) /* CeilScaled */ // CeilScaled rounds elements up with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x4) CeilScaled(prec uint8) Float32x4 // CeilScaled rounds elements up with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x8) CeilScaled(prec uint8) Float32x8 // CeilScaled rounds elements up with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x16) CeilScaled(prec uint8) Float32x16 // CeilScaled rounds elements up with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x2) CeilScaled(prec uint8) Float64x2 // CeilScaled rounds elements up with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x4) CeilScaled(prec uint8) Float64x4 // CeilScaled rounds elements up with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x8) CeilScaled(prec uint8) Float64x8 /* CeilScaledResidue */ // CeilScaledResidue computes the difference after ceiling with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x4) CeilScaledResidue(prec uint8) Float32x4 // CeilScaledResidue computes the difference after ceiling with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x8) CeilScaledResidue(prec uint8) Float32x8 // CeilScaledResidue computes the difference after ceiling with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x16) CeilScaledResidue(prec uint8) Float32x16 // CeilScaledResidue computes the difference after ceiling with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x2) CeilScaledResidue(prec uint8) Float64x2 // CeilScaledResidue computes the difference after ceiling with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x4) CeilScaledResidue(prec uint8) Float64x4 // CeilScaledResidue computes the difference after ceiling with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x8) CeilScaledResidue(prec uint8) Float64x8 /* ConcatPermute128Scalars */ // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four // 128-bit elements, and returns a 256-bit result formed by // concatenating the two elements specified by lo and hi. // For example, // // {40, 41, 42, 43, 50, 51, 52, 53}.ConcatPermute128Scalars(3, 0, {60, 61, 62, 63, 70, 71, 72, 73}) // // returns {70, 71, 72, 73, 40, 41, 42, 43}. // // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. // // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. // // Asm: VPERM2F128, CPU Feature: AVX func (x Float32x8) ConcatPermute128Scalars(lo, hi uint8, y Float32x8) Float32x8 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four // 128-bit elements, and returns a 256-bit result formed by // concatenating the two elements specified by lo and hi. // For example, // // {40, 41, 50, 51}.ConcatPermute128Scalars(3, 0, {60, 61, 70, 71}) // // returns {70, 71, 40, 41}. // // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. // // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. // // Asm: VPERM2F128, CPU Feature: AVX func (x Float64x4) ConcatPermute128Scalars(lo, hi uint8, y Float64x4) Float64x4 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four // 128-bit elements, and returns a 256-bit result formed by // concatenating the two elements specified by lo and hi. // For example, // // {0x40, 0x41, ..., 0x4f, 0x50, 0x51, ..., 0x5f}.ConcatPermute128Scalars(3, 0, // {0x60, 0x61, ..., 0x6f, 0x70, 0x71, ..., 0x7f}) // // returns {0x70, 0x71, ..., 0x7f, 0x40, 0x41, ..., 0x4f}. // // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. // // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. // // Asm: VPERM2I128, CPU Feature: AVX2 func (x Int8x32) ConcatPermute128Scalars(lo, hi uint8, y Int8x32) Int8x32 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four // 128-bit elements, and returns a 256-bit result formed by // concatenating the two elements specified by lo and hi. // For example, // // {40, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57}.ConcatPermute128Scalars(3, 0, // {60, 61, 62, 63, 64, 65, 66, 67, 70, 71, 72, 73, 74, 75, 76, 77}) // // returns {70, 71, 72, 73, 74, 75, 76, 77, 40, 41, 42, 43, 44, 45, 46, 47}. // // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. // // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. // // Asm: VPERM2I128, CPU Feature: AVX2 func (x Int16x16) ConcatPermute128Scalars(lo, hi uint8, y Int16x16) Int16x16 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four // 128-bit elements, and returns a 256-bit result formed by // concatenating the two elements specified by lo and hi. // For example, // // {40, 41, 42, 43, 50, 51, 52, 53}.ConcatPermute128Scalars(3, 0, {60, 61, 62, 63, 70, 71, 72, 73}) // // returns {70, 71, 72, 73, 40, 41, 42, 43}. // // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. // // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. // // Asm: VPERM2I128, CPU Feature: AVX2 func (x Int32x8) ConcatPermute128Scalars(lo, hi uint8, y Int32x8) Int32x8 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four // 128-bit elements, and returns a 256-bit result formed by // concatenating the two elements specified by lo and hi. // For example, // // {40, 41, 50, 51}.ConcatPermute128Scalars(3, 0, {60, 61, 70, 71}) // // returns {70, 71, 40, 41}. // // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. // // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. // // Asm: VPERM2I128, CPU Feature: AVX2 func (x Int64x4) ConcatPermute128Scalars(lo, hi uint8, y Int64x4) Int64x4 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four // 128-bit elements, and returns a 256-bit result formed by // concatenating the two elements specified by lo and hi. // For example, // // {0x40, 0x41, ..., 0x4f, 0x50, 0x51, ..., 0x5f}.ConcatPermute128Scalars(3, 0, // {0x60, 0x61, ..., 0x6f, 0x70, 0x71, ..., 0x7f}) // // returns {0x70, 0x71, ..., 0x7f, 0x40, 0x41, ..., 0x4f}. // // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. // // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. // // Asm: VPERM2I128, CPU Feature: AVX2 func (x Uint8x32) ConcatPermute128Scalars(lo, hi uint8, y Uint8x32) Uint8x32 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four // 128-bit elements, and returns a 256-bit result formed by // concatenating the two elements specified by lo and hi. // For example, // // {40, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57}.ConcatPermute128Scalars(3, 0, // {60, 61, 62, 63, 64, 65, 66, 67, 70, 71, 72, 73, 74, 75, 76, 77}) // // returns {70, 71, 72, 73, 74, 75, 76, 77, 40, 41, 42, 43, 44, 45, 46, 47}. // // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. // // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. // // Asm: VPERM2I128, CPU Feature: AVX2 func (x Uint16x16) ConcatPermute128Scalars(lo, hi uint8, y Uint16x16) Uint16x16 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four // 128-bit elements, and returns a 256-bit result formed by // concatenating the two elements specified by lo and hi. // For example, // // {40, 41, 42, 43, 50, 51, 52, 53}.ConcatPermute128Scalars(3, 0, {60, 61, 62, 63, 70, 71, 72, 73}) // // returns {70, 71, 72, 73, 40, 41, 42, 43}. // // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. // // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. // // Asm: VPERM2I128, CPU Feature: AVX2 func (x Uint32x8) ConcatPermute128Scalars(lo, hi uint8, y Uint32x8) Uint32x8 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four // 128-bit elements, and returns a 256-bit result formed by // concatenating the two elements specified by lo and hi. // For example, // // {40, 41, 50, 51}.ConcatPermute128Scalars(3, 0, {60, 61, 70, 71}) // // returns {70, 71, 40, 41}. // // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. // // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. // // Asm: VPERM2I128, CPU Feature: AVX2 func (x Uint64x4) ConcatPermute128Scalars(lo, hi uint8, y Uint64x4) Uint64x4 /* FloorScaled */ // FloorScaled rounds elements down with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x4) FloorScaled(prec uint8) Float32x4 // FloorScaled rounds elements down with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x8) FloorScaled(prec uint8) Float32x8 // FloorScaled rounds elements down with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x16) FloorScaled(prec uint8) Float32x16 // FloorScaled rounds elements down with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x2) FloorScaled(prec uint8) Float64x2 // FloorScaled rounds elements down with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x4) FloorScaled(prec uint8) Float64x4 // FloorScaled rounds elements down with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x8) FloorScaled(prec uint8) Float64x8 /* FloorScaledResidue */ // FloorScaledResidue computes the difference after flooring with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x4) FloorScaledResidue(prec uint8) Float32x4 // FloorScaledResidue computes the difference after flooring with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x8) FloorScaledResidue(prec uint8) Float32x8 // FloorScaledResidue computes the difference after flooring with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x16) FloorScaledResidue(prec uint8) Float32x16 // FloorScaledResidue computes the difference after flooring with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x2) FloorScaledResidue(prec uint8) Float64x2 // FloorScaledResidue computes the difference after flooring with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x4) FloorScaledResidue(prec uint8) Float64x4 // FloorScaledResidue computes the difference after flooring with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x8) FloorScaledResidue(prec uint8) Float64x8 /* GaloisFieldAffineTransform */ // GaloisFieldAffineTransform returns the affine transformation A * x + b in GF(2)^8. // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. // Each element of x is interpreted as a vector of 8 bits. // The b argument is likewise a vector of 8 bits. // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. // The * and + operators in GF(2) are defined as AND and XOR. // The result is z[i] = A[i/8] * x[i] + b, where * and + are performed in GF(2). // // Performance: A non-constant value of b may result in significantly worse performance for this operation. // // Asm: VGF2P8AFFINEQB, CPU Feature: AVX512GFNI func (x Uint8x16) GaloisFieldAffineTransform(A Uint64x2, b uint8) Uint8x16 // GaloisFieldAffineTransform returns the affine transformation A * x + b in GF(2)^8. // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. // Each element of x is interpreted as a vector of 8 bits. // The b argument is likewise a vector of 8 bits. // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. // The * and + operators in GF(2) are defined as AND and XOR. // The result is z[i] = A[i/8] * x[i] + b, where * and + are performed in GF(2). // // Performance: A non-constant value of b may result in significantly worse performance for this operation. // // Asm: VGF2P8AFFINEQB, CPU Feature: AVX512GFNI func (x Uint8x32) GaloisFieldAffineTransform(A Uint64x4, b uint8) Uint8x32 // GaloisFieldAffineTransform returns the affine transformation A * x + b in GF(2)^8. // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. // Each element of x is interpreted as a vector of 8 bits. // The b argument is likewise a vector of 8 bits. // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. // The * and + operators in GF(2) are defined as AND and XOR. // The result is z[i] = A[i/8] * x[i] + b, where * and + are performed in GF(2). // // Performance: A non-constant value of b may result in significantly worse performance for this operation. // // Asm: VGF2P8AFFINEQB, CPU Feature: AVX512GFNI func (x Uint8x64) GaloisFieldAffineTransform(A Uint64x8, b uint8) Uint8x64 /* GaloisFieldAffineTransformInverse */ // GaloisFieldAffineTransformInverse returns the affine transformation A * inv(x) + b, // where inv(x) is the multiplicative inverse of x in GF(2^8) modulo // P = x^8 + x^4 + x^3 + x + 1, and the affine // transformation is performed in GF(2)^8. // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. // Each element of inv(x) is interpreted as a vector of 8 bits. // The b argument is likewise a vector of 8 bits. // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. // The * and + operators in GF(2) are defined as AND and XOR. // The result is z[i] = A[i/8] * inv(x[i]) + b, where * and + are performed in GF(2). // // Performance: A non-constant value of b may result in significantly worse performance for this operation. // // Asm: VGF2P8AFFINEINVQB, CPU Feature: AVX512GFNI func (x Uint8x16) GaloisFieldAffineTransformInverse(A Uint64x2, b uint8) Uint8x16 // GaloisFieldAffineTransformInverse returns the affine transformation A * inv(x) + b, // where inv(x) is the multiplicative inverse of x in GF(2^8) modulo // P = x^8 + x^4 + x^3 + x + 1, and the affine // transformation is performed in GF(2)^8. // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. // Each element of inv(x) is interpreted as a vector of 8 bits. // The b argument is likewise a vector of 8 bits. // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. // The * and + operators in GF(2) are defined as AND and XOR. // The result is z[i] = A[i/8] * inv(x[i]) + b, where * and + are performed in GF(2). // // Performance: A non-constant value of b may result in significantly worse performance for this operation. // // Asm: VGF2P8AFFINEINVQB, CPU Feature: AVX512GFNI func (x Uint8x32) GaloisFieldAffineTransformInverse(A Uint64x4, b uint8) Uint8x32 // GaloisFieldAffineTransformInverse returns the affine transformation A * inv(x) + b, // where inv(x) is the multiplicative inverse of x in GF(2^8) modulo // P = x^8 + x^4 + x^3 + x + 1, and the affine // transformation is performed in GF(2)^8. // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. // Each element of inv(x) is interpreted as a vector of 8 bits. // The b argument is likewise a vector of 8 bits. // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. // The * and + operators in GF(2) are defined as AND and XOR. // The result is z[i] = A[i/8] * inv(x[i]) + b, where * and + are performed in GF(2). // // Performance: A non-constant value of b may result in significantly worse performance for this operation. // // Asm: VGF2P8AFFINEINVQB, CPU Feature: AVX512GFNI func (x Uint8x64) GaloisFieldAffineTransformInverse(A Uint64x8, b uint8) Uint8x64 /* GaloisFieldMul */ // GaloisFieldMul returns (x * y) mod P, performed in GF(2^8), // where the characteristic polynomial P is x^8 + x^4 + x^3 + x + 1. // // Asm: VGF2P8MULB, CPU Feature: AVX512GFNI func (x Uint8x16) GaloisFieldMul(y Uint8x16) Uint8x16 // GaloisFieldMul returns (x * y) mod P, performed in GF(2^8), // where the characteristic polynomial P is x^8 + x^4 + x^3 + x + 1. // // Asm: VGF2P8MULB, CPU Feature: AVX512GFNI func (x Uint8x32) GaloisFieldMul(y Uint8x32) Uint8x32 // GaloisFieldMul returns (x * y) mod P, performed in GF(2^8), // where the characteristic polynomial P is x^8 + x^4 + x^3 + x + 1. // // Asm: VGF2P8MULB, CPU Feature: AVX512GFNI func (x Uint8x64) GaloisFieldMul(y Uint8x64) Uint8x64 /* InterleaveHiGrouped */ // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHBW, CPU Feature: AVX2 func (x Int8x32) InterleaveHiGrouped(y Int8x32) Int8x32 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHBW, CPU Feature: AVX512 func (x Int8x64) InterleaveHiGrouped(y Int8x64) Int8x64 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHWD, CPU Feature: AVX2 func (x Int16x16) InterleaveHiGrouped(y Int16x16) Int16x16 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHWD, CPU Feature: AVX512 func (x Int16x32) InterleaveHiGrouped(y Int16x32) Int16x32 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHDQ, CPU Feature: AVX2 func (x Int32x8) InterleaveHiGrouped(y Int32x8) Int32x8 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHDQ, CPU Feature: AVX512 func (x Int32x16) InterleaveHiGrouped(y Int32x16) Int32x16 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHQDQ, CPU Feature: AVX2 func (x Int64x4) InterleaveHiGrouped(y Int64x4) Int64x4 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHQDQ, CPU Feature: AVX512 func (x Int64x8) InterleaveHiGrouped(y Int64x8) Int64x8 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHBW, CPU Feature: AVX2 func (x Uint8x32) InterleaveHiGrouped(y Uint8x32) Uint8x32 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHBW, CPU Feature: AVX512 func (x Uint8x64) InterleaveHiGrouped(y Uint8x64) Uint8x64 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHWD, CPU Feature: AVX2 func (x Uint16x16) InterleaveHiGrouped(y Uint16x16) Uint16x16 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHWD, CPU Feature: AVX512 func (x Uint16x32) InterleaveHiGrouped(y Uint16x32) Uint16x32 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHDQ, CPU Feature: AVX2 func (x Uint32x8) InterleaveHiGrouped(y Uint32x8) Uint32x8 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHDQ, CPU Feature: AVX512 func (x Uint32x16) InterleaveHiGrouped(y Uint32x16) Uint32x16 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHQDQ, CPU Feature: AVX2 func (x Uint64x4) InterleaveHiGrouped(y Uint64x4) Uint64x4 // InterleaveHiGrouped interleaves the elements of the high half of each 128-bit subvector of x and y. // // Asm: VPUNPCKHQDQ, CPU Feature: AVX512 func (x Uint64x8) InterleaveHiGrouped(y Uint64x8) Uint64x8 /* InterleaveLoGrouped */ // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLBW, CPU Feature: AVX2 func (x Int8x32) InterleaveLoGrouped(y Int8x32) Int8x32 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLBW, CPU Feature: AVX512 func (x Int8x64) InterleaveLoGrouped(y Int8x64) Int8x64 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLWD, CPU Feature: AVX2 func (x Int16x16) InterleaveLoGrouped(y Int16x16) Int16x16 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLWD, CPU Feature: AVX512 func (x Int16x32) InterleaveLoGrouped(y Int16x32) Int16x32 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLDQ, CPU Feature: AVX2 func (x Int32x8) InterleaveLoGrouped(y Int32x8) Int32x8 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLDQ, CPU Feature: AVX512 func (x Int32x16) InterleaveLoGrouped(y Int32x16) Int32x16 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLQDQ, CPU Feature: AVX2 func (x Int64x4) InterleaveLoGrouped(y Int64x4) Int64x4 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLQDQ, CPU Feature: AVX512 func (x Int64x8) InterleaveLoGrouped(y Int64x8) Int64x8 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLBW, CPU Feature: AVX2 func (x Uint8x32) InterleaveLoGrouped(y Uint8x32) Uint8x32 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLBW, CPU Feature: AVX512 func (x Uint8x64) InterleaveLoGrouped(y Uint8x64) Uint8x64 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLWD, CPU Feature: AVX2 func (x Uint16x16) InterleaveLoGrouped(y Uint16x16) Uint16x16 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLWD, CPU Feature: AVX512 func (x Uint16x32) InterleaveLoGrouped(y Uint16x32) Uint16x32 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLDQ, CPU Feature: AVX2 func (x Uint32x8) InterleaveLoGrouped(y Uint32x8) Uint32x8 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLDQ, CPU Feature: AVX512 func (x Uint32x16) InterleaveLoGrouped(y Uint32x16) Uint32x16 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLQDQ, CPU Feature: AVX2 func (x Uint64x4) InterleaveLoGrouped(y Uint64x4) Uint64x4 // InterleaveLoGrouped interleaves the elements of the low half of each 128-bit subvector of x and y. // // Asm: VPUNPCKLQDQ, CPU Feature: AVX512 func (x Uint64x8) InterleaveLoGrouped(y Uint64x8) Uint64x8 /* MulAddEvenSubOdd */ // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and // x * y - z for the odd-indexed elements. // // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMSUBADD213PS, CPU Feature: FMA func (x Float32x4) MulAddEvenSubOdd(y Float32x4, z Float32x4) (w Float32x4) // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and // x * y - z for the odd-indexed elements. // // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMSUBADD213PS, CPU Feature: FMA func (x Float32x8) MulAddEvenSubOdd(y Float32x8, z Float32x8) (w Float32x8) // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and // x * y - z for the odd-indexed elements. // // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMSUBADD213PS, CPU Feature: AVX512 func (x Float32x16) MulAddEvenSubOdd(y Float32x16, z Float32x16) (w Float32x16) // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and // x * y - z for the odd-indexed elements. // // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMSUBADD213PD, CPU Feature: FMA func (x Float64x2) MulAddEvenSubOdd(y Float64x2, z Float64x2) (w Float64x2) // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and // x * y - z for the odd-indexed elements. // // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMSUBADD213PD, CPU Feature: FMA func (x Float64x4) MulAddEvenSubOdd(y Float64x4, z Float64x4) (w Float64x4) // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and // x * y - z for the odd-indexed elements. // // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMSUBADD213PD, CPU Feature: AVX512 func (x Float64x8) MulAddEvenSubOdd(y Float64x8, z Float64x8) (w Float64x8) /* MulAddOddSubEven */ // MulAddOddSubEven returns x * y + z for the odd-indexed elements and // x * y - z for the even-indexed elements. // // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMADDSUB213PS, CPU Feature: FMA func (x Float32x4) MulAddOddSubEven(y Float32x4, z Float32x4) (w Float32x4) // MulAddOddSubEven returns x * y + z for the odd-indexed elements and // x * y - z for the even-indexed elements. // // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMADDSUB213PS, CPU Feature: FMA func (x Float32x8) MulAddOddSubEven(y Float32x8, z Float32x8) (w Float32x8) // MulAddOddSubEven returns x * y + z for the odd-indexed elements and // x * y - z for the even-indexed elements. // // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMADDSUB213PS, CPU Feature: AVX512 func (x Float32x16) MulAddOddSubEven(y Float32x16, z Float32x16) (w Float32x16) // MulAddOddSubEven returns x * y + z for the odd-indexed elements and // x * y - z for the even-indexed elements. // // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMADDSUB213PD, CPU Feature: FMA func (x Float64x2) MulAddOddSubEven(y Float64x2, z Float64x2) (w Float64x2) // MulAddOddSubEven returns x * y + z for the odd-indexed elements and // x * y - z for the even-indexed elements. // // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMADDSUB213PD, CPU Feature: FMA func (x Float64x4) MulAddOddSubEven(y Float64x4, z Float64x4) (w Float64x4) // MulAddOddSubEven returns x * y + z for the odd-indexed elements and // x * y - z for the even-indexed elements. // // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even // // This performs a fused multiply-add, computing each result with a single // rounding rather than two and no intermediate overflow. // // Asm: VFMADDSUB213PD, CPU Feature: AVX512 func (x Float64x8) MulAddOddSubEven(y Float64x8, z Float64x8) (w Float64x8) /* MulHigh */ // MulHigh multiplies corresponding elements of x and y and returns the high // half of each double-width product. // // z[i] = (x[i] * y[i]) >> 16 // // The product is computed exactly, so no bits are lost before the shift. // // Asm: VPMULHW, CPU Feature: AVX func (x Int16x8) MulHigh(y Int16x8) (z Int16x8) // MulHigh multiplies corresponding elements of x and y and returns the high // half of each double-width product. // // z[i] = (x[i] * y[i]) >> 16 // // The product is computed exactly, so no bits are lost before the shift. // // Asm: VPMULHW, CPU Feature: AVX2 func (x Int16x16) MulHigh(y Int16x16) (z Int16x16) // MulHigh multiplies corresponding elements of x and y and returns the high // half of each double-width product. // // z[i] = (x[i] * y[i]) >> 16 // // The product is computed exactly, so no bits are lost before the shift. // // Asm: VPMULHW, CPU Feature: AVX512 func (x Int16x32) MulHigh(y Int16x32) (z Int16x32) // MulHigh multiplies corresponding elements of x and y and returns the high // half of each double-width product. // // z[i] = (x[i] * y[i]) >> 16 // // The product is computed exactly, so no bits are lost before the shift. // // Asm: VPMULHUW, CPU Feature: AVX func (x Uint16x8) MulHigh(y Uint16x8) (z Uint16x8) // MulHigh multiplies corresponding elements of x and y and returns the high // half of each double-width product. // // z[i] = (x[i] * y[i]) >> 16 // // The product is computed exactly, so no bits are lost before the shift. // // Asm: VPMULHUW, CPU Feature: AVX2 func (x Uint16x16) MulHigh(y Uint16x16) (z Uint16x16) // MulHigh multiplies corresponding elements of x and y and returns the high // half of each double-width product. // // z[i] = (x[i] * y[i]) >> 16 // // The product is computed exactly, so no bits are lost before the shift. // // Asm: VPMULHUW, CPU Feature: AVX512 func (x Uint16x32) MulHigh(y Uint16x32) (z Uint16x32) /* MulSign */ // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. // // z[i] = x[i] * sign(y[i]) // // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] // where y[i] is positive. The negation wraps, so the most negative value stays // as it is. // // Asm: VPSIGNB, CPU Feature: AVX func (x Int8x16) MulSign(y Int8x16) (z Int8x16) // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. // // z[i] = x[i] * sign(y[i]) // // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] // where y[i] is positive. The negation wraps, so the most negative value stays // as it is. // // Asm: VPSIGNB, CPU Feature: AVX2 func (x Int8x32) MulSign(y Int8x32) (z Int8x32) // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. // // z[i] = x[i] * sign(y[i]) // // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] // where y[i] is positive. The negation wraps, so the most negative value stays // as it is. // // Asm: VPSIGNW, CPU Feature: AVX func (x Int16x8) MulSign(y Int16x8) (z Int16x8) // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. // // z[i] = x[i] * sign(y[i]) // // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] // where y[i] is positive. The negation wraps, so the most negative value stays // as it is. // // Asm: VPSIGNW, CPU Feature: AVX2 func (x Int16x16) MulSign(y Int16x16) (z Int16x16) // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. // // z[i] = x[i] * sign(y[i]) // // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] // where y[i] is positive. The negation wraps, so the most negative value stays // as it is. // // Asm: VPSIGND, CPU Feature: AVX func (x Int32x4) MulSign(y Int32x4) (z Int32x4) // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. // // z[i] = x[i] * sign(y[i]) // // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] // where y[i] is positive. The negation wraps, so the most negative value stays // as it is. // // Asm: VPSIGND, CPU Feature: AVX2 func (x Int32x8) MulSign(y Int32x8) (z Int32x8) /* MulWidenEven */ // MulWidenEven multiplies corresponding even-indexed elements of x and y, // returning a vector of half as many elements, each with twice the input // element size. // // z[i] = int64(x[2*i]) * int64(y[2*i]) // // The doubled element width is sufficient to hold every product without // overflow. // // Asm: VPMULDQ, CPU Feature: AVX func (x Int32x4) MulWidenEven(y Int32x4) (z Int64x2) // MulWidenEven multiplies corresponding even-indexed elements of x and y, // returning a vector of half as many elements, each with twice the input // element size. // // z[i] = int64(x[2*i]) * int64(y[2*i]) // // The doubled element width is sufficient to hold every product without // overflow. // // Asm: VPMULDQ, CPU Feature: AVX2 func (x Int32x8) MulWidenEven(y Int32x8) (z Int64x4) // MulWidenEven multiplies corresponding even-indexed elements of x and y, // returning a vector of half as many elements, each with twice the input // element size. // // z[i] = uint64(x[2*i]) * uint64(y[2*i]) // // The doubled element width is sufficient to hold every product without // overflow. // // Asm: VPMULUDQ, CPU Feature: AVX func (x Uint32x4) MulWidenEven(y Uint32x4) (z Uint64x2) // MulWidenEven multiplies corresponding even-indexed elements of x and y, // returning a vector of half as many elements, each with twice the input // element size. // // z[i] = uint64(x[2*i]) * uint64(y[2*i]) // // The doubled element width is sufficient to hold every product without // overflow. // // Asm: VPMULUDQ, CPU Feature: AVX2 func (x Uint32x8) MulWidenEven(y Uint32x8) (z Uint64x4) /* Reciprocal */ // Reciprocal computes an approximate reciprocal of each element. // // Asm: VRCPPS, CPU Feature: AVX func (x Float32x4) Reciprocal() Float32x4 // Reciprocal computes an approximate reciprocal of each element. // // Asm: VRCPPS, CPU Feature: AVX func (x Float32x8) Reciprocal() Float32x8 // Reciprocal computes an approximate reciprocal of each element. // // Asm: VRCP14PS, CPU Feature: AVX512 func (x Float32x16) Reciprocal() Float32x16 // Reciprocal computes an approximate reciprocal of each element. // // Asm: VRCP14PD, CPU Feature: AVX512 func (x Float64x2) Reciprocal() Float64x2 // Reciprocal computes an approximate reciprocal of each element. // // Asm: VRCP14PD, CPU Feature: AVX512 func (x Float64x4) Reciprocal() Float64x4 // Reciprocal computes an approximate reciprocal of each element. // // Asm: VRCP14PD, CPU Feature: AVX512 func (x Float64x8) Reciprocal() Float64x8 /* ReciprocalSqrt */ // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. // // Asm: VRSQRTPS, CPU Feature: AVX func (x Float32x4) ReciprocalSqrt() Float32x4 // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. // // Asm: VRSQRTPS, CPU Feature: AVX func (x Float32x8) ReciprocalSqrt() Float32x8 // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. // // Asm: VRSQRT14PS, CPU Feature: AVX512 func (x Float32x16) ReciprocalSqrt() Float32x16 // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. // // Asm: VRSQRT14PD, CPU Feature: AVX512 func (x Float64x2) ReciprocalSqrt() Float64x2 // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. // // Asm: VRSQRT14PD, CPU Feature: AVX512 func (x Float64x4) ReciprocalSqrt() Float64x4 // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. // // Asm: VRSQRT14PD, CPU Feature: AVX512 func (x Float64x8) ReciprocalSqrt() Float64x8 /* RoundScaled */ // RoundScaled rounds elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x4) RoundScaled(prec uint8) Float32x4 // RoundScaled rounds elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x8) RoundScaled(prec uint8) Float32x8 // RoundScaled rounds elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x16) RoundScaled(prec uint8) Float32x16 // RoundScaled rounds elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x2) RoundScaled(prec uint8) Float64x2 // RoundScaled rounds elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x4) RoundScaled(prec uint8) Float64x4 // RoundScaled rounds elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x8) RoundScaled(prec uint8) Float64x8 /* RoundScaledResidue */ // RoundScaledResidue computes the difference after rounding with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x4) RoundScaledResidue(prec uint8) Float32x4 // RoundScaledResidue computes the difference after rounding with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x8) RoundScaledResidue(prec uint8) Float32x8 // RoundScaledResidue computes the difference after rounding with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x16) RoundScaledResidue(prec uint8) Float32x16 // RoundScaledResidue computes the difference after rounding with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x2) RoundScaledResidue(prec uint8) Float64x2 // RoundScaledResidue computes the difference after rounding with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x4) RoundScaledResidue(prec uint8) Float64x4 // RoundScaledResidue computes the difference after rounding with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x8) RoundScaledResidue(prec uint8) Float64x8 /* SHA1FourRounds */ // SHA1FourRounds performs 4 rounds of B loop in SHA1 algorithm defined in FIPS 180-4. // x contains the state variables a, b, c and d from upper to lower order. // y contains the W array elements (with the state variable e added to the upper element) from upper to lower order. // result = the state variables a', b', c', d' updated after 4 rounds. // constant = 0 for the first 20 rounds of the loop, 1 for the next 20 rounds of the loop..., 3 for the last 20 rounds of the loop. // // Performance: A non-constant value of constant may result in significantly worse performance for this operation. // // Asm: SHA1RNDS4, CPU Feature: SHA func (x Uint32x4) SHA1FourRounds(constant uint8, y Uint32x4) Uint32x4 /* SHA1Message1 */ // SHA1Message1 does the XORing of 1 in SHA1 algorithm defined in FIPS 180-4. // x = {W3, W2, W1, W0} // y = {0, 0, W5, W4} // result = {W3^W5, W2^W4, W1^W3, W0^W2}. // // Asm: SHA1MSG1, CPU Feature: SHA func (x Uint32x4) SHA1Message1(y Uint32x4) Uint32x4 /* SHA1Message2 */ // SHA1Message2 does the calculation of 3 and 4 in SHA1 algorithm defined in FIPS 180-4. // x = result of 2. // y = {W15, W14, W13} // result = {W19, W18, W17, W16} // // Asm: SHA1MSG2, CPU Feature: SHA func (x Uint32x4) SHA1Message2(y Uint32x4) Uint32x4 /* SHA1NextE */ // SHA1NextE calculates the state variable e' updated after 4 rounds in SHA1 algorithm defined in FIPS 180-4. // x contains the state variable a (before the 4 rounds), placed in the upper element. // y is the elements of W array for next 4 rounds from upper to lower order. // result = the elements of the W array for the next 4 rounds, with the updated state variable e' added to the upper element, // from upper to lower order. // For the last round of the loop, you can specify zero for y to obtain the e' value itself, or better off specifying H4:0:0:0 // for y to get e' added to H4. (Note that the value of e' is computed only from x, and values of y don't affect the // computation of the value of e'.) // // Asm: SHA1NEXTE, CPU Feature: SHA func (x Uint32x4) SHA1NextE(y Uint32x4) Uint32x4 /* SHA256Message1 */ // SHA256Message1 does the sigma and addition of 1 in SHA256 algorithm defined in FIPS 180-4. // x = {W0, W1, W2, W3} // y = {W4, 0, 0, 0} // result = {W0+σ(W1), W1+σ(W2), W2+σ(W3), W3+σ(W4)} // // Asm: SHA256MSG1, CPU Feature: SHA func (x Uint32x4) SHA256Message1(y Uint32x4) Uint32x4 /* SHA256Message2 */ // SHA256Message2 does the sigma and addition of 3 in SHA256 algorithm defined in FIPS 180-4. // x = result of 2 // y = {0, 0, W14, W15} // result = {W16, W17, W18, W19} // // Asm: SHA256MSG2, CPU Feature: SHA func (x Uint32x4) SHA256Message2(y Uint32x4) Uint32x4 /* SHA256TwoRounds */ // SHA256TwoRounds does 2 rounds of B loop to calculate updated state variables in SHA256 algorithm defined in FIPS 180-4. // x = {h, g, d, c} // y = {f, e, b, a} // z = {W0+K0, W1+K1} // result = {f', e', b', a'} // The K array is a 64-DWORD constant array defined in page 11 of FIPS 180-4. Each element of the K array is to be added to // the corresponding element of the W array to make the input data z. // The updated state variables c', d', g', h' are not returned by this instruction, because they are equal to the input data // y (the state variables a, b, e, f before the 2 rounds). // // Asm: SHA256RNDS2, CPU Feature: SHA func (x Uint32x4) SHA256TwoRounds(y Uint32x4, z Uint32x4) Uint32x4 /* Scale */ // Scale multiplies each element of x by 2 raised to the power of the // floor of the corresponding element in y. // // Asm: VSCALEFPS, CPU Feature: AVX512 func (x Float32x4) Scale(y Float32x4) Float32x4 // Scale multiplies each element of x by 2 raised to the power of the // floor of the corresponding element in y. // // Asm: VSCALEFPS, CPU Feature: AVX512 func (x Float32x8) Scale(y Float32x8) Float32x8 // Scale multiplies each element of x by 2 raised to the power of the // floor of the corresponding element in y. // // Asm: VSCALEFPS, CPU Feature: AVX512 func (x Float32x16) Scale(y Float32x16) Float32x16 // Scale multiplies each element of x by 2 raised to the power of the // floor of the corresponding element in y. // // Asm: VSCALEFPD, CPU Feature: AVX512 func (x Float64x2) Scale(y Float64x2) Float64x2 // Scale multiplies each element of x by 2 raised to the power of the // floor of the corresponding element in y. // // Asm: VSCALEFPD, CPU Feature: AVX512 func (x Float64x4) Scale(y Float64x4) Float64x4 // Scale multiplies each element of x by 2 raised to the power of the // floor of the corresponding element in y. // // Asm: VSCALEFPD, CPU Feature: AVX512 func (x Float64x8) Scale(y Float64x8) Float64x8 /* ShiftAllLeftConcatMod16 */ // ShiftAllLeftConcatMod16 shifts x[i] left by shift%16, filling the emptied // low bits with the high bits of y[i]. That is, it shifts the double-width // concatenation of x[i] (high) and y[i] (low) left and keeps the high 16 // bits. // // s = shift % 16 // z[i] = x[i]<>(16-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHLDW, CPU Feature: AVX512VBMI2 func (x Uint16x8) ShiftAllLeftConcatMod16(y Uint16x8, shift uint64) (z Uint16x8) // ShiftAllLeftConcatMod16 shifts x[i] left by shift%16, filling the emptied // low bits with the high bits of y[i]. That is, it shifts the double-width // concatenation of x[i] (high) and y[i] (low) left and keeps the high 16 // bits. // // s = shift % 16 // z[i] = x[i]<>(16-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHLDW, CPU Feature: AVX512VBMI2 func (x Uint16x16) ShiftAllLeftConcatMod16(y Uint16x16, shift uint64) (z Uint16x16) // ShiftAllLeftConcatMod16 shifts x[i] left by shift%16, filling the emptied // low bits with the high bits of y[i]. That is, it shifts the double-width // concatenation of x[i] (high) and y[i] (low) left and keeps the high 16 // bits. // // s = shift % 16 // z[i] = x[i]<>(16-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHLDW, CPU Feature: AVX512VBMI2 func (x Uint16x32) ShiftAllLeftConcatMod16(y Uint16x32, shift uint64) (z Uint16x32) /* ShiftAllLeftConcatMod32 */ // ShiftAllLeftConcatMod32 shifts x[i] left by shift%32, filling the emptied // low bits with the high bits of y[i]. That is, it shifts the double-width // concatenation of x[i] (high) and y[i] (low) left and keeps the high 32 // bits. // // s = shift % 32 // z[i] = x[i]<>(32-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHLDD, CPU Feature: AVX512VBMI2 func (x Uint32x4) ShiftAllLeftConcatMod32(y Uint32x4, shift uint64) (z Uint32x4) // ShiftAllLeftConcatMod32 shifts x[i] left by shift%32, filling the emptied // low bits with the high bits of y[i]. That is, it shifts the double-width // concatenation of x[i] (high) and y[i] (low) left and keeps the high 32 // bits. // // s = shift % 32 // z[i] = x[i]<>(32-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHLDD, CPU Feature: AVX512VBMI2 func (x Uint32x8) ShiftAllLeftConcatMod32(y Uint32x8, shift uint64) (z Uint32x8) // ShiftAllLeftConcatMod32 shifts x[i] left by shift%32, filling the emptied // low bits with the high bits of y[i]. That is, it shifts the double-width // concatenation of x[i] (high) and y[i] (low) left and keeps the high 32 // bits. // // s = shift % 32 // z[i] = x[i]<>(32-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHLDD, CPU Feature: AVX512VBMI2 func (x Uint32x16) ShiftAllLeftConcatMod32(y Uint32x16, shift uint64) (z Uint32x16) /* ShiftAllLeftConcatMod64 */ // ShiftAllLeftConcatMod64 shifts x[i] left by shift%64, filling the emptied // low bits with the high bits of y[i]. That is, it shifts the double-width // concatenation of x[i] (high) and y[i] (low) left and keeps the high 64 // bits. // // s = shift % 64 // z[i] = x[i]<>(64-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHLDQ, CPU Feature: AVX512VBMI2 func (x Uint64x2) ShiftAllLeftConcatMod64(y Uint64x2, shift uint64) (z Uint64x2) // ShiftAllLeftConcatMod64 shifts x[i] left by shift%64, filling the emptied // low bits with the high bits of y[i]. That is, it shifts the double-width // concatenation of x[i] (high) and y[i] (low) left and keeps the high 64 // bits. // // s = shift % 64 // z[i] = x[i]<>(64-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHLDQ, CPU Feature: AVX512VBMI2 func (x Uint64x4) ShiftAllLeftConcatMod64(y Uint64x4, shift uint64) (z Uint64x4) // ShiftAllLeftConcatMod64 shifts x[i] left by shift%64, filling the emptied // low bits with the high bits of y[i]. That is, it shifts the double-width // concatenation of x[i] (high) and y[i] (low) left and keeps the high 64 // bits. // // s = shift % 64 // z[i] = x[i]<>(64-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHLDQ, CPU Feature: AVX512VBMI2 func (x Uint64x8) ShiftAllLeftConcatMod64(y Uint64x8, shift uint64) (z Uint64x8) /* ShiftAllRightConcatMod16 */ // ShiftAllRightConcatMod16 shifts x[i] right by shift%16, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 16 bits. // // s = shift % 16 // z[i] = x[i]>>s | y[i]<<(16-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHRDW, CPU Feature: AVX512VBMI2 func (x Uint16x8) ShiftAllRightConcatMod16(y Uint16x8, shift uint64) (z Uint16x8) // ShiftAllRightConcatMod16 shifts x[i] right by shift%16, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 16 bits. // // s = shift % 16 // z[i] = x[i]>>s | y[i]<<(16-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHRDW, CPU Feature: AVX512VBMI2 func (x Uint16x16) ShiftAllRightConcatMod16(y Uint16x16, shift uint64) (z Uint16x16) // ShiftAllRightConcatMod16 shifts x[i] right by shift%16, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 16 bits. // // s = shift % 16 // z[i] = x[i]>>s | y[i]<<(16-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHRDW, CPU Feature: AVX512VBMI2 func (x Uint16x32) ShiftAllRightConcatMod16(y Uint16x32, shift uint64) (z Uint16x32) /* ShiftAllRightConcatMod32 */ // ShiftAllRightConcatMod32 shifts x[i] right by shift%32, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 32 bits. // // s = shift % 32 // z[i] = x[i]>>s | y[i]<<(32-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHRDD, CPU Feature: AVX512VBMI2 func (x Uint32x4) ShiftAllRightConcatMod32(y Uint32x4, shift uint64) (z Uint32x4) // ShiftAllRightConcatMod32 shifts x[i] right by shift%32, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 32 bits. // // s = shift % 32 // z[i] = x[i]>>s | y[i]<<(32-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHRDD, CPU Feature: AVX512VBMI2 func (x Uint32x8) ShiftAllRightConcatMod32(y Uint32x8, shift uint64) (z Uint32x8) // ShiftAllRightConcatMod32 shifts x[i] right by shift%32, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 32 bits. // // s = shift % 32 // z[i] = x[i]>>s | y[i]<<(32-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHRDD, CPU Feature: AVX512VBMI2 func (x Uint32x16) ShiftAllRightConcatMod32(y Uint32x16, shift uint64) (z Uint32x16) /* ShiftAllRightConcatMod64 */ // ShiftAllRightConcatMod64 shifts x[i] right by shift%64, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 64 bits. // // s = shift % 64 // z[i] = x[i]>>s | y[i]<<(64-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHRDQ, CPU Feature: AVX512VBMI2 func (x Uint64x2) ShiftAllRightConcatMod64(y Uint64x2, shift uint64) (z Uint64x2) // ShiftAllRightConcatMod64 shifts x[i] right by shift%64, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 64 bits. // // s = shift % 64 // z[i] = x[i]>>s | y[i]<<(64-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHRDQ, CPU Feature: AVX512VBMI2 func (x Uint64x4) ShiftAllRightConcatMod64(y Uint64x4, shift uint64) (z Uint64x4) // ShiftAllRightConcatMod64 shifts x[i] right by shift%64, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 64 bits. // // s = shift % 64 // z[i] = x[i]>>s | y[i]<<(64-s) // // Performance: A non-constant value of shift may result in significantly worse performance for this operation. // // Asm: VPSHRDQ, CPU Feature: AVX512VBMI2 func (x Uint64x8) ShiftAllRightConcatMod64(y Uint64x8, shift uint64) (z Uint64x8) /* ShiftLeftConcatMod16 */ // ShiftLeftConcatMod16 shifts x[i] left by shift[i]%16, filling the // emptied low bits with the high bits of y[i]. That is, it shifts the // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the // high 16 bits. // // s[i] = shift[i] % 16 // z[i] = x[i]<>(16-s[i]) // // Asm: VPSHLDVW, CPU Feature: AVX512VBMI2 func (x Uint16x8) ShiftLeftConcatMod16(y Uint16x8, shift Uint16x8) (z Uint16x8) // ShiftLeftConcatMod16 shifts x[i] left by shift[i]%16, filling the // emptied low bits with the high bits of y[i]. That is, it shifts the // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the // high 16 bits. // // s[i] = shift[i] % 16 // z[i] = x[i]<>(16-s[i]) // // Asm: VPSHLDVW, CPU Feature: AVX512VBMI2 func (x Uint16x16) ShiftLeftConcatMod16(y Uint16x16, shift Uint16x16) (z Uint16x16) // ShiftLeftConcatMod16 shifts x[i] left by shift[i]%16, filling the // emptied low bits with the high bits of y[i]. That is, it shifts the // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the // high 16 bits. // // s[i] = shift[i] % 16 // z[i] = x[i]<>(16-s[i]) // // Asm: VPSHLDVW, CPU Feature: AVX512VBMI2 func (x Uint16x32) ShiftLeftConcatMod16(y Uint16x32, shift Uint16x32) (z Uint16x32) /* ShiftLeftConcatMod32 */ // ShiftLeftConcatMod32 shifts x[i] left by shift[i]%32, filling the // emptied low bits with the high bits of y[i]. That is, it shifts the // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the // high 32 bits. // // s[i] = shift[i] % 32 // z[i] = x[i]<>(32-s[i]) // // Asm: VPSHLDVD, CPU Feature: AVX512VBMI2 func (x Uint32x4) ShiftLeftConcatMod32(y Uint32x4, shift Uint32x4) (z Uint32x4) // ShiftLeftConcatMod32 shifts x[i] left by shift[i]%32, filling the // emptied low bits with the high bits of y[i]. That is, it shifts the // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the // high 32 bits. // // s[i] = shift[i] % 32 // z[i] = x[i]<>(32-s[i]) // // Asm: VPSHLDVD, CPU Feature: AVX512VBMI2 func (x Uint32x8) ShiftLeftConcatMod32(y Uint32x8, shift Uint32x8) (z Uint32x8) // ShiftLeftConcatMod32 shifts x[i] left by shift[i]%32, filling the // emptied low bits with the high bits of y[i]. That is, it shifts the // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the // high 32 bits. // // s[i] = shift[i] % 32 // z[i] = x[i]<>(32-s[i]) // // Asm: VPSHLDVD, CPU Feature: AVX512VBMI2 func (x Uint32x16) ShiftLeftConcatMod32(y Uint32x16, shift Uint32x16) (z Uint32x16) /* ShiftLeftConcatMod64 */ // ShiftLeftConcatMod64 shifts x[i] left by shift[i]%64, filling the // emptied low bits with the high bits of y[i]. That is, it shifts the // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the // high 64 bits. // // s[i] = shift[i] % 64 // z[i] = x[i]<>(64-s[i]) // // Asm: VPSHLDVQ, CPU Feature: AVX512VBMI2 func (x Uint64x2) ShiftLeftConcatMod64(y Uint64x2, shift Uint64x2) (z Uint64x2) // ShiftLeftConcatMod64 shifts x[i] left by shift[i]%64, filling the // emptied low bits with the high bits of y[i]. That is, it shifts the // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the // high 64 bits. // // s[i] = shift[i] % 64 // z[i] = x[i]<>(64-s[i]) // // Asm: VPSHLDVQ, CPU Feature: AVX512VBMI2 func (x Uint64x4) ShiftLeftConcatMod64(y Uint64x4, shift Uint64x4) (z Uint64x4) // ShiftLeftConcatMod64 shifts x[i] left by shift[i]%64, filling the // emptied low bits with the high bits of y[i]. That is, it shifts the // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the // high 64 bits. // // s[i] = shift[i] % 64 // z[i] = x[i]<>(64-s[i]) // // Asm: VPSHLDVQ, CPU Feature: AVX512VBMI2 func (x Uint64x8) ShiftLeftConcatMod64(y Uint64x8, shift Uint64x8) (z Uint64x8) /* ShiftRightConcatMod16 */ // ShiftRightConcatMod16 shifts x[i] right by shift[i]%16, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 16 bits. // // s[i] = shift[i] % 16 // z[i] = x[i]>>s[i] | y[i]<<(16-s[i]) // // Asm: VPSHRDVW, CPU Feature: AVX512VBMI2 func (x Uint16x8) ShiftRightConcatMod16(y Uint16x8, shift Uint16x8) (z Uint16x8) // ShiftRightConcatMod16 shifts x[i] right by shift[i]%16, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 16 bits. // // s[i] = shift[i] % 16 // z[i] = x[i]>>s[i] | y[i]<<(16-s[i]) // // Asm: VPSHRDVW, CPU Feature: AVX512VBMI2 func (x Uint16x16) ShiftRightConcatMod16(y Uint16x16, shift Uint16x16) (z Uint16x16) // ShiftRightConcatMod16 shifts x[i] right by shift[i]%16, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 16 bits. // // s[i] = shift[i] % 16 // z[i] = x[i]>>s[i] | y[i]<<(16-s[i]) // // Asm: VPSHRDVW, CPU Feature: AVX512VBMI2 func (x Uint16x32) ShiftRightConcatMod16(y Uint16x32, shift Uint16x32) (z Uint16x32) /* ShiftRightConcatMod32 */ // ShiftRightConcatMod32 shifts x[i] right by shift[i]%32, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 32 bits. // // s[i] = shift[i] % 32 // z[i] = x[i]>>s[i] | y[i]<<(32-s[i]) // // Asm: VPSHRDVD, CPU Feature: AVX512VBMI2 func (x Uint32x4) ShiftRightConcatMod32(y Uint32x4, shift Uint32x4) (z Uint32x4) // ShiftRightConcatMod32 shifts x[i] right by shift[i]%32, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 32 bits. // // s[i] = shift[i] % 32 // z[i] = x[i]>>s[i] | y[i]<<(32-s[i]) // // Asm: VPSHRDVD, CPU Feature: AVX512VBMI2 func (x Uint32x8) ShiftRightConcatMod32(y Uint32x8, shift Uint32x8) (z Uint32x8) // ShiftRightConcatMod32 shifts x[i] right by shift[i]%32, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 32 bits. // // s[i] = shift[i] % 32 // z[i] = x[i]>>s[i] | y[i]<<(32-s[i]) // // Asm: VPSHRDVD, CPU Feature: AVX512VBMI2 func (x Uint32x16) ShiftRightConcatMod32(y Uint32x16, shift Uint32x16) (z Uint32x16) /* ShiftRightConcatMod64 */ // ShiftRightConcatMod64 shifts x[i] right by shift[i]%64, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 64 bits. // // s[i] = shift[i] % 64 // z[i] = x[i]>>s[i] | y[i]<<(64-s[i]) // // Asm: VPSHRDVQ, CPU Feature: AVX512VBMI2 func (x Uint64x2) ShiftRightConcatMod64(y Uint64x2, shift Uint64x2) (z Uint64x2) // ShiftRightConcatMod64 shifts x[i] right by shift[i]%64, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 64 bits. // // s[i] = shift[i] % 64 // z[i] = x[i]>>s[i] | y[i]<<(64-s[i]) // // Asm: VPSHRDVQ, CPU Feature: AVX512VBMI2 func (x Uint64x4) ShiftRightConcatMod64(y Uint64x4, shift Uint64x4) (z Uint64x4) // ShiftRightConcatMod64 shifts x[i] right by shift[i]%64, filling the // emptied high bits with the low bits of y[i]. That is, it shifts the // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the // low 64 bits. // // s[i] = shift[i] % 64 // z[i] = x[i]>>s[i] | y[i]<<(64-s[i]) // // Asm: VPSHRDVQ, CPU Feature: AVX512VBMI2 func (x Uint64x8) ShiftRightConcatMod64(y Uint64x8, shift Uint64x8) (z Uint64x8) /* TruncScaled */ // TruncScaled truncates elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x4) TruncScaled(prec uint8) Float32x4 // TruncScaled truncates elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x8) TruncScaled(prec uint8) Float32x8 // TruncScaled truncates elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPS, CPU Feature: AVX512 func (x Float32x16) TruncScaled(prec uint8) Float32x16 // TruncScaled truncates elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x2) TruncScaled(prec uint8) Float64x2 // TruncScaled truncates elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x4) TruncScaled(prec uint8) Float64x4 // TruncScaled truncates elements with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VRNDSCALEPD, CPU Feature: AVX512 func (x Float64x8) TruncScaled(prec uint8) Float64x8 /* TruncScaledResidue */ // TruncScaledResidue computes the difference after truncating with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x4) TruncScaledResidue(prec uint8) Float32x4 // TruncScaledResidue computes the difference after truncating with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x8) TruncScaledResidue(prec uint8) Float32x8 // TruncScaledResidue computes the difference after truncating with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPS, CPU Feature: AVX512 func (x Float32x16) TruncScaledResidue(prec uint8) Float32x16 // TruncScaledResidue computes the difference after truncating with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x2) TruncScaledResidue(prec uint8) Float64x2 // TruncScaledResidue computes the difference after truncating with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x4) TruncScaledResidue(prec uint8) Float64x4 // TruncScaledResidue computes the difference after truncating with specified precision. // // Performance: A non-constant value of prec may result in significantly worse performance for this operation. // // Asm: VREDUCEPD, CPU Feature: AVX512 func (x Float64x8) TruncScaledResidue(prec uint8) Float64x8