Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
arith_decl.go95 linesDownload Raw Back to big
1// Copyright 2010 The Go Authors. All rights reserved.2// Use of this source code is governed by a BSD-style3// license that can be found in the LICENSE file.4 5//go:build !math_big_pure_go6 7//go:generate go test ./internal/asmgen -generate8 9package big10 11import _ "unsafe" // for linkname12 13// implemented in arith_$GOARCH.s14 15// addVV should be an internal detail,16// but widely used packages access it using linkname.17// Notable members of the hall of shame include:18//   - github.com/remyoudompheng/bigfft19//20// Do not remove or change the type signature.21// See go.dev/issue/67401.22//23//go:linkname addVV24//go:noescape25func addVV(z, x, y []Word) (c Word)26 27// subVV should be an internal detail,28// but widely used packages access it using linkname.29// Notable members of the hall of shame include:30//   - github.com/remyoudompheng/bigfft31//32// Do not remove or change the type signature.33// See go.dev/issue/67401.34//35//go:linkname subVV36//go:noescape37func subVV(z, x, y []Word) (c Word)38 39// shlVU should be an internal detail (and a stale one at that),40// but widely used packages access it using linkname.41// Notable members of the hall of shame include:42//   - github.com/remyoudompheng/bigfft43//44// Do not remove or change the type signature.45// See go.dev/issue/67401.46//47//go:linkname shlVU48func shlVU(z, x []Word, s uint) (c Word) {49	if s == 0 {50		copy(z, x)51		return 052	}53	return lshVU(z, x, s)54}55 56// lshVU sets z = x<<s, returning the high bits c. 1 ≤ s ≤ _B-1.57//58//go:noescape59func lshVU(z, x []Word, s uint) (c Word)60 61// rshVU sets z = x>>s, returning the low bits c. 1 ≤ s ≤ _B-1.62//63//go:noescape64func rshVU(z, x []Word, s uint) (c Word)65 66// mulAddVWW should be an internal detail,67// but widely used packages access it using linkname.68// Notable members of the hall of shame include:69//   - github.com/remyoudompheng/bigfft70//71// Do not remove or change the type signature.72// See go.dev/issue/67401.73//74//go:linkname mulAddVWW75//go:noescape76func mulAddVWW(z, x []Word, m, a Word) (c Word)77 78// addMulVVW should be an internal detail (and a stale one at that),79// but widely used packages access it using linkname.80// Notable members of the hall of shame include:81//   - github.com/remyoudompheng/bigfft82//83// Do not remove or change the type signature.84// See go.dev/issue/67401.85//86//go:linkname addMulVVW87func addMulVVW(z, x []Word, y Word) (c Word) {88	return addMulVVWW(z, z, x, y, 0)89}90 91// addMulVVWW sets z = x+y*m+a.92//93//go:noescape94func addMulVVWW(z, x, y []Word, m, a Word) (c Word)95 
codekingpro/portable-devtools · Team Ai