- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 289 for clip (0.31 sec)
-
src/image/draw/clip_test.go
src := src0.SubImage(c.sr).(*image.RGBA) r, sp, mp := c.r, c.sp, c.mp if c.nilMask { clip(dst, &r, src, &sp, nil, nil) } else { clip(dst, &r, src, &sp, mask0.SubImage(c.mr), &mp) } // Check that the actual results equal the expected results. if !c.r0.Eq(r) { t.Errorf("%s: clip rectangle want %v got %v", c.desc, c.r0, r) continue } if !c.sp0.Eq(sp) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 18:07:05 UTC 2023 - 4.4K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue60542.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package p func Clip[S ~[]E, E any](s S) S { return s } var versions func()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 21:28:05 UTC 2024 - 331 bytes - Viewed (0) -
test/typeparam/listimp.dir/a.go
type ListNum[T OrderedNum] struct { Next *ListNum[T] Val T } const Clip = 5 // ClippedLargest returns the largest in the list of OrderNums, but a max of 5. func (l *ListNum[T]) ClippedLargest() T { var max T for p := l; p != nil; p = p.Next { if p.Val > max && p.Val < Clip { max = p.Val } } return max
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Dec 03 17:08:51 UTC 2022 - 1.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/optimize.td
def RemoveRedundantCastOps : Pat< (TF_CastOp:$root_cast (TF_CastOp:$i8_cast (TF_ClipByValueOp:$clip $input, $min_value, $max_value), ConstBoolAttrFalse:$truncate2), ConstBoolAttrFalse:$truncate1), (TF_CastOp $clip, ConstBoolAttrFalse), [(TensorOf<[I8]> $i8_cast), (TensorOf<[I32]> $clip), (IsIntSplatValueEqual<"int32_t", "-128"> $min_value), (IsIntSplatValueEqual<"int32_t", "127"> $max_value)]>;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sun Dec 10 05:52:02 UTC 2023 - 2.3K bytes - Viewed (0) -
test/typeparam/list.go
next *_ListNum[T] val T } const Clip = 5 // ClippedLargest returns the largest in the list of OrderNums, but a max of 5. // Test use of untyped constant in an expression with a generically-typed parameter func (l *_ListNum[T]) ClippedLargest() T { var max T for p := l; p != nil; p = p.next { if p.val > max && p.val < Clip { max = p.val } } return max } func main() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Dec 03 17:08:51 UTC 2022 - 2.4K bytes - Viewed (0) -
src/cmd/go/internal/vcweb/git.go
} func (h *gitHandler) Handler(dir string, env []string, logger *log.Logger) (http.Handler, error) { if !h.Available() { return nil, ServerNotInstalledError{name: "git"} } baseEnv := append(slices.Clip(env), "GIT_PROJECT_ROOT="+dir, "GIT_HTTP_EXPORT_ALL=1", ) handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { // The Git client sends the requested Git protocol version as a
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 14 19:46:23 UTC 2023 - 1.8K bytes - Viewed (0) -
src/slices/example_test.go
// Output: // 4 // [0 42 -10 8] // 4 // 8 } func ExampleClip() { a := [...]int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} s := a[:4:10] clip := slices.Clip(s) fmt.Println(cap(s)) fmt.Println(clip) fmt.Println(len(clip)) fmt.Println(cap(clip)) // Output: // 10 // [0 1 2 3] // 4 // 4 } func ExampleConcat() { s1 := []int{0, 1, 2, 3} s2 := []int{4, 5, 6}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:28:50 UTC 2024 - 8.1K bytes - Viewed (0) -
src/log/slog/record_test.go
// Adding to both should insert a special Attr in the second. r1AttrsBefore := attrsSlice(r1) r1.AddAttrs(Int("p", 0)) r2.AddAttrs(Int("p", 1)) check(r1, append(slices.Clip(r1AttrsBefore), Int("p", 0))) r1Attrs := attrsSlice(r1) check(r2, append(slices.Clip(r1AttrsBefore), String("!BUG", "AddAttrs unsafely called on copy of Record made without using Record.Clone"), Int("p", 1))) // Adding to a clone is fine. r2 = r1.Clone()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 15:10:55 UTC 2023 - 4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/utils/math_utils.cc
return failure(); } const double fraction = std::frexp(double_multiplier, &shift); quantized_fraction = static_cast<int32_t>(std::round(fraction * (1L << 15))); // Clip extreme values. These are more than enough to overflow int8, the // storage type for quantized values, and the final values will be clamped // no matter what. if (quantized_fraction == (1L << 15)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 05 08:32:43 UTC 2024 - 2.1K bytes - Viewed (0) -
guava/src/com/google/common/escape/ArrayBasedUnicodeEscaper.java
// where {hi,lo} are characters forming a surrogate pair such that: // codePointOf(hi, lo) > safeMax // which would result in the surrogate pair being (wrongly) considered safe. // If we clip the safe range used during the per-character tests so it is // below the values of characters in surrogate pairs, this cannot occur. // This approach does mean that we break out of the fast path code in cases
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 8.5K bytes - Viewed (0)