- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 106 for multiplication (0.24 sec)
-
src/hash/fnv/fnv.go
hash ^= sum64a(c) hash *= prime64 } *s = hash return len(data), nil } func (s *sum128) Write(data []byte) (int, error) { for _, c := range data { // Compute the multiplication s0, s1 := bits.Mul64(prime128Lower, s[1]) s0 += s[1]<<prime128Shift + prime128Lower*s[0] // Update the values s[1] = s1 s[0] = s0 s[1] ^= uint64(c) } return len(data), nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 18 22:36:41 UTC 2024 - 8.5K bytes - Viewed (0) -
src/math/big/natdiv.go
which can be handled without a recursive call. That is, the algorithm uses two full iterations, each using an n-by-n/2-digit division and an n/2-by-n/2-digit multiplication, along with a few n-digit additions and subtractions. The standard n-by-n-digit multiplication algorithm requires O(n²) time, making the overall algorithm require time T(n) where T(n) = 2T(n/2) + O(n) + O(n²)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 17:02:38 UTC 2024 - 34.4K bytes - Viewed (0) -
src/crypto/elliptic/nistec.go
// // To interact with the nistec package, points are encoded into and decoded from // properly formatted byte slices. All big.Int use is limited to this package. // Encoding and decoding is 1/1000th of the runtime of a scalar multiplication, // so the overhead is acceptable. type nistCurve[Point nistPoint[Point]] struct { newPoint func() Point params *CurveParams } // nistPoint is a generic constraint for the nistec Point types.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 21 16:19:34 UTC 2022 - 9.6K 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) -
tensorflow/compiler/mlir/tensorflow/transforms/canonicalize.td
(TF_MulOp:$dest1 $arg0, (TF_RsqrtOp:$dest2 $arg1)), [], [(CopyAttrs $src, $dest1), (CopyAttrs $src, $dest2)]>; // Replace division by a constant with a multiplication by a reciprocal of that // constant. Floating point division can be ~10x more expensive than a // multiplication. def RealDivWithConstDivisor : Pat< (TF_RealDivOp:$src $arg0, (TF_ConstOp FloatElementsAttr<32>:$value)),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Dec 06 18:42:28 UTC 2023 - 17K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/magic.go
package ssa import ( "math/big" "math/bits" ) // So you want to compute x / c for some constant c? // Machine division instructions are slow, so we try to // compute this division with a multiplication + a few // other cheap instructions instead. // (We assume here that c != 0, +/- 1, or +/- 2^i. Those // cases are easy to handle in different ways). // Technique from https://gmplib.org/~tege/divcnst-pldi94.pdf
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:25 UTC 2024 - 15.8K 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) -
staging/src/k8s.io/apimachinery/pkg/api/resource/amount_test.go
t.Errorf("unexpeted failure: %v", c) } else if ok { if c != test.c { t.Errorf("%v: unexpected result: %d", test, c) } } else { if c != test.a { t.Errorf("%v: overflow multiplication mutated source: %d", test, c) } } } } func TestInt64AsCanonicalString(t *testing.T) { for _, test := range []struct { value int64 scale Scale result string
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 13 20:54:15 UTC 2023 - 7K bytes - Viewed (0) -
src/crypto/ecdh/ecdh.go
curve Curve privateKey []byte boring *boring.PrivateKeyECDH // publicKey is set under publicKeyOnce, to allow loading private keys with // NewPrivateKey without having to perform a scalar multiplication. publicKey *PublicKey publicKeyOnce sync.Once } // ECDH performs an ECDH exchange and returns the shared secret. The [PrivateKey] // and [PublicKey] must use the same curve. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 6.4K bytes - Viewed (0)