- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for multiplication (0.28 sec)
-
src/crypto/internal/bigmod/nat.go
// n = len(m.nat.limbs). // // Faster Montgomery multiplication replaces standard modular multiplication for // numbers in this representation. // // This assumes that x is already reduced mod m. func (x *Nat) montgomeryRepresentation(m *Modulus) *Nat { // A Montgomery multiplication (which computes a * b / R) by R * R works out // to a multiplication by R, which takes the value out of the Montgomery domain.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 24K bytes - Viewed (0) -
src/math/big/nat.go
func karatsuba(z, x, y nat) { n := len(y) // Switch to basic multiplication if numbers are odd or small. // (n is always even if karatsubaThreshold is even, but be // conservative) if n&1 != 0 || n < karatsubaThreshold || n < 2 { basicMul(z, x, y) return } // n&1 == 0 && n >= karatsubaThreshold && n >= 2 // Karatsuba multiplication is based on the observation that // for two numbers x and y with: //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:31:58 UTC 2024 - 31.7K bytes - Viewed (0) -
src/runtime/slice.go
var overflow bool var lenmem, newlenmem, capmem uintptr // Specialize for common values of et.Size. // For 1 we don't need any division/multiplication. // For goarch.PtrSize, compiler will optimize division/multiplication into a shift by a constant. // For powers of 2, use a variable shift. noscan := !et.Pointers() switch { case et.Size_ == 1: lenmem = uintptr(oldLen)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 12.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/python/integration_test/quantize_model_test_base.py
return self.bias_fn() and self.bias_size != self.filters.shape[-1] @def_function.function def matmul(self, input_tensor: core.Tensor) -> Mapping[str, core.Tensor]: """Performs a matrix multiplication. Depending on self.bias_fn and self.activation_fn, it may add a bias term or go through the activaction function. Args: input_tensor: Input tensor to matmul with the filter.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 14 06:31:57 UTC 2024 - 18.2K bytes - Viewed (0) -
src/crypto/internal/nistec/p256_asm.go
// The following assembly functions are implemented in p256_asm_*.s // Montgomery multiplication. Sets res = in1 * in2 * R⁻¹ mod p. // //go:noescape func p256Mul(res, in1, in2 *p256Element) // Montgomery square, repeated n times (n >= 1). // //go:noescape func p256Sqr(res, in *p256Element, n int) // Montgomery multiplication by R⁻¹, or 1 outside the domain.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 21.4K bytes - Viewed (0) -
src/math/rand/v2/rand.go
// // We want to compute // hi, lo := bits.Mul64(r.Uint64(), n) // In terms of 32-bit halves, this is: // x1:x0 := r.Uint64() // 0:hi, lo1:lo0 := bits.Mul64(x1:x0, 0:n) // Writing out the multiplication in terms of bits.Mul32 allows // using direct hardware instructions and avoiding // the computations involving these zeros. x := r.Uint64() lo1a, lo0 := bits.Mul32(uint32(x), n)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 02:25:49 UTC 2024 - 12.8K bytes - Viewed (0) -
test/codegen/arithmetic.go
r := a - (b + a) return r } func AddAddSubSimplify(a, b, c int) int { // amd64:-"SUBQ" // ppc64x:-"SUB" r := a + (b + (c - a)) return r } // -------------------- // // Multiplication // // -------------------- // func Pow2Muls(n1, n2 int) (int, int) { // amd64:"SHLQ\t[$]5",-"IMULQ" // 386:"SHLL\t[$]5",-"IMULL" // arm:"SLL\t[$]5",-"MUL" // arm64:"LSL\t[$]5",-"MUL"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 15:28:00 UTC 2024 - 15.2K bytes - Viewed (0) -
src/crypto/cipher/gcm.go
func (g *gcm) mul(y *gcmFieldElement) { var z gcmFieldElement for i := 0; i < 2; i++ { word := y.high if i == 1 { word = y.low } // Multiplication works by multiplying z by 16 and adding in // one of the precomputed multiples of H. for j := 0; j < 64; j += 4 { msw := z.high & 0xf z.high >>= 4 z.high |= z.low << 60 z.low >>= 4
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 13.7K bytes - Viewed (0) -
src/math/big/float.go
z.form = zero z.neg = false return } // len(z.mant) > 0 z.setExpAndRound(ex+int64(len(z.mant))*_W-fnorm(z.mant), 0) } // z = x * y, ignoring signs of x and y for the multiplication // but using the sign of z for rounding the result. // x and y must have a non-empty mantissa and valid exponent. func (z *Float) umul(x, y *Float) { if debugFloat { validateBinaryOperands(x, y) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 15:46:54 UTC 2024 - 44.5K bytes - Viewed (0) -
src/crypto/internal/edwards25519/scalar.go
// can interpret x as the sum of three shorter values a, b, and c. // // x = a + b * 2^168 + c * 2^336 mod l // // We then precompute 2^168 and 2^336 modulo l, and perform the reduction // with two multiplications and two additions. s.setShortBytes(x[:21]) t := new(Scalar).setShortBytes(x[21:42]) s.Add(s, t.Multiply(t, scalarTwo168)) t.setShortBytes(x[42:]) s.Add(s, t.Multiply(t, scalarTwo336))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 10.8K bytes - Viewed (0)