[go/dev.simd] [dev.simd] simd: rename CarrylessMultiply

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
May 11, 2026, 1:44:21 PM (10 hours ago) May 11
to Junyang Shao, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, David Chase, Cherry Mui, golang-co...@googlegroups.com

Gopher Robot submitted the change with unreviewed changes

Unreviewed changes

2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: src/simd/archsimd/shuffles_amd64.go
Insertions: 8, Deletions: 8.

@@ -1364,7 +1364,7 @@
// x**2 + 0x + 1 = x**2 + 1 modeled by 101. (Note that "+" adds
// polynomial terms, but coefficients "add" with XOR.)
//
-// Asm: VPCLMULQDQ, CPU Feature: AVX
+// Asm: VPCLMULQDQ, CPU Feature: AVX2
func (x Uint64x4) CarrylessMultiplyEven(y Uint64x4) Uint64x4 {
return x.carrylessMultiply(0, y)
}
@@ -1382,7 +1382,7 @@
// x**2 + 0x + 1 = x**2 + 1 modeled by 101. (Note that "+" adds
// polynomial terms, but coefficients "add" with XOR.)
//
-// Asm: VPCLMULQDQ, CPU Feature: AVX
+// Asm: VPCLMULQDQ, CPU Feature: AVX2
func (x Uint64x4) CarrylessMultiplyOdd(y Uint64x4) Uint64x4 {
return x.carrylessMultiply(0b10001, y)
}
@@ -1400,7 +1400,7 @@
// x**2 + 0x + 1 = x**2 + 1 modeled by 101. (Note that "+" adds
// polynomial terms, but coefficients "add" with XOR.)
//
-// Asm: VPCLMULQDQ, CPU Feature: AVX
+// Asm: VPCLMULQDQ, CPU Feature: AVX2
func (x Uint64x4) CarrylessMultiplyOddEven(y Uint64x4) Uint64x4 {
return x.carrylessMultiply(0b1, y)
}
@@ -1418,7 +1418,7 @@
// x**2 + 0x + 1 = x**2 + 1 modeled by 101. (Note that "+" adds
// polynomial terms, but coefficients "add" with XOR.)
//
-// Asm: VPCLMULQDQ, CPU Feature: AVX
+// Asm: VPCLMULQDQ, CPU Feature: AVX2
func (x Uint64x4) CarrylessMultiplyEvenOdd(y Uint64x4) Uint64x4 {
return x.carrylessMultiply(0b10000, y)
}
@@ -1436,7 +1436,7 @@
// x**2 + 0x + 1 = x**2 + 1 modeled by 101. (Note that "+" adds
// polynomial terms, but coefficients "add" with XOR.)
//
-// Asm: VPCLMULQDQ, CPU Feature: AVX
+// Asm: VPCLMULQDQ, CPU Feature: AVX512VPCLMULQDQ
func (x Uint64x8) CarrylessMultiplyEven(y Uint64x8) Uint64x8 {
return x.carrylessMultiply(0, y)
}
@@ -1454,7 +1454,7 @@
// x**2 + 0x + 1 = x**2 + 1 modeled by 101. (Note that "+" adds
// polynomial terms, but coefficients "add" with XOR.)
//
-// Asm: VPCLMULQDQ, CPU Feature: AVX
+// Asm: VPCLMULQDQ, CPU Feature: AVX512VPCLMULQDQ
func (x Uint64x8) CarrylessMultiplyOdd(y Uint64x8) Uint64x8 {
return x.carrylessMultiply(0b10001, y)
}
@@ -1472,7 +1472,7 @@
// x**2 + 0x + 1 = x**2 + 1 modeled by 101. (Note that "+" adds
// polynomial terms, but coefficients "add" with XOR.)
//
-// Asm: VPCLMULQDQ, CPU Feature: AVX
+// Asm: VPCLMULQDQ, CPU Feature: AVX512VPCLMULQDQ
func (x Uint64x8) CarrylessMultiplyOddEven(y Uint64x8) Uint64x8 {
return x.carrylessMultiply(0b1, y)
}
@@ -1490,7 +1490,7 @@
// x**2 + 0x + 1 = x**2 + 1 modeled by 101. (Note that "+" adds
// polynomial terms, but coefficients "add" with XOR.)
//
-// Asm: VPCLMULQDQ, CPU Feature: AVX
+// Asm: VPCLMULQDQ, CPU Feature: AVX512VPCLMULQDQ
func (x Uint64x8) CarrylessMultiplyEvenOdd(y Uint64x8) Uint64x8 {
return x.carrylessMultiply(0b10000, y)
}
```

Change information

Commit message:
[dev.simd] simd: rename CarrylessMultiply

This CL does this: Drop a and b control arguments (clearly non-portable). Replace with CarrylessMultiply(Even|EvenOdd|OddEven|Odd), Conveniently, this naming convention merges the behavior of CarrylessMultiply and CarrylessMultiplyGrouped so we don't need the separate "grouped" version.

For #78979.
Change-Id: Ib08cdf49f5c2ec01d550ed9f89d7d3b7193461f6
Reviewed-by: David Chase <drc...@google.com>
Auto-Submit: Junyang Shao <shaoj...@google.com>
Files:
  • M src/simd/archsimd/internal/simd_test/simd_test.go
  • M src/simd/archsimd/shuffles_amd64.go
Change size: M
Delta: 2 files changed, 179 insertions(+), 38 deletions(-)
Branch: refs/heads/dev.simd
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: dev.simd
Gerrit-Change-Id: Ib08cdf49f5c2ec01d550ed9f89d7d3b7193461f6
Gerrit-Change-Number: 776060
Gerrit-PatchSet: 4
Gerrit-Owner: Junyang Shao <shaoj...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Junyang Shao <shaoj...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages