Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 130 for multiplication (0.2 sec)

  1. src/math/big/ratconv.go

    	// division by base**(-fcount), which equals a multiplication by
    	// base**fcount. An exponent means multiplication by ebase**exp.
    	// Multiplications are commutative, so we can apply them in any
    	// order. We only have powers of 2 and 10, and we split powers
    	// of 10 into the product of the same powers of 2 and 5. This
    	// may reduce the size of shift/multiplication factors or
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 15 22:16:34 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. staging/src/k8s.io/apimachinery/pkg/api/resource/math_test.go

    	} {
    		c, ok := int64Multiply(test.a, test.b)
    		if c != test.c {
    			t.Errorf("%v: unexpected result: %d", test, c)
    		}
    		if ok != test.ok {
    			t.Errorf("%v: unexpected overflow: %t", test, ok)
    		}
    		// multiplication is commutative
    		d, ok2 := int64Multiply(test.b, test.a)
    		if c != d || ok != ok2 {
    			t.Errorf("%v: not commutative: %d %t", test, d, ok2)
    		}
    	}
    }
    
    func TestDetectOverflowScale(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 29 20:41:44 UTC 2017
    - 5.1K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top