Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for sqDiff (0.13 sec)

  1. src/image/color/color_test.go

    		0xfffffffd,
    		0xfffffffe,
    		0xffffffff,
    	}
    	for _, x := range testCases {
    		for _, y := range testCases {
    			if got, want := sqDiff(x, y), orig(x, y); got != want {
    				t.Fatalf("sqDiff(%#x, %#x): got %d, want %d", x, y, got, want)
    			}
    		}
    	}
    	if err := quick.CheckEqual(orig, sqDiff, &quick.Config{MaxCountScale: 10}); err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 27 05:47:09 UTC 2017
    - 890 bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/tests/flatbuffer2mlir/math.mlir

    ^bb0(%arg0: tensor<4xf32>):
      // CHECK:      [[CONST:%.*]] = "tfl.pseudo_const"() <{value = dense<1.000000e+00> : tensor<4xf32>}> : () -> tensor<4xf32>
      // CHECK-NEXT: [[SQDIFF:%.*]] = tfl.squared_difference %arg0, [[CONST]] : tensor<4xf32>
      // CHECK-NEXT: %{{.*}} = tfl.mul %arg0, [[SQDIFF]] {fused_activation_function = "NONE"} : tensor<4xf32>
      %0 = "tfl.pseudo_const" () {value = dense<1.0> : tensor<4xf32>} : () -> tensor<4xf32> loc("Const")
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  3. src/image/color/color.go

    	ret, bestSum := 0, uint32(1<<32-1)
    	for i, v := range p {
    		vr, vg, vb, va := v.RGBA()
    		sum := sqDiff(cr, vr) + sqDiff(cg, vg) + sqDiff(cb, vb) + sqDiff(ca, va)
    		if sum < bestSum {
    			if sum == 0 {
    				return i
    			}
    			ret, bestSum = i, sum
    		}
    	}
    	return ret
    }
    
    // sqDiff returns the squared-difference of x and y, shifted by 2 so that
    // adding four of those won't overflow a uint32.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  4. src/image/draw/draw_test.go

    		-0x7ffffffe,
    		-0x80000000,
    	}
    	for _, x := range testCases {
    		for _, y := range testCases {
    			if got, want := sqDiff(x, y), orig(x, y); got != want {
    				t.Fatalf("sqDiff(%#x, %#x): got %d, want %d", x, y, got, want)
    			}
    		}
    	}
    	if err := quick.CheckEqual(orig, sqDiff, &quick.Config{MaxCountScale: 10}); err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 18:07:05 UTC 2023
    - 26K bytes
    - Viewed (0)
  5. src/image/draw/draw.go

    				// TODO(nigeltao): consider smarter algorithms.
    				bestIndex, bestSum := 0, uint32(1<<32-1)
    				for index, p := range palette {
    					sum := sqDiff(er, p[0]) + sqDiff(eg, p[1]) + sqDiff(eb, p[2]) + sqDiff(ea, p[3])
    					if sum < bestSum {
    						bestIndex, bestSum = index, sum
    						if sum == 0 {
    							break
    						}
    					}
    				}
    				pix[y*stride+x] = byte(bestIndex)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:08:05 UTC 2024
    - 33.9K bytes
    - Viewed (0)
  6. src/net/http/sniff.go

    		ct:   "text/plain; charset=utf-8",
    	},
    
    	// Image types
    	// For posterity, we originally returned "image/vnd.microsoft.icon" from
    	// https://tools.ietf.org/html/draft-ietf-websec-mime-sniff-03#section-7
    	// https://codereview.appspot.com/4746042
    	// but that has since been replaced with "image/x-icon" in Section 6.2
    	// of https://mimesniff.spec.whatwg.org/#matching-an-image-type-pattern
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 20 21:51:06 UTC 2022
    - 7.9K bytes
    - Viewed (0)
  7. src/image/format.go

    	if len(magic) != len(b) {
    		return false
    	}
    	for i, c := range b {
    		if magic[i] != c && magic[i] != '?' {
    			return false
    		}
    	}
    	return true
    }
    
    // sniff determines the format of r's data.
    func sniff(r reader) format {
    	formats, _ := atomicFormats.Load().([]format)
    	for _, f := range formats {
    		b, err := r.Peek(len(f.magic))
    		if err == nil && match(f.magic, b) {
    			return f
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 3K bytes
    - Viewed (0)
  8. releasenotes/notes/protocol-detection-timeout.yaml

        the proxy will sniff the first few bytes of traffic to determine the protocol used. For certain "server first" protocols, such
        as the protocol used by `MySQL`, there will be no initial bytes to sniff. To mitigate this issue in the past, Istio introduced
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Oct 21 00:53:45 UTC 2020
    - 1.6K bytes
    - Viewed (0)
  9. src/image/png/example_test.go

    func ExampleDecode() {
    	// This example uses png.Decode which can only decode PNG images.
    	// Consider using the general image.Decode as it can sniff and decode any registered image format.
    	img, err := png.Decode(gopherPNG())
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	levels := []string{" ", "░", "▒", "▓", "█"}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 21 19:47:04 UTC 2016
    - 3.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/tests/unfuse_mhlo_batch_norm.mlir

      // CHECK-DAG: %[[SQ_DIFF:.+]] = "tf.SquaredDifference"(%arg0, %[[MEAN_BCAST]]) : (tensor<3x4x256x6xf32>, tensor<3x4x256x6xf32>) -> tensor<3x4x256x6xf32>
      // CHECK-DAG: %[[VARIANCE:.+]] = "tf.Mean"(%[[SQ_DIFF]], %[[CST_AXIS]]) <{keep_dims = false}> : (tensor<3x4x256x6xf32>, tensor<3xi32>) -> tensor<256xf32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 06 15:32:52 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top