Source file src/simd/archsimd/ops_exp_gen_amd64.go
1 // Code generated by 'simdgen -o godefs -goroot $GOROOT -arch amd64 -xedPath $XED_PATH go_amd64.yaml types.yaml categories.yaml'; DO NOT EDIT. 2 3 //go:build goexperiment.simd 4 5 package archsimd 6 7 /* AESDecryptLastRound */ 8 9 // AESDecryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 10 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 11 // y is the chunk of dw array in use. 12 // result = AddRoundKey(InvShiftRows(InvSubBytes(x)), y) 13 // 14 // Asm: VAESDECLAST, CPU Feature: AVXAES 15 func (x Uint8x16) AESDecryptLastRound(y Uint32x4) Uint8x16 16 17 // AESDecryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 18 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 19 // y is the chunk of dw array in use. 20 // result = AddRoundKey(InvShiftRows(InvSubBytes(x)), y) 21 // 22 // Asm: VAESDECLAST, CPU Feature: AVX2AES 23 func (x Uint8x32) AESDecryptLastRound(y Uint32x8) Uint8x32 24 25 // AESDecryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 26 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 27 // y is the chunk of dw array in use. 28 // result = AddRoundKey(InvShiftRows(InvSubBytes(x)), y) 29 // 30 // Asm: VAESDECLAST, CPU Feature: AVX512AES 31 func (x Uint8x64) AESDecryptLastRound(y Uint32x16) Uint8x64 32 33 /* AESDecryptOneRound */ 34 35 // AESDecryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 36 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 37 // y is the chunk of dw array in use. 38 // result = AddRoundKey(InvMixColumns(InvShiftRows(InvSubBytes(x))), y) 39 // 40 // Asm: VAESDEC, CPU Feature: AVXAES 41 func (x Uint8x16) AESDecryptOneRound(y Uint32x4) Uint8x16 42 43 // AESDecryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 44 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 45 // y is the chunk of dw array in use. 46 // result = AddRoundKey(InvMixColumns(InvShiftRows(InvSubBytes(x))), y) 47 // 48 // Asm: VAESDEC, CPU Feature: AVX2AES 49 func (x Uint8x32) AESDecryptOneRound(y Uint32x8) Uint8x32 50 51 // AESDecryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 52 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 53 // y is the chunk of dw array in use. 54 // result = AddRoundKey(InvMixColumns(InvShiftRows(InvSubBytes(x))), y) 55 // 56 // Asm: VAESDEC, CPU Feature: AVX512AES 57 func (x Uint8x64) AESDecryptOneRound(y Uint32x16) Uint8x64 58 59 /* AESEncryptLastRound */ 60 61 // AESEncryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 62 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 63 // y is the chunk of w array in use. 64 // result = AddRoundKey((ShiftRows(SubBytes(x))), y) 65 // 66 // Asm: VAESENCLAST, CPU Feature: AVXAES 67 func (x Uint8x16) AESEncryptLastRound(y Uint32x4) Uint8x16 68 69 // AESEncryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 70 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 71 // y is the chunk of w array in use. 72 // result = AddRoundKey((ShiftRows(SubBytes(x))), y) 73 // 74 // Asm: VAESENCLAST, CPU Feature: AVX2AES 75 func (x Uint8x32) AESEncryptLastRound(y Uint32x8) Uint8x32 76 77 // AESEncryptLastRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 78 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 79 // y is the chunk of w array in use. 80 // result = AddRoundKey((ShiftRows(SubBytes(x))), y) 81 // 82 // Asm: VAESENCLAST, CPU Feature: AVX512AES 83 func (x Uint8x64) AESEncryptLastRound(y Uint32x16) Uint8x64 84 85 /* AESEncryptOneRound */ 86 87 // AESEncryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 88 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 89 // y is the chunk of w array in use. 90 // result = AddRoundKey(MixColumns(ShiftRows(SubBytes(x))), y) 91 // 92 // Asm: VAESENC, CPU Feature: AVXAES 93 func (x Uint8x16) AESEncryptOneRound(y Uint32x4) Uint8x16 94 95 // AESEncryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 96 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 97 // y is the chunk of w array in use. 98 // result = AddRoundKey(MixColumns(ShiftRows(SubBytes(x))), y) 99 // 100 // Asm: VAESENC, CPU Feature: AVX2AES 101 func (x Uint8x32) AESEncryptOneRound(y Uint32x8) Uint8x32 102 103 // AESEncryptOneRound performs a series of operations in AES cipher algorithm defined in FIPS 197. 104 // x is the state array, starting from low index to high are s00, s10, s20, s30, s01, ..., s33. 105 // y is the chunk of w array in use. 106 // result = AddRoundKey(MixColumns(ShiftRows(SubBytes(x))), y) 107 // 108 // Asm: VAESENC, CPU Feature: AVX512AES 109 func (x Uint8x64) AESEncryptOneRound(y Uint32x16) Uint8x64 110 111 /* AESInvMixColumns */ 112 113 // AESInvMixColumns performs the InvMixColumns operation in AES cipher algorithm defined in FIPS 197. 114 // x is the chunk of w array in use. 115 // result = InvMixColumns(x) 116 // 117 // Asm: VAESIMC, CPU Feature: AVXAES 118 func (x Uint32x4) AESInvMixColumns() Uint32x4 119 120 /* AESRoundKeyGenAssist */ 121 122 // AESRoundKeyGenAssist performs some components of KeyExpansion in AES cipher algorithm defined in FIPS 197. 123 // x is an array of AES words, but only x[0] and x[2] are used. 124 // r is a value from the Rcon constant array. 125 // result[0] = XOR(SubWord(RotWord(x[0])), r) 126 // result[1] = SubWord(x[1]) 127 // result[2] = XOR(SubWord(RotWord(x[2])), r) 128 // result[3] = SubWord(x[3]) 129 // 130 // Performance: A non-constant value of rconVal may result in significantly worse performance for this operation. 131 // 132 // Asm: VAESKEYGENASSIST, CPU Feature: AVXAES 133 func (x Uint32x4) AESRoundKeyGenAssist(rconVal uint8) Uint32x4 134 135 /* AddOddSubEven */ 136 137 // AddOddSubEven adds the odd-indexed elements of x and y and subtracts the 138 // even-indexed elements of y from those of x. 139 // 140 // z[2*i+1] = x[2*i+1] + y[2*i+1] // Add odd 141 // z[2*i] = x[2*i] - y[2*i] // Subtract even 142 // 143 // Asm: VADDSUBPS, CPU Feature: AVX 144 func (x Float32x4) AddOddSubEven(y Float32x4) (z Float32x4) 145 146 // AddOddSubEven adds the odd-indexed elements of x and y and subtracts the 147 // even-indexed elements of y from those of x. 148 // 149 // z[2*i+1] = x[2*i+1] + y[2*i+1] // Add odd 150 // z[2*i] = x[2*i] - y[2*i] // Subtract even 151 // 152 // Asm: VADDSUBPS, CPU Feature: AVX 153 func (x Float32x8) AddOddSubEven(y Float32x8) (z Float32x8) 154 155 // AddOddSubEven adds the odd-indexed elements of x and y and subtracts the 156 // even-indexed elements of y from those of x. 157 // 158 // z[2*i+1] = x[2*i+1] + y[2*i+1] // Add odd 159 // z[2*i] = x[2*i] - y[2*i] // Subtract even 160 // 161 // Asm: VADDSUBPD, CPU Feature: AVX 162 func (x Float64x2) AddOddSubEven(y Float64x2) (z Float64x2) 163 164 // AddOddSubEven adds the odd-indexed elements of x and y and subtracts the 165 // even-indexed elements of y from those of x. 166 // 167 // z[2*i+1] = x[2*i+1] + y[2*i+1] // Add odd 168 // z[2*i] = x[2*i] - y[2*i] // Subtract even 169 // 170 // Asm: VADDSUBPD, CPU Feature: AVX 171 func (x Float64x4) AddOddSubEven(y Float64x4) (z Float64x4) 172 173 /* CeilScaled */ 174 175 // CeilScaled rounds elements up with specified precision. 176 // 177 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 178 // 179 // Asm: VRNDSCALEPS, CPU Feature: AVX512 180 func (x Float32x4) CeilScaled(prec uint8) Float32x4 181 182 // CeilScaled rounds elements up with specified precision. 183 // 184 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 185 // 186 // Asm: VRNDSCALEPS, CPU Feature: AVX512 187 func (x Float32x8) CeilScaled(prec uint8) Float32x8 188 189 // CeilScaled rounds elements up with specified precision. 190 // 191 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 192 // 193 // Asm: VRNDSCALEPS, CPU Feature: AVX512 194 func (x Float32x16) CeilScaled(prec uint8) Float32x16 195 196 // CeilScaled rounds elements up with specified precision. 197 // 198 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 199 // 200 // Asm: VRNDSCALEPD, CPU Feature: AVX512 201 func (x Float64x2) CeilScaled(prec uint8) Float64x2 202 203 // CeilScaled rounds elements up with specified precision. 204 // 205 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 206 // 207 // Asm: VRNDSCALEPD, CPU Feature: AVX512 208 func (x Float64x4) CeilScaled(prec uint8) Float64x4 209 210 // CeilScaled rounds elements up with specified precision. 211 // 212 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 213 // 214 // Asm: VRNDSCALEPD, CPU Feature: AVX512 215 func (x Float64x8) CeilScaled(prec uint8) Float64x8 216 217 /* CeilScaledResidue */ 218 219 // CeilScaledResidue computes the difference after ceiling with specified precision. 220 // 221 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 222 // 223 // Asm: VREDUCEPS, CPU Feature: AVX512 224 func (x Float32x4) CeilScaledResidue(prec uint8) Float32x4 225 226 // CeilScaledResidue computes the difference after ceiling with specified precision. 227 // 228 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 229 // 230 // Asm: VREDUCEPS, CPU Feature: AVX512 231 func (x Float32x8) CeilScaledResidue(prec uint8) Float32x8 232 233 // CeilScaledResidue computes the difference after ceiling with specified precision. 234 // 235 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 236 // 237 // Asm: VREDUCEPS, CPU Feature: AVX512 238 func (x Float32x16) CeilScaledResidue(prec uint8) Float32x16 239 240 // CeilScaledResidue computes the difference after ceiling with specified precision. 241 // 242 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 243 // 244 // Asm: VREDUCEPD, CPU Feature: AVX512 245 func (x Float64x2) CeilScaledResidue(prec uint8) Float64x2 246 247 // CeilScaledResidue computes the difference after ceiling with specified precision. 248 // 249 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 250 // 251 // Asm: VREDUCEPD, CPU Feature: AVX512 252 func (x Float64x4) CeilScaledResidue(prec uint8) Float64x4 253 254 // CeilScaledResidue computes the difference after ceiling with specified precision. 255 // 256 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 257 // 258 // Asm: VREDUCEPD, CPU Feature: AVX512 259 func (x Float64x8) CeilScaledResidue(prec uint8) Float64x8 260 261 /* ConcatPermute128Scalars */ 262 263 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four 264 // 128-bit elements, and returns a 256-bit result formed by 265 // concatenating the two elements specified by lo and hi. 266 // For example, 267 // 268 // {40, 41, 42, 43, 50, 51, 52, 53}.ConcatPermute128Scalars(3, 0, {60, 61, 62, 63, 70, 71, 72, 73}) 269 // 270 // returns {70, 71, 72, 73, 40, 41, 42, 43}. 271 // 272 // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. 273 // 274 // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. 275 // 276 // Asm: VPERM2F128, CPU Feature: AVX 277 func (x Float32x8) ConcatPermute128Scalars(lo, hi uint8, y Float32x8) Float32x8 278 279 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four 280 // 128-bit elements, and returns a 256-bit result formed by 281 // concatenating the two elements specified by lo and hi. 282 // For example, 283 // 284 // {40, 41, 50, 51}.ConcatPermute128Scalars(3, 0, {60, 61, 70, 71}) 285 // 286 // returns {70, 71, 40, 41}. 287 // 288 // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. 289 // 290 // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. 291 // 292 // Asm: VPERM2F128, CPU Feature: AVX 293 func (x Float64x4) ConcatPermute128Scalars(lo, hi uint8, y Float64x4) Float64x4 294 295 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four 296 // 128-bit elements, and returns a 256-bit result formed by 297 // concatenating the two elements specified by lo and hi. 298 // For example, 299 // 300 // {0x40, 0x41, ..., 0x4f, 0x50, 0x51, ..., 0x5f}.ConcatPermute128Scalars(3, 0, 301 // {0x60, 0x61, ..., 0x6f, 0x70, 0x71, ..., 0x7f}) 302 // 303 // returns {0x70, 0x71, ..., 0x7f, 0x40, 0x41, ..., 0x4f}. 304 // 305 // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. 306 // 307 // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. 308 // 309 // Asm: VPERM2I128, CPU Feature: AVX2 310 func (x Int8x32) ConcatPermute128Scalars(lo, hi uint8, y Int8x32) Int8x32 311 312 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four 313 // 128-bit elements, and returns a 256-bit result formed by 314 // concatenating the two elements specified by lo and hi. 315 // For example, 316 // 317 // {40, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57}.ConcatPermute128Scalars(3, 0, 318 // {60, 61, 62, 63, 64, 65, 66, 67, 70, 71, 72, 73, 74, 75, 76, 77}) 319 // 320 // returns {70, 71, 72, 73, 74, 75, 76, 77, 40, 41, 42, 43, 44, 45, 46, 47}. 321 // 322 // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. 323 // 324 // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. 325 // 326 // Asm: VPERM2I128, CPU Feature: AVX2 327 func (x Int16x16) ConcatPermute128Scalars(lo, hi uint8, y Int16x16) Int16x16 328 329 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four 330 // 128-bit elements, and returns a 256-bit result formed by 331 // concatenating the two elements specified by lo and hi. 332 // For example, 333 // 334 // {40, 41, 42, 43, 50, 51, 52, 53}.ConcatPermute128Scalars(3, 0, {60, 61, 62, 63, 70, 71, 72, 73}) 335 // 336 // returns {70, 71, 72, 73, 40, 41, 42, 43}. 337 // 338 // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. 339 // 340 // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. 341 // 342 // Asm: VPERM2I128, CPU Feature: AVX2 343 func (x Int32x8) ConcatPermute128Scalars(lo, hi uint8, y Int32x8) Int32x8 344 345 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four 346 // 128-bit elements, and returns a 256-bit result formed by 347 // concatenating the two elements specified by lo and hi. 348 // For example, 349 // 350 // {40, 41, 50, 51}.ConcatPermute128Scalars(3, 0, {60, 61, 70, 71}) 351 // 352 // returns {70, 71, 40, 41}. 353 // 354 // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. 355 // 356 // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. 357 // 358 // Asm: VPERM2I128, CPU Feature: AVX2 359 func (x Int64x4) ConcatPermute128Scalars(lo, hi uint8, y Int64x4) Int64x4 360 361 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four 362 // 128-bit elements, and returns a 256-bit result formed by 363 // concatenating the two elements specified by lo and hi. 364 // For example, 365 // 366 // {0x40, 0x41, ..., 0x4f, 0x50, 0x51, ..., 0x5f}.ConcatPermute128Scalars(3, 0, 367 // {0x60, 0x61, ..., 0x6f, 0x70, 0x71, ..., 0x7f}) 368 // 369 // returns {0x70, 0x71, ..., 0x7f, 0x40, 0x41, ..., 0x4f}. 370 // 371 // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. 372 // 373 // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. 374 // 375 // Asm: VPERM2I128, CPU Feature: AVX2 376 func (x Uint8x32) ConcatPermute128Scalars(lo, hi uint8, y Uint8x32) Uint8x32 377 378 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four 379 // 128-bit elements, and returns a 256-bit result formed by 380 // concatenating the two elements specified by lo and hi. 381 // For example, 382 // 383 // {40, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57}.ConcatPermute128Scalars(3, 0, 384 // {60, 61, 62, 63, 64, 65, 66, 67, 70, 71, 72, 73, 74, 75, 76, 77}) 385 // 386 // returns {70, 71, 72, 73, 74, 75, 76, 77, 40, 41, 42, 43, 44, 45, 46, 47}. 387 // 388 // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. 389 // 390 // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. 391 // 392 // Asm: VPERM2I128, CPU Feature: AVX2 393 func (x Uint16x16) ConcatPermute128Scalars(lo, hi uint8, y Uint16x16) Uint16x16 394 395 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four 396 // 128-bit elements, and returns a 256-bit result formed by 397 // concatenating the two elements specified by lo and hi. 398 // For example, 399 // 400 // {40, 41, 42, 43, 50, 51, 52, 53}.ConcatPermute128Scalars(3, 0, {60, 61, 62, 63, 70, 71, 72, 73}) 401 // 402 // returns {70, 71, 72, 73, 40, 41, 42, 43}. 403 // 404 // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. 405 // 406 // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. 407 // 408 // Asm: VPERM2I128, CPU Feature: AVX2 409 func (x Uint32x8) ConcatPermute128Scalars(lo, hi uint8, y Uint32x8) Uint32x8 410 411 // ConcatPermute128Scalars treats the 256-bit vectors x and y as a single vector of four 412 // 128-bit elements, and returns a 256-bit result formed by 413 // concatenating the two elements specified by lo and hi. 414 // For example, 415 // 416 // {40, 41, 50, 51}.ConcatPermute128Scalars(3, 0, {60, 61, 70, 71}) 417 // 418 // returns {70, 71, 40, 41}. 419 // 420 // lo, hi should be between 0 and 3, inclusive; other values may result in a runtime panic. 421 // 422 // Performance: A non-constant value of lo, hi may result in significantly worse performance for this operation. 423 // 424 // Asm: VPERM2I128, CPU Feature: AVX2 425 func (x Uint64x4) ConcatPermute128Scalars(lo, hi uint8, y Uint64x4) Uint64x4 426 427 /* FloorScaled */ 428 429 // FloorScaled rounds elements down with specified precision. 430 // 431 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 432 // 433 // Asm: VRNDSCALEPS, CPU Feature: AVX512 434 func (x Float32x4) FloorScaled(prec uint8) Float32x4 435 436 // FloorScaled rounds elements down with specified precision. 437 // 438 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 439 // 440 // Asm: VRNDSCALEPS, CPU Feature: AVX512 441 func (x Float32x8) FloorScaled(prec uint8) Float32x8 442 443 // FloorScaled rounds elements down with specified precision. 444 // 445 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 446 // 447 // Asm: VRNDSCALEPS, CPU Feature: AVX512 448 func (x Float32x16) FloorScaled(prec uint8) Float32x16 449 450 // FloorScaled rounds elements down with specified precision. 451 // 452 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 453 // 454 // Asm: VRNDSCALEPD, CPU Feature: AVX512 455 func (x Float64x2) FloorScaled(prec uint8) Float64x2 456 457 // FloorScaled rounds elements down with specified precision. 458 // 459 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 460 // 461 // Asm: VRNDSCALEPD, CPU Feature: AVX512 462 func (x Float64x4) FloorScaled(prec uint8) Float64x4 463 464 // FloorScaled rounds elements down with specified precision. 465 // 466 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 467 // 468 // Asm: VRNDSCALEPD, CPU Feature: AVX512 469 func (x Float64x8) FloorScaled(prec uint8) Float64x8 470 471 /* FloorScaledResidue */ 472 473 // FloorScaledResidue computes the difference after flooring with specified precision. 474 // 475 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 476 // 477 // Asm: VREDUCEPS, CPU Feature: AVX512 478 func (x Float32x4) FloorScaledResidue(prec uint8) Float32x4 479 480 // FloorScaledResidue computes the difference after flooring with specified precision. 481 // 482 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 483 // 484 // Asm: VREDUCEPS, CPU Feature: AVX512 485 func (x Float32x8) FloorScaledResidue(prec uint8) Float32x8 486 487 // FloorScaledResidue computes the difference after flooring with specified precision. 488 // 489 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 490 // 491 // Asm: VREDUCEPS, CPU Feature: AVX512 492 func (x Float32x16) FloorScaledResidue(prec uint8) Float32x16 493 494 // FloorScaledResidue computes the difference after flooring with specified precision. 495 // 496 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 497 // 498 // Asm: VREDUCEPD, CPU Feature: AVX512 499 func (x Float64x2) FloorScaledResidue(prec uint8) Float64x2 500 501 // FloorScaledResidue computes the difference after flooring with specified precision. 502 // 503 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 504 // 505 // Asm: VREDUCEPD, CPU Feature: AVX512 506 func (x Float64x4) FloorScaledResidue(prec uint8) Float64x4 507 508 // FloorScaledResidue computes the difference after flooring with specified precision. 509 // 510 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 511 // 512 // Asm: VREDUCEPD, CPU Feature: AVX512 513 func (x Float64x8) FloorScaledResidue(prec uint8) Float64x8 514 515 /* GaloisFieldAffineTransform */ 516 517 // GaloisFieldAffineTransform returns the affine transformation A * x + b in GF(2)^8. 518 // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. 519 // Each element of x is interpreted as a vector of 8 bits. 520 // The b argument is likewise a vector of 8 bits. 521 // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. 522 // The * and + operators in GF(2) are defined as AND and XOR. 523 // The result is z[i] = A[i/8] * x[i] + b, where * and + are performed in GF(2). 524 // 525 // Performance: A non-constant value of b may result in significantly worse performance for this operation. 526 // 527 // Asm: VGF2P8AFFINEQB, CPU Feature: AVX512GFNI 528 func (x Uint8x16) GaloisFieldAffineTransform(A Uint64x2, b uint8) Uint8x16 529 530 // GaloisFieldAffineTransform returns the affine transformation A * x + b in GF(2)^8. 531 // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. 532 // Each element of x is interpreted as a vector of 8 bits. 533 // The b argument is likewise a vector of 8 bits. 534 // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. 535 // The * and + operators in GF(2) are defined as AND and XOR. 536 // The result is z[i] = A[i/8] * x[i] + b, where * and + are performed in GF(2). 537 // 538 // Performance: A non-constant value of b may result in significantly worse performance for this operation. 539 // 540 // Asm: VGF2P8AFFINEQB, CPU Feature: AVX512GFNI 541 func (x Uint8x32) GaloisFieldAffineTransform(A Uint64x4, b uint8) Uint8x32 542 543 // GaloisFieldAffineTransform returns the affine transformation A * x + b in GF(2)^8. 544 // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. 545 // Each element of x is interpreted as a vector of 8 bits. 546 // The b argument is likewise a vector of 8 bits. 547 // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. 548 // The * and + operators in GF(2) are defined as AND and XOR. 549 // The result is z[i] = A[i/8] * x[i] + b, where * and + are performed in GF(2). 550 // 551 // Performance: A non-constant value of b may result in significantly worse performance for this operation. 552 // 553 // Asm: VGF2P8AFFINEQB, CPU Feature: AVX512GFNI 554 func (x Uint8x64) GaloisFieldAffineTransform(A Uint64x8, b uint8) Uint8x64 555 556 /* GaloisFieldAffineTransformInverse */ 557 558 // GaloisFieldAffineTransformInverse returns the affine transformation A * inv(x) + b, 559 // where inv(x) is the multiplicative inverse of x in GF(2^8) modulo 560 // P = x^8 + x^4 + x^3 + x + 1, and the affine 561 // transformation is performed in GF(2)^8. 562 // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. 563 // Each element of inv(x) is interpreted as a vector of 8 bits. 564 // The b argument is likewise a vector of 8 bits. 565 // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. 566 // The * and + operators in GF(2) are defined as AND and XOR. 567 // The result is z[i] = A[i/8] * inv(x[i]) + b, where * and + are performed in GF(2). 568 // 569 // Performance: A non-constant value of b may result in significantly worse performance for this operation. 570 // 571 // Asm: VGF2P8AFFINEINVQB, CPU Feature: AVX512GFNI 572 func (x Uint8x16) GaloisFieldAffineTransformInverse(A Uint64x2, b uint8) Uint8x16 573 574 // GaloisFieldAffineTransformInverse returns the affine transformation A * inv(x) + b, 575 // where inv(x) is the multiplicative inverse of x in GF(2^8) modulo 576 // P = x^8 + x^4 + x^3 + x + 1, and the affine 577 // transformation is performed in GF(2)^8. 578 // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. 579 // Each element of inv(x) is interpreted as a vector of 8 bits. 580 // The b argument is likewise a vector of 8 bits. 581 // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. 582 // The * and + operators in GF(2) are defined as AND and XOR. 583 // The result is z[i] = A[i/8] * inv(x[i]) + b, where * and + are performed in GF(2). 584 // 585 // Performance: A non-constant value of b may result in significantly worse performance for this operation. 586 // 587 // Asm: VGF2P8AFFINEINVQB, CPU Feature: AVX512GFNI 588 func (x Uint8x32) GaloisFieldAffineTransformInverse(A Uint64x4, b uint8) Uint8x32 589 590 // GaloisFieldAffineTransformInverse returns the affine transformation A * inv(x) + b, 591 // where inv(x) is the multiplicative inverse of x in GF(2^8) modulo 592 // P = x^8 + x^4 + x^3 + x + 1, and the affine 593 // transformation is performed in GF(2)^8. 594 // Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. 595 // Each element of inv(x) is interpreted as a vector of 8 bits. 596 // The b argument is likewise a vector of 8 bits. 597 // Each 8-bit vector here can be seen as 8 GF(2) elements packed together. 598 // The * and + operators in GF(2) are defined as AND and XOR. 599 // The result is z[i] = A[i/8] * inv(x[i]) + b, where * and + are performed in GF(2). 600 // 601 // Performance: A non-constant value of b may result in significantly worse performance for this operation. 602 // 603 // Asm: VGF2P8AFFINEINVQB, CPU Feature: AVX512GFNI 604 func (x Uint8x64) GaloisFieldAffineTransformInverse(A Uint64x8, b uint8) Uint8x64 605 606 /* GaloisFieldMul */ 607 608 // GaloisFieldMul returns (x * y) mod P, performed in GF(2^8), 609 // where the characteristic polynomial P is x^8 + x^4 + x^3 + x + 1. 610 // 611 // Asm: VGF2P8MULB, CPU Feature: AVX512GFNI 612 func (x Uint8x16) GaloisFieldMul(y Uint8x16) Uint8x16 613 614 // GaloisFieldMul returns (x * y) mod P, performed in GF(2^8), 615 // where the characteristic polynomial P is x^8 + x^4 + x^3 + x + 1. 616 // 617 // Asm: VGF2P8MULB, CPU Feature: AVX512GFNI 618 func (x Uint8x32) GaloisFieldMul(y Uint8x32) Uint8x32 619 620 // GaloisFieldMul returns (x * y) mod P, performed in GF(2^8), 621 // where the characteristic polynomial P is x^8 + x^4 + x^3 + x + 1. 622 // 623 // Asm: VGF2P8MULB, CPU Feature: AVX512GFNI 624 func (x Uint8x64) GaloisFieldMul(y Uint8x64) Uint8x64 625 626 /* MulAddEvenSubOdd */ 627 628 // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and 629 // x * y - z for the odd-indexed elements. 630 // 631 // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even 632 // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd 633 // 634 // This performs a fused multiply-add, computing each result with a single 635 // rounding rather than two and no intermediate overflow. 636 // 637 // Asm: VFMSUBADD213PS, CPU Feature: FMA 638 func (x Float32x4) MulAddEvenSubOdd(y Float32x4, z Float32x4) (w Float32x4) 639 640 // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and 641 // x * y - z for the odd-indexed elements. 642 // 643 // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even 644 // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd 645 // 646 // This performs a fused multiply-add, computing each result with a single 647 // rounding rather than two and no intermediate overflow. 648 // 649 // Asm: VFMSUBADD213PS, CPU Feature: FMA 650 func (x Float32x8) MulAddEvenSubOdd(y Float32x8, z Float32x8) (w Float32x8) 651 652 // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and 653 // x * y - z for the odd-indexed elements. 654 // 655 // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even 656 // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd 657 // 658 // This performs a fused multiply-add, computing each result with a single 659 // rounding rather than two and no intermediate overflow. 660 // 661 // Asm: VFMSUBADD213PS, CPU Feature: AVX512 662 func (x Float32x16) MulAddEvenSubOdd(y Float32x16, z Float32x16) (w Float32x16) 663 664 // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and 665 // x * y - z for the odd-indexed elements. 666 // 667 // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even 668 // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd 669 // 670 // This performs a fused multiply-add, computing each result with a single 671 // rounding rather than two and no intermediate overflow. 672 // 673 // Asm: VFMSUBADD213PD, CPU Feature: FMA 674 func (x Float64x2) MulAddEvenSubOdd(y Float64x2, z Float64x2) (w Float64x2) 675 676 // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and 677 // x * y - z for the odd-indexed elements. 678 // 679 // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even 680 // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd 681 // 682 // This performs a fused multiply-add, computing each result with a single 683 // rounding rather than two and no intermediate overflow. 684 // 685 // Asm: VFMSUBADD213PD, CPU Feature: FMA 686 func (x Float64x4) MulAddEvenSubOdd(y Float64x4, z Float64x4) (w Float64x4) 687 688 // MulAddEvenSubOdd returns x * y + z for the even-indexed elements and 689 // x * y - z for the odd-indexed elements. 690 // 691 // w[2*i] = x[2*i] * y[2*i] + z[2*i] // Add even 692 // w[2*i+1] = x[2*i+1] * y[2*i+1] - z[2*i+1] // Subtract odd 693 // 694 // This performs a fused multiply-add, computing each result with a single 695 // rounding rather than two and no intermediate overflow. 696 // 697 // Asm: VFMSUBADD213PD, CPU Feature: AVX512 698 func (x Float64x8) MulAddEvenSubOdd(y Float64x8, z Float64x8) (w Float64x8) 699 700 /* MulAddOddSubEven */ 701 702 // MulAddOddSubEven returns x * y + z for the odd-indexed elements and 703 // x * y - z for the even-indexed elements. 704 // 705 // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd 706 // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even 707 // 708 // This performs a fused multiply-add, computing each result with a single 709 // rounding rather than two and no intermediate overflow. 710 // 711 // Asm: VFMADDSUB213PS, CPU Feature: FMA 712 func (x Float32x4) MulAddOddSubEven(y Float32x4, z Float32x4) (w Float32x4) 713 714 // MulAddOddSubEven returns x * y + z for the odd-indexed elements and 715 // x * y - z for the even-indexed elements. 716 // 717 // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd 718 // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even 719 // 720 // This performs a fused multiply-add, computing each result with a single 721 // rounding rather than two and no intermediate overflow. 722 // 723 // Asm: VFMADDSUB213PS, CPU Feature: FMA 724 func (x Float32x8) MulAddOddSubEven(y Float32x8, z Float32x8) (w Float32x8) 725 726 // MulAddOddSubEven returns x * y + z for the odd-indexed elements and 727 // x * y - z for the even-indexed elements. 728 // 729 // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd 730 // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even 731 // 732 // This performs a fused multiply-add, computing each result with a single 733 // rounding rather than two and no intermediate overflow. 734 // 735 // Asm: VFMADDSUB213PS, CPU Feature: AVX512 736 func (x Float32x16) MulAddOddSubEven(y Float32x16, z Float32x16) (w Float32x16) 737 738 // MulAddOddSubEven returns x * y + z for the odd-indexed elements and 739 // x * y - z for the even-indexed elements. 740 // 741 // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd 742 // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even 743 // 744 // This performs a fused multiply-add, computing each result with a single 745 // rounding rather than two and no intermediate overflow. 746 // 747 // Asm: VFMADDSUB213PD, CPU Feature: FMA 748 func (x Float64x2) MulAddOddSubEven(y Float64x2, z Float64x2) (w Float64x2) 749 750 // MulAddOddSubEven returns x * y + z for the odd-indexed elements and 751 // x * y - z for the even-indexed elements. 752 // 753 // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd 754 // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even 755 // 756 // This performs a fused multiply-add, computing each result with a single 757 // rounding rather than two and no intermediate overflow. 758 // 759 // Asm: VFMADDSUB213PD, CPU Feature: FMA 760 func (x Float64x4) MulAddOddSubEven(y Float64x4, z Float64x4) (w Float64x4) 761 762 // MulAddOddSubEven returns x * y + z for the odd-indexed elements and 763 // x * y - z for the even-indexed elements. 764 // 765 // w[2*i+1] = x[2*i+1] * y[2*i+1] + z[2*i+1] // Add odd 766 // w[2*i] = x[2*i] * y[2*i] - z[2*i] // Subtract even 767 // 768 // This performs a fused multiply-add, computing each result with a single 769 // rounding rather than two and no intermediate overflow. 770 // 771 // Asm: VFMADDSUB213PD, CPU Feature: AVX512 772 func (x Float64x8) MulAddOddSubEven(y Float64x8, z Float64x8) (w Float64x8) 773 774 /* MulHigh */ 775 776 // MulHigh multiplies corresponding elements of x and y and returns the high 777 // half of each double-width product. 778 // 779 // z[i] = (x[i] * y[i]) >> 16 780 // 781 // The product is computed exactly, so no bits are lost before the shift. 782 // 783 // Asm: VPMULHW, CPU Feature: AVX 784 func (x Int16x8) MulHigh(y Int16x8) (z Int16x8) 785 786 // MulHigh multiplies corresponding elements of x and y and returns the high 787 // half of each double-width product. 788 // 789 // z[i] = (x[i] * y[i]) >> 16 790 // 791 // The product is computed exactly, so no bits are lost before the shift. 792 // 793 // Asm: VPMULHW, CPU Feature: AVX2 794 func (x Int16x16) MulHigh(y Int16x16) (z Int16x16) 795 796 // MulHigh multiplies corresponding elements of x and y and returns the high 797 // half of each double-width product. 798 // 799 // z[i] = (x[i] * y[i]) >> 16 800 // 801 // The product is computed exactly, so no bits are lost before the shift. 802 // 803 // Asm: VPMULHW, CPU Feature: AVX512 804 func (x Int16x32) MulHigh(y Int16x32) (z Int16x32) 805 806 // MulHigh multiplies corresponding elements of x and y and returns the high 807 // half of each double-width product. 808 // 809 // z[i] = (x[i] * y[i]) >> 16 810 // 811 // The product is computed exactly, so no bits are lost before the shift. 812 // 813 // Asm: VPMULHUW, CPU Feature: AVX 814 func (x Uint16x8) MulHigh(y Uint16x8) (z Uint16x8) 815 816 // MulHigh multiplies corresponding elements of x and y and returns the high 817 // half of each double-width product. 818 // 819 // z[i] = (x[i] * y[i]) >> 16 820 // 821 // The product is computed exactly, so no bits are lost before the shift. 822 // 823 // Asm: VPMULHUW, CPU Feature: AVX2 824 func (x Uint16x16) MulHigh(y Uint16x16) (z Uint16x16) 825 826 // MulHigh multiplies corresponding elements of x and y and returns the high 827 // half of each double-width product. 828 // 829 // z[i] = (x[i] * y[i]) >> 16 830 // 831 // The product is computed exactly, so no bits are lost before the shift. 832 // 833 // Asm: VPMULHUW, CPU Feature: AVX512 834 func (x Uint16x32) MulHigh(y Uint16x32) (z Uint16x32) 835 836 /* MulSign */ 837 838 // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. 839 // 840 // z[i] = x[i] * sign(y[i]) 841 // 842 // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] 843 // where y[i] is positive. The negation wraps, so the most negative value stays 844 // as it is. 845 // 846 // Asm: VPSIGNB, CPU Feature: AVX 847 func (x Int8x16) MulSign(y Int8x16) (z Int8x16) 848 849 // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. 850 // 851 // z[i] = x[i] * sign(y[i]) 852 // 853 // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] 854 // where y[i] is positive. The negation wraps, so the most negative value stays 855 // as it is. 856 // 857 // Asm: VPSIGNB, CPU Feature: AVX2 858 func (x Int8x32) MulSign(y Int8x32) (z Int8x32) 859 860 // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. 861 // 862 // z[i] = x[i] * sign(y[i]) 863 // 864 // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] 865 // where y[i] is positive. The negation wraps, so the most negative value stays 866 // as it is. 867 // 868 // Asm: VPSIGNW, CPU Feature: AVX 869 func (x Int16x8) MulSign(y Int16x8) (z Int16x8) 870 871 // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. 872 // 873 // z[i] = x[i] * sign(y[i]) 874 // 875 // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] 876 // where y[i] is positive. The negation wraps, so the most negative value stays 877 // as it is. 878 // 879 // Asm: VPSIGNW, CPU Feature: AVX2 880 func (x Int16x16) MulSign(y Int16x16) (z Int16x16) 881 882 // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. 883 // 884 // z[i] = x[i] * sign(y[i]) 885 // 886 // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] 887 // where y[i] is positive. The negation wraps, so the most negative value stays 888 // as it is. 889 // 890 // Asm: VPSIGND, CPU Feature: AVX 891 func (x Int32x4) MulSign(y Int32x4) (z Int32x4) 892 893 // MulSign returns x multiplied by the sign of y (-1, 0 or 1), elementwise. 894 // 895 // z[i] = x[i] * sign(y[i]) 896 // 897 // That is, z[i] is -x[i] where y[i] is negative, 0 where y[i] is 0, and x[i] 898 // where y[i] is positive. The negation wraps, so the most negative value stays 899 // as it is. 900 // 901 // Asm: VPSIGND, CPU Feature: AVX2 902 func (x Int32x8) MulSign(y Int32x8) (z Int32x8) 903 904 /* MulWidenEven */ 905 906 // MulWidenEven multiplies corresponding even-indexed elements of x and y, 907 // returning a vector of half as many elements, each with twice the input 908 // element size. 909 // 910 // z[i] = int64(x[2*i]) * int64(y[2*i]) 911 // 912 // The doubled element width is sufficient to hold every product without 913 // overflow. 914 // 915 // Asm: VPMULDQ, CPU Feature: AVX 916 func (x Int32x4) MulWidenEven(y Int32x4) (z Int64x2) 917 918 // MulWidenEven multiplies corresponding even-indexed elements of x and y, 919 // returning a vector of half as many elements, each with twice the input 920 // element size. 921 // 922 // z[i] = int64(x[2*i]) * int64(y[2*i]) 923 // 924 // The doubled element width is sufficient to hold every product without 925 // overflow. 926 // 927 // Asm: VPMULDQ, CPU Feature: AVX2 928 func (x Int32x8) MulWidenEven(y Int32x8) (z Int64x4) 929 930 // MulWidenEven multiplies corresponding even-indexed elements of x and y, 931 // returning a vector of half as many elements, each with twice the input 932 // element size. 933 // 934 // z[i] = uint64(x[2*i]) * uint64(y[2*i]) 935 // 936 // The doubled element width is sufficient to hold every product without 937 // overflow. 938 // 939 // Asm: VPMULUDQ, CPU Feature: AVX 940 func (x Uint32x4) MulWidenEven(y Uint32x4) (z Uint64x2) 941 942 // MulWidenEven multiplies corresponding even-indexed elements of x and y, 943 // returning a vector of half as many elements, each with twice the input 944 // element size. 945 // 946 // z[i] = uint64(x[2*i]) * uint64(y[2*i]) 947 // 948 // The doubled element width is sufficient to hold every product without 949 // overflow. 950 // 951 // Asm: VPMULUDQ, CPU Feature: AVX2 952 func (x Uint32x8) MulWidenEven(y Uint32x8) (z Uint64x4) 953 954 /* Reciprocal */ 955 956 // Reciprocal computes an approximate reciprocal of each element. 957 // 958 // Asm: VRCPPS, CPU Feature: AVX 959 func (x Float32x4) Reciprocal() Float32x4 960 961 // Reciprocal computes an approximate reciprocal of each element. 962 // 963 // Asm: VRCPPS, CPU Feature: AVX 964 func (x Float32x8) Reciprocal() Float32x8 965 966 // Reciprocal computes an approximate reciprocal of each element. 967 // 968 // Asm: VRCP14PS, CPU Feature: AVX512 969 func (x Float32x16) Reciprocal() Float32x16 970 971 // Reciprocal computes an approximate reciprocal of each element. 972 // 973 // Asm: VRCP14PD, CPU Feature: AVX512 974 func (x Float64x2) Reciprocal() Float64x2 975 976 // Reciprocal computes an approximate reciprocal of each element. 977 // 978 // Asm: VRCP14PD, CPU Feature: AVX512 979 func (x Float64x4) Reciprocal() Float64x4 980 981 // Reciprocal computes an approximate reciprocal of each element. 982 // 983 // Asm: VRCP14PD, CPU Feature: AVX512 984 func (x Float64x8) Reciprocal() Float64x8 985 986 /* ReciprocalSqrt */ 987 988 // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. 989 // 990 // Asm: VRSQRTPS, CPU Feature: AVX 991 func (x Float32x4) ReciprocalSqrt() Float32x4 992 993 // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. 994 // 995 // Asm: VRSQRTPS, CPU Feature: AVX 996 func (x Float32x8) ReciprocalSqrt() Float32x8 997 998 // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. 999 // 1000 // Asm: VRSQRT14PS, CPU Feature: AVX512 1001 func (x Float32x16) ReciprocalSqrt() Float32x16 1002 1003 // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. 1004 // 1005 // Asm: VRSQRT14PD, CPU Feature: AVX512 1006 func (x Float64x2) ReciprocalSqrt() Float64x2 1007 1008 // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. 1009 // 1010 // Asm: VRSQRT14PD, CPU Feature: AVX512 1011 func (x Float64x4) ReciprocalSqrt() Float64x4 1012 1013 // ReciprocalSqrt computes an approximate reciprocal of the square root of each element. 1014 // 1015 // Asm: VRSQRT14PD, CPU Feature: AVX512 1016 func (x Float64x8) ReciprocalSqrt() Float64x8 1017 1018 /* RoundScaled */ 1019 1020 // RoundScaled rounds elements with specified precision. 1021 // 1022 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1023 // 1024 // Asm: VRNDSCALEPS, CPU Feature: AVX512 1025 func (x Float32x4) RoundScaled(prec uint8) Float32x4 1026 1027 // RoundScaled rounds elements with specified precision. 1028 // 1029 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1030 // 1031 // Asm: VRNDSCALEPS, CPU Feature: AVX512 1032 func (x Float32x8) RoundScaled(prec uint8) Float32x8 1033 1034 // RoundScaled rounds elements with specified precision. 1035 // 1036 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1037 // 1038 // Asm: VRNDSCALEPS, CPU Feature: AVX512 1039 func (x Float32x16) RoundScaled(prec uint8) Float32x16 1040 1041 // RoundScaled rounds elements with specified precision. 1042 // 1043 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1044 // 1045 // Asm: VRNDSCALEPD, CPU Feature: AVX512 1046 func (x Float64x2) RoundScaled(prec uint8) Float64x2 1047 1048 // RoundScaled rounds elements with specified precision. 1049 // 1050 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1051 // 1052 // Asm: VRNDSCALEPD, CPU Feature: AVX512 1053 func (x Float64x4) RoundScaled(prec uint8) Float64x4 1054 1055 // RoundScaled rounds elements with specified precision. 1056 // 1057 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1058 // 1059 // Asm: VRNDSCALEPD, CPU Feature: AVX512 1060 func (x Float64x8) RoundScaled(prec uint8) Float64x8 1061 1062 /* RoundScaledResidue */ 1063 1064 // RoundScaledResidue computes the difference after rounding with specified precision. 1065 // 1066 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1067 // 1068 // Asm: VREDUCEPS, CPU Feature: AVX512 1069 func (x Float32x4) RoundScaledResidue(prec uint8) Float32x4 1070 1071 // RoundScaledResidue computes the difference after rounding with specified precision. 1072 // 1073 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1074 // 1075 // Asm: VREDUCEPS, CPU Feature: AVX512 1076 func (x Float32x8) RoundScaledResidue(prec uint8) Float32x8 1077 1078 // RoundScaledResidue computes the difference after rounding with specified precision. 1079 // 1080 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1081 // 1082 // Asm: VREDUCEPS, CPU Feature: AVX512 1083 func (x Float32x16) RoundScaledResidue(prec uint8) Float32x16 1084 1085 // RoundScaledResidue computes the difference after rounding with specified precision. 1086 // 1087 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1088 // 1089 // Asm: VREDUCEPD, CPU Feature: AVX512 1090 func (x Float64x2) RoundScaledResidue(prec uint8) Float64x2 1091 1092 // RoundScaledResidue computes the difference after rounding with specified precision. 1093 // 1094 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1095 // 1096 // Asm: VREDUCEPD, CPU Feature: AVX512 1097 func (x Float64x4) RoundScaledResidue(prec uint8) Float64x4 1098 1099 // RoundScaledResidue computes the difference after rounding with specified precision. 1100 // 1101 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1102 // 1103 // Asm: VREDUCEPD, CPU Feature: AVX512 1104 func (x Float64x8) RoundScaledResidue(prec uint8) Float64x8 1105 1106 /* SHA1FourRounds */ 1107 1108 // SHA1FourRounds performs 4 rounds of B loop in SHA1 algorithm defined in FIPS 180-4. 1109 // x contains the state variables a, b, c and d from upper to lower order. 1110 // y contains the W array elements (with the state variable e added to the upper element) from upper to lower order. 1111 // result = the state variables a', b', c', d' updated after 4 rounds. 1112 // 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. 1113 // 1114 // Performance: A non-constant value of constant may result in significantly worse performance for this operation. 1115 // 1116 // Asm: SHA1RNDS4, CPU Feature: SHA 1117 func (x Uint32x4) SHA1FourRounds(constant uint8, y Uint32x4) Uint32x4 1118 1119 /* SHA1Message1 */ 1120 1121 // SHA1Message1 does the XORing of 1 in SHA1 algorithm defined in FIPS 180-4. 1122 // x = {W3, W2, W1, W0} 1123 // y = {0, 0, W5, W4} 1124 // result = {W3^W5, W2^W4, W1^W3, W0^W2}. 1125 // 1126 // Asm: SHA1MSG1, CPU Feature: SHA 1127 func (x Uint32x4) SHA1Message1(y Uint32x4) Uint32x4 1128 1129 /* SHA1Message2 */ 1130 1131 // SHA1Message2 does the calculation of 3 and 4 in SHA1 algorithm defined in FIPS 180-4. 1132 // x = result of 2. 1133 // y = {W15, W14, W13} 1134 // result = {W19, W18, W17, W16} 1135 // 1136 // Asm: SHA1MSG2, CPU Feature: SHA 1137 func (x Uint32x4) SHA1Message2(y Uint32x4) Uint32x4 1138 1139 /* SHA1NextE */ 1140 1141 // SHA1NextE calculates the state variable e' updated after 4 rounds in SHA1 algorithm defined in FIPS 180-4. 1142 // x contains the state variable a (before the 4 rounds), placed in the upper element. 1143 // y is the elements of W array for next 4 rounds from upper to lower order. 1144 // result = the elements of the W array for the next 4 rounds, with the updated state variable e' added to the upper element, 1145 // from upper to lower order. 1146 // 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 1147 // 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 1148 // computation of the value of e'.) 1149 // 1150 // Asm: SHA1NEXTE, CPU Feature: SHA 1151 func (x Uint32x4) SHA1NextE(y Uint32x4) Uint32x4 1152 1153 /* SHA256Message1 */ 1154 1155 // SHA256Message1 does the sigma and addition of 1 in SHA256 algorithm defined in FIPS 180-4. 1156 // x = {W0, W1, W2, W3} 1157 // y = {W4, 0, 0, 0} 1158 // result = {W0+σ(W1), W1+σ(W2), W2+σ(W3), W3+σ(W4)} 1159 // 1160 // Asm: SHA256MSG1, CPU Feature: SHA 1161 func (x Uint32x4) SHA256Message1(y Uint32x4) Uint32x4 1162 1163 /* SHA256Message2 */ 1164 1165 // SHA256Message2 does the sigma and addition of 3 in SHA256 algorithm defined in FIPS 180-4. 1166 // x = result of 2 1167 // y = {0, 0, W14, W15} 1168 // result = {W16, W17, W18, W19} 1169 // 1170 // Asm: SHA256MSG2, CPU Feature: SHA 1171 func (x Uint32x4) SHA256Message2(y Uint32x4) Uint32x4 1172 1173 /* SHA256TwoRounds */ 1174 1175 // SHA256TwoRounds does 2 rounds of B loop to calculate updated state variables in SHA256 algorithm defined in FIPS 180-4. 1176 // x = {h, g, d, c} 1177 // y = {f, e, b, a} 1178 // z = {W0+K0, W1+K1} 1179 // result = {f', e', b', a'} 1180 // 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 1181 // the corresponding element of the W array to make the input data z. 1182 // The updated state variables c', d', g', h' are not returned by this instruction, because they are equal to the input data 1183 // y (the state variables a, b, e, f before the 2 rounds). 1184 // 1185 // Asm: SHA256RNDS2, CPU Feature: SHA 1186 func (x Uint32x4) SHA256TwoRounds(y Uint32x4, z Uint32x4) Uint32x4 1187 1188 /* Scale */ 1189 1190 // Scale multiplies each element of x by 2 raised to the power of the 1191 // floor of the corresponding element in y. 1192 // 1193 // Asm: VSCALEFPS, CPU Feature: AVX512 1194 func (x Float32x4) Scale(y Float32x4) Float32x4 1195 1196 // Scale multiplies each element of x by 2 raised to the power of the 1197 // floor of the corresponding element in y. 1198 // 1199 // Asm: VSCALEFPS, CPU Feature: AVX512 1200 func (x Float32x8) Scale(y Float32x8) Float32x8 1201 1202 // Scale multiplies each element of x by 2 raised to the power of the 1203 // floor of the corresponding element in y. 1204 // 1205 // Asm: VSCALEFPS, CPU Feature: AVX512 1206 func (x Float32x16) Scale(y Float32x16) Float32x16 1207 1208 // Scale multiplies each element of x by 2 raised to the power of the 1209 // floor of the corresponding element in y. 1210 // 1211 // Asm: VSCALEFPD, CPU Feature: AVX512 1212 func (x Float64x2) Scale(y Float64x2) Float64x2 1213 1214 // Scale multiplies each element of x by 2 raised to the power of the 1215 // floor of the corresponding element in y. 1216 // 1217 // Asm: VSCALEFPD, CPU Feature: AVX512 1218 func (x Float64x4) Scale(y Float64x4) Float64x4 1219 1220 // Scale multiplies each element of x by 2 raised to the power of the 1221 // floor of the corresponding element in y. 1222 // 1223 // Asm: VSCALEFPD, CPU Feature: AVX512 1224 func (x Float64x8) Scale(y Float64x8) Float64x8 1225 1226 /* ShiftAllLeftConcatMod16 */ 1227 1228 // ShiftAllLeftConcatMod16 shifts x[i] left by shift%16, filling the emptied 1229 // low bits with the high bits of y[i]. That is, it shifts the double-width 1230 // concatenation of x[i] (high) and y[i] (low) left and keeps the high 16 1231 // bits. 1232 // 1233 // s = shift % 16 1234 // z[i] = x[i]<<s | y[i]>>(16-s) 1235 // 1236 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1237 // 1238 // Asm: VPSHLDW, CPU Feature: AVX512VBMI2 1239 func (x Uint16x8) ShiftAllLeftConcatMod16(y Uint16x8, shift uint64) (z Uint16x8) 1240 1241 // ShiftAllLeftConcatMod16 shifts x[i] left by shift%16, filling the emptied 1242 // low bits with the high bits of y[i]. That is, it shifts the double-width 1243 // concatenation of x[i] (high) and y[i] (low) left and keeps the high 16 1244 // bits. 1245 // 1246 // s = shift % 16 1247 // z[i] = x[i]<<s | y[i]>>(16-s) 1248 // 1249 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1250 // 1251 // Asm: VPSHLDW, CPU Feature: AVX512VBMI2 1252 func (x Uint16x16) ShiftAllLeftConcatMod16(y Uint16x16, shift uint64) (z Uint16x16) 1253 1254 // ShiftAllLeftConcatMod16 shifts x[i] left by shift%16, filling the emptied 1255 // low bits with the high bits of y[i]. That is, it shifts the double-width 1256 // concatenation of x[i] (high) and y[i] (low) left and keeps the high 16 1257 // bits. 1258 // 1259 // s = shift % 16 1260 // z[i] = x[i]<<s | y[i]>>(16-s) 1261 // 1262 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1263 // 1264 // Asm: VPSHLDW, CPU Feature: AVX512VBMI2 1265 func (x Uint16x32) ShiftAllLeftConcatMod16(y Uint16x32, shift uint64) (z Uint16x32) 1266 1267 /* ShiftAllLeftConcatMod32 */ 1268 1269 // ShiftAllLeftConcatMod32 shifts x[i] left by shift%32, filling the emptied 1270 // low bits with the high bits of y[i]. That is, it shifts the double-width 1271 // concatenation of x[i] (high) and y[i] (low) left and keeps the high 32 1272 // bits. 1273 // 1274 // s = shift % 32 1275 // z[i] = x[i]<<s | y[i]>>(32-s) 1276 // 1277 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1278 // 1279 // Asm: VPSHLDD, CPU Feature: AVX512VBMI2 1280 func (x Uint32x4) ShiftAllLeftConcatMod32(y Uint32x4, shift uint64) (z Uint32x4) 1281 1282 // ShiftAllLeftConcatMod32 shifts x[i] left by shift%32, filling the emptied 1283 // low bits with the high bits of y[i]. That is, it shifts the double-width 1284 // concatenation of x[i] (high) and y[i] (low) left and keeps the high 32 1285 // bits. 1286 // 1287 // s = shift % 32 1288 // z[i] = x[i]<<s | y[i]>>(32-s) 1289 // 1290 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1291 // 1292 // Asm: VPSHLDD, CPU Feature: AVX512VBMI2 1293 func (x Uint32x8) ShiftAllLeftConcatMod32(y Uint32x8, shift uint64) (z Uint32x8) 1294 1295 // ShiftAllLeftConcatMod32 shifts x[i] left by shift%32, filling the emptied 1296 // low bits with the high bits of y[i]. That is, it shifts the double-width 1297 // concatenation of x[i] (high) and y[i] (low) left and keeps the high 32 1298 // bits. 1299 // 1300 // s = shift % 32 1301 // z[i] = x[i]<<s | y[i]>>(32-s) 1302 // 1303 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1304 // 1305 // Asm: VPSHLDD, CPU Feature: AVX512VBMI2 1306 func (x Uint32x16) ShiftAllLeftConcatMod32(y Uint32x16, shift uint64) (z Uint32x16) 1307 1308 /* ShiftAllLeftConcatMod64 */ 1309 1310 // ShiftAllLeftConcatMod64 shifts x[i] left by shift%64, filling the emptied 1311 // low bits with the high bits of y[i]. That is, it shifts the double-width 1312 // concatenation of x[i] (high) and y[i] (low) left and keeps the high 64 1313 // bits. 1314 // 1315 // s = shift % 64 1316 // z[i] = x[i]<<s | y[i]>>(64-s) 1317 // 1318 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1319 // 1320 // Asm: VPSHLDQ, CPU Feature: AVX512VBMI2 1321 func (x Uint64x2) ShiftAllLeftConcatMod64(y Uint64x2, shift uint64) (z Uint64x2) 1322 1323 // ShiftAllLeftConcatMod64 shifts x[i] left by shift%64, filling the emptied 1324 // low bits with the high bits of y[i]. That is, it shifts the double-width 1325 // concatenation of x[i] (high) and y[i] (low) left and keeps the high 64 1326 // bits. 1327 // 1328 // s = shift % 64 1329 // z[i] = x[i]<<s | y[i]>>(64-s) 1330 // 1331 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1332 // 1333 // Asm: VPSHLDQ, CPU Feature: AVX512VBMI2 1334 func (x Uint64x4) ShiftAllLeftConcatMod64(y Uint64x4, shift uint64) (z Uint64x4) 1335 1336 // ShiftAllLeftConcatMod64 shifts x[i] left by shift%64, filling the emptied 1337 // low bits with the high bits of y[i]. That is, it shifts the double-width 1338 // concatenation of x[i] (high) and y[i] (low) left and keeps the high 64 1339 // bits. 1340 // 1341 // s = shift % 64 1342 // z[i] = x[i]<<s | y[i]>>(64-s) 1343 // 1344 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1345 // 1346 // Asm: VPSHLDQ, CPU Feature: AVX512VBMI2 1347 func (x Uint64x8) ShiftAllLeftConcatMod64(y Uint64x8, shift uint64) (z Uint64x8) 1348 1349 /* ShiftAllRightConcatMod16 */ 1350 1351 // ShiftAllRightConcatMod16 shifts x[i] right by shift%16, filling the 1352 // emptied high bits with the low bits of y[i]. That is, it shifts the 1353 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1354 // low 16 bits. 1355 // 1356 // s = shift % 16 1357 // z[i] = x[i]>>s | y[i]<<(16-s) 1358 // 1359 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1360 // 1361 // Asm: VPSHRDW, CPU Feature: AVX512VBMI2 1362 func (x Uint16x8) ShiftAllRightConcatMod16(y Uint16x8, shift uint64) (z Uint16x8) 1363 1364 // ShiftAllRightConcatMod16 shifts x[i] right by shift%16, filling the 1365 // emptied high bits with the low bits of y[i]. That is, it shifts the 1366 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1367 // low 16 bits. 1368 // 1369 // s = shift % 16 1370 // z[i] = x[i]>>s | y[i]<<(16-s) 1371 // 1372 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1373 // 1374 // Asm: VPSHRDW, CPU Feature: AVX512VBMI2 1375 func (x Uint16x16) ShiftAllRightConcatMod16(y Uint16x16, shift uint64) (z Uint16x16) 1376 1377 // ShiftAllRightConcatMod16 shifts x[i] right by shift%16, filling the 1378 // emptied high bits with the low bits of y[i]. That is, it shifts the 1379 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1380 // low 16 bits. 1381 // 1382 // s = shift % 16 1383 // z[i] = x[i]>>s | y[i]<<(16-s) 1384 // 1385 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1386 // 1387 // Asm: VPSHRDW, CPU Feature: AVX512VBMI2 1388 func (x Uint16x32) ShiftAllRightConcatMod16(y Uint16x32, shift uint64) (z Uint16x32) 1389 1390 /* ShiftAllRightConcatMod32 */ 1391 1392 // ShiftAllRightConcatMod32 shifts x[i] right by shift%32, filling the 1393 // emptied high bits with the low bits of y[i]. That is, it shifts the 1394 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1395 // low 32 bits. 1396 // 1397 // s = shift % 32 1398 // z[i] = x[i]>>s | y[i]<<(32-s) 1399 // 1400 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1401 // 1402 // Asm: VPSHRDD, CPU Feature: AVX512VBMI2 1403 func (x Uint32x4) ShiftAllRightConcatMod32(y Uint32x4, shift uint64) (z Uint32x4) 1404 1405 // ShiftAllRightConcatMod32 shifts x[i] right by shift%32, filling the 1406 // emptied high bits with the low bits of y[i]. That is, it shifts the 1407 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1408 // low 32 bits. 1409 // 1410 // s = shift % 32 1411 // z[i] = x[i]>>s | y[i]<<(32-s) 1412 // 1413 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1414 // 1415 // Asm: VPSHRDD, CPU Feature: AVX512VBMI2 1416 func (x Uint32x8) ShiftAllRightConcatMod32(y Uint32x8, shift uint64) (z Uint32x8) 1417 1418 // ShiftAllRightConcatMod32 shifts x[i] right by shift%32, filling the 1419 // emptied high bits with the low bits of y[i]. That is, it shifts the 1420 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1421 // low 32 bits. 1422 // 1423 // s = shift % 32 1424 // z[i] = x[i]>>s | y[i]<<(32-s) 1425 // 1426 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1427 // 1428 // Asm: VPSHRDD, CPU Feature: AVX512VBMI2 1429 func (x Uint32x16) ShiftAllRightConcatMod32(y Uint32x16, shift uint64) (z Uint32x16) 1430 1431 /* ShiftAllRightConcatMod64 */ 1432 1433 // ShiftAllRightConcatMod64 shifts x[i] right by shift%64, filling the 1434 // emptied high bits with the low bits of y[i]. That is, it shifts the 1435 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1436 // low 64 bits. 1437 // 1438 // s = shift % 64 1439 // z[i] = x[i]>>s | y[i]<<(64-s) 1440 // 1441 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1442 // 1443 // Asm: VPSHRDQ, CPU Feature: AVX512VBMI2 1444 func (x Uint64x2) ShiftAllRightConcatMod64(y Uint64x2, shift uint64) (z Uint64x2) 1445 1446 // ShiftAllRightConcatMod64 shifts x[i] right by shift%64, filling the 1447 // emptied high bits with the low bits of y[i]. That is, it shifts the 1448 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1449 // low 64 bits. 1450 // 1451 // s = shift % 64 1452 // z[i] = x[i]>>s | y[i]<<(64-s) 1453 // 1454 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1455 // 1456 // Asm: VPSHRDQ, CPU Feature: AVX512VBMI2 1457 func (x Uint64x4) ShiftAllRightConcatMod64(y Uint64x4, shift uint64) (z Uint64x4) 1458 1459 // ShiftAllRightConcatMod64 shifts x[i] right by shift%64, filling the 1460 // emptied high bits with the low bits of y[i]. That is, it shifts the 1461 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1462 // low 64 bits. 1463 // 1464 // s = shift % 64 1465 // z[i] = x[i]>>s | y[i]<<(64-s) 1466 // 1467 // Performance: A non-constant value of shift may result in significantly worse performance for this operation. 1468 // 1469 // Asm: VPSHRDQ, CPU Feature: AVX512VBMI2 1470 func (x Uint64x8) ShiftAllRightConcatMod64(y Uint64x8, shift uint64) (z Uint64x8) 1471 1472 /* ShiftLeftConcatMod16 */ 1473 1474 // ShiftLeftConcatMod16 shifts x[i] left by shift[i]%16, filling the 1475 // emptied low bits with the high bits of y[i]. That is, it shifts the 1476 // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the 1477 // high 16 bits. 1478 // 1479 // s[i] = shift[i] % 16 1480 // z[i] = x[i]<<s[i] | y[i]>>(16-s[i]) 1481 // 1482 // Asm: VPSHLDVW, CPU Feature: AVX512VBMI2 1483 func (x Uint16x8) ShiftLeftConcatMod16(y Uint16x8, shift Uint16x8) (z Uint16x8) 1484 1485 // ShiftLeftConcatMod16 shifts x[i] left by shift[i]%16, filling the 1486 // emptied low bits with the high bits of y[i]. That is, it shifts the 1487 // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the 1488 // high 16 bits. 1489 // 1490 // s[i] = shift[i] % 16 1491 // z[i] = x[i]<<s[i] | y[i]>>(16-s[i]) 1492 // 1493 // Asm: VPSHLDVW, CPU Feature: AVX512VBMI2 1494 func (x Uint16x16) ShiftLeftConcatMod16(y Uint16x16, shift Uint16x16) (z Uint16x16) 1495 1496 // ShiftLeftConcatMod16 shifts x[i] left by shift[i]%16, filling the 1497 // emptied low bits with the high bits of y[i]. That is, it shifts the 1498 // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the 1499 // high 16 bits. 1500 // 1501 // s[i] = shift[i] % 16 1502 // z[i] = x[i]<<s[i] | y[i]>>(16-s[i]) 1503 // 1504 // Asm: VPSHLDVW, CPU Feature: AVX512VBMI2 1505 func (x Uint16x32) ShiftLeftConcatMod16(y Uint16x32, shift Uint16x32) (z Uint16x32) 1506 1507 /* ShiftLeftConcatMod32 */ 1508 1509 // ShiftLeftConcatMod32 shifts x[i] left by shift[i]%32, filling the 1510 // emptied low bits with the high bits of y[i]. That is, it shifts the 1511 // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the 1512 // high 32 bits. 1513 // 1514 // s[i] = shift[i] % 32 1515 // z[i] = x[i]<<s[i] | y[i]>>(32-s[i]) 1516 // 1517 // Asm: VPSHLDVD, CPU Feature: AVX512VBMI2 1518 func (x Uint32x4) ShiftLeftConcatMod32(y Uint32x4, shift Uint32x4) (z Uint32x4) 1519 1520 // ShiftLeftConcatMod32 shifts x[i] left by shift[i]%32, filling the 1521 // emptied low bits with the high bits of y[i]. That is, it shifts the 1522 // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the 1523 // high 32 bits. 1524 // 1525 // s[i] = shift[i] % 32 1526 // z[i] = x[i]<<s[i] | y[i]>>(32-s[i]) 1527 // 1528 // Asm: VPSHLDVD, CPU Feature: AVX512VBMI2 1529 func (x Uint32x8) ShiftLeftConcatMod32(y Uint32x8, shift Uint32x8) (z Uint32x8) 1530 1531 // ShiftLeftConcatMod32 shifts x[i] left by shift[i]%32, filling the 1532 // emptied low bits with the high bits of y[i]. That is, it shifts the 1533 // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the 1534 // high 32 bits. 1535 // 1536 // s[i] = shift[i] % 32 1537 // z[i] = x[i]<<s[i] | y[i]>>(32-s[i]) 1538 // 1539 // Asm: VPSHLDVD, CPU Feature: AVX512VBMI2 1540 func (x Uint32x16) ShiftLeftConcatMod32(y Uint32x16, shift Uint32x16) (z Uint32x16) 1541 1542 /* ShiftLeftConcatMod64 */ 1543 1544 // ShiftLeftConcatMod64 shifts x[i] left by shift[i]%64, filling the 1545 // emptied low bits with the high bits of y[i]. That is, it shifts the 1546 // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the 1547 // high 64 bits. 1548 // 1549 // s[i] = shift[i] % 64 1550 // z[i] = x[i]<<s[i] | y[i]>>(64-s[i]) 1551 // 1552 // Asm: VPSHLDVQ, CPU Feature: AVX512VBMI2 1553 func (x Uint64x2) ShiftLeftConcatMod64(y Uint64x2, shift Uint64x2) (z Uint64x2) 1554 1555 // ShiftLeftConcatMod64 shifts x[i] left by shift[i]%64, filling the 1556 // emptied low bits with the high bits of y[i]. That is, it shifts the 1557 // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the 1558 // high 64 bits. 1559 // 1560 // s[i] = shift[i] % 64 1561 // z[i] = x[i]<<s[i] | y[i]>>(64-s[i]) 1562 // 1563 // Asm: VPSHLDVQ, CPU Feature: AVX512VBMI2 1564 func (x Uint64x4) ShiftLeftConcatMod64(y Uint64x4, shift Uint64x4) (z Uint64x4) 1565 1566 // ShiftLeftConcatMod64 shifts x[i] left by shift[i]%64, filling the 1567 // emptied low bits with the high bits of y[i]. That is, it shifts the 1568 // double-width concatenation of x[i] (high) and y[i] (low) left and keeps the 1569 // high 64 bits. 1570 // 1571 // s[i] = shift[i] % 64 1572 // z[i] = x[i]<<s[i] | y[i]>>(64-s[i]) 1573 // 1574 // Asm: VPSHLDVQ, CPU Feature: AVX512VBMI2 1575 func (x Uint64x8) ShiftLeftConcatMod64(y Uint64x8, shift Uint64x8) (z Uint64x8) 1576 1577 /* ShiftRightConcatMod16 */ 1578 1579 // ShiftRightConcatMod16 shifts x[i] right by shift[i]%16, filling the 1580 // emptied high bits with the low bits of y[i]. That is, it shifts the 1581 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1582 // low 16 bits. 1583 // 1584 // s[i] = shift[i] % 16 1585 // z[i] = x[i]>>s[i] | y[i]<<(16-s[i]) 1586 // 1587 // Asm: VPSHRDVW, CPU Feature: AVX512VBMI2 1588 func (x Uint16x8) ShiftRightConcatMod16(y Uint16x8, shift Uint16x8) (z Uint16x8) 1589 1590 // ShiftRightConcatMod16 shifts x[i] right by shift[i]%16, filling the 1591 // emptied high bits with the low bits of y[i]. That is, it shifts the 1592 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1593 // low 16 bits. 1594 // 1595 // s[i] = shift[i] % 16 1596 // z[i] = x[i]>>s[i] | y[i]<<(16-s[i]) 1597 // 1598 // Asm: VPSHRDVW, CPU Feature: AVX512VBMI2 1599 func (x Uint16x16) ShiftRightConcatMod16(y Uint16x16, shift Uint16x16) (z Uint16x16) 1600 1601 // ShiftRightConcatMod16 shifts x[i] right by shift[i]%16, filling the 1602 // emptied high bits with the low bits of y[i]. That is, it shifts the 1603 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1604 // low 16 bits. 1605 // 1606 // s[i] = shift[i] % 16 1607 // z[i] = x[i]>>s[i] | y[i]<<(16-s[i]) 1608 // 1609 // Asm: VPSHRDVW, CPU Feature: AVX512VBMI2 1610 func (x Uint16x32) ShiftRightConcatMod16(y Uint16x32, shift Uint16x32) (z Uint16x32) 1611 1612 /* ShiftRightConcatMod32 */ 1613 1614 // ShiftRightConcatMod32 shifts x[i] right by shift[i]%32, filling the 1615 // emptied high bits with the low bits of y[i]. That is, it shifts the 1616 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1617 // low 32 bits. 1618 // 1619 // s[i] = shift[i] % 32 1620 // z[i] = x[i]>>s[i] | y[i]<<(32-s[i]) 1621 // 1622 // Asm: VPSHRDVD, CPU Feature: AVX512VBMI2 1623 func (x Uint32x4) ShiftRightConcatMod32(y Uint32x4, shift Uint32x4) (z Uint32x4) 1624 1625 // ShiftRightConcatMod32 shifts x[i] right by shift[i]%32, filling the 1626 // emptied high bits with the low bits of y[i]. That is, it shifts the 1627 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1628 // low 32 bits. 1629 // 1630 // s[i] = shift[i] % 32 1631 // z[i] = x[i]>>s[i] | y[i]<<(32-s[i]) 1632 // 1633 // Asm: VPSHRDVD, CPU Feature: AVX512VBMI2 1634 func (x Uint32x8) ShiftRightConcatMod32(y Uint32x8, shift Uint32x8) (z Uint32x8) 1635 1636 // ShiftRightConcatMod32 shifts x[i] right by shift[i]%32, filling the 1637 // emptied high bits with the low bits of y[i]. That is, it shifts the 1638 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1639 // low 32 bits. 1640 // 1641 // s[i] = shift[i] % 32 1642 // z[i] = x[i]>>s[i] | y[i]<<(32-s[i]) 1643 // 1644 // Asm: VPSHRDVD, CPU Feature: AVX512VBMI2 1645 func (x Uint32x16) ShiftRightConcatMod32(y Uint32x16, shift Uint32x16) (z Uint32x16) 1646 1647 /* ShiftRightConcatMod64 */ 1648 1649 // ShiftRightConcatMod64 shifts x[i] right by shift[i]%64, filling the 1650 // emptied high bits with the low bits of y[i]. That is, it shifts the 1651 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1652 // low 64 bits. 1653 // 1654 // s[i] = shift[i] % 64 1655 // z[i] = x[i]>>s[i] | y[i]<<(64-s[i]) 1656 // 1657 // Asm: VPSHRDVQ, CPU Feature: AVX512VBMI2 1658 func (x Uint64x2) ShiftRightConcatMod64(y Uint64x2, shift Uint64x2) (z Uint64x2) 1659 1660 // ShiftRightConcatMod64 shifts x[i] right by shift[i]%64, filling the 1661 // emptied high bits with the low bits of y[i]. That is, it shifts the 1662 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1663 // low 64 bits. 1664 // 1665 // s[i] = shift[i] % 64 1666 // z[i] = x[i]>>s[i] | y[i]<<(64-s[i]) 1667 // 1668 // Asm: VPSHRDVQ, CPU Feature: AVX512VBMI2 1669 func (x Uint64x4) ShiftRightConcatMod64(y Uint64x4, shift Uint64x4) (z Uint64x4) 1670 1671 // ShiftRightConcatMod64 shifts x[i] right by shift[i]%64, filling the 1672 // emptied high bits with the low bits of y[i]. That is, it shifts the 1673 // double-width concatenation of y[i] (high) and x[i] (low) right and keeps the 1674 // low 64 bits. 1675 // 1676 // s[i] = shift[i] % 64 1677 // z[i] = x[i]>>s[i] | y[i]<<(64-s[i]) 1678 // 1679 // Asm: VPSHRDVQ, CPU Feature: AVX512VBMI2 1680 func (x Uint64x8) ShiftRightConcatMod64(y Uint64x8, shift Uint64x8) (z Uint64x8) 1681 1682 /* TruncScaled */ 1683 1684 // TruncScaled truncates elements with specified precision. 1685 // 1686 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1687 // 1688 // Asm: VRNDSCALEPS, CPU Feature: AVX512 1689 func (x Float32x4) TruncScaled(prec uint8) Float32x4 1690 1691 // TruncScaled truncates elements with specified precision. 1692 // 1693 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1694 // 1695 // Asm: VRNDSCALEPS, CPU Feature: AVX512 1696 func (x Float32x8) TruncScaled(prec uint8) Float32x8 1697 1698 // TruncScaled truncates elements with specified precision. 1699 // 1700 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1701 // 1702 // Asm: VRNDSCALEPS, CPU Feature: AVX512 1703 func (x Float32x16) TruncScaled(prec uint8) Float32x16 1704 1705 // TruncScaled truncates elements with specified precision. 1706 // 1707 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1708 // 1709 // Asm: VRNDSCALEPD, CPU Feature: AVX512 1710 func (x Float64x2) TruncScaled(prec uint8) Float64x2 1711 1712 // TruncScaled truncates elements with specified precision. 1713 // 1714 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1715 // 1716 // Asm: VRNDSCALEPD, CPU Feature: AVX512 1717 func (x Float64x4) TruncScaled(prec uint8) Float64x4 1718 1719 // TruncScaled truncates elements with specified precision. 1720 // 1721 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1722 // 1723 // Asm: VRNDSCALEPD, CPU Feature: AVX512 1724 func (x Float64x8) TruncScaled(prec uint8) Float64x8 1725 1726 /* TruncScaledResidue */ 1727 1728 // TruncScaledResidue computes the difference after truncating with specified precision. 1729 // 1730 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1731 // 1732 // Asm: VREDUCEPS, CPU Feature: AVX512 1733 func (x Float32x4) TruncScaledResidue(prec uint8) Float32x4 1734 1735 // TruncScaledResidue computes the difference after truncating with specified precision. 1736 // 1737 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1738 // 1739 // Asm: VREDUCEPS, CPU Feature: AVX512 1740 func (x Float32x8) TruncScaledResidue(prec uint8) Float32x8 1741 1742 // TruncScaledResidue computes the difference after truncating with specified precision. 1743 // 1744 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1745 // 1746 // Asm: VREDUCEPS, CPU Feature: AVX512 1747 func (x Float32x16) TruncScaledResidue(prec uint8) Float32x16 1748 1749 // TruncScaledResidue computes the difference after truncating with specified precision. 1750 // 1751 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1752 // 1753 // Asm: VREDUCEPD, CPU Feature: AVX512 1754 func (x Float64x2) TruncScaledResidue(prec uint8) Float64x2 1755 1756 // TruncScaledResidue computes the difference after truncating with specified precision. 1757 // 1758 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1759 // 1760 // Asm: VREDUCEPD, CPU Feature: AVX512 1761 func (x Float64x4) TruncScaledResidue(prec uint8) Float64x4 1762 1763 // TruncScaledResidue computes the difference after truncating with specified precision. 1764 // 1765 // Performance: A non-constant value of prec may result in significantly worse performance for this operation. 1766 // 1767 // Asm: VREDUCEPD, CPU Feature: AVX512 1768 func (x Float64x8) TruncScaledResidue(prec uint8) Float64x8 1769