Skip to content

Commit fc3bc49

Browse files
committed
[dev.simd] simd: clean up mask load comments
Addressing a comment from CL 710915. Change-Id: Id65f525130b5b626ea7017aebc93a4b3b0c93d84 Reviewed-on: https://go-review.googlesource.com/c/go/+/711780 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
1 parent 416332d commit fc3bc49

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

src/simd/_gen/simdgen/gen_simdTypes.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,17 @@ func (x {{.Name}}) Store(y *[{{.Lanes}}]{{.Base}})
182182

183183
const simdMaskFromValTemplate = `
184184
// {{.Name}}FromBits constructs a {{.Name}} from a bitmap value, where 1 means set for the indexed element, 0 means unset.
185+
{{- if ne .Lanes .LanesContainer}}
185186
// Only the lower {{.Lanes}} bits of y are used.
187+
{{- end}}
186188
//
187189
// Asm: KMOV{{.IntelSizeSuffix}}, CPU Feature: AVX512
188190
func {{.Name}}FromBits(y uint{{.LanesContainer}}) {{.Name}}
189191
190192
// ToBits constructs a bitmap from a {{.Name}}, where 1 means set for the indexed element, 0 means unset.
193+
{{- if ne .Lanes .LanesContainer}}
191194
// Only the lower {{.Lanes}} bits of y are used.
195+
{{- end}}
192196
//
193197
// Asm: KMOV{{.IntelSizeSuffix}}, CPU Features: AVX512
194198
func (x {{.Name}}) ToBits() uint{{.LanesContainer}}

src/simd/types_amd64.go

Lines changed: 0 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)