Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 1,590 for yield (0.04 sec)

  1. src/cmd/link/testdata/linkname/ok.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Use of public API is ok.
    
    package main
    
    import (
    	"iter"
    	"unique"
    )
    
    func seq(yield func(int) bool) {
    	yield(123)
    }
    
    var s = "hello"
    
    func main() {
    	h := unique.Make(s)
    	next, stop := iter.Pull(seq)
    	defer stop()
    	println(h.Value())
    	println(next())
    	println(next())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:05:33 UTC 2024
    - 433 bytes
    - Viewed (0)
  2. src/cmd/link/testdata/linkname/coro.go

    // Linkname coroswitch is not allowed, even if iter.Pull
    // is instantiated in the same package.
    
    package main
    
    import (
    	"iter"
    	"unsafe"
    )
    
    func seq(yield func(int) bool) {
    	yield(123)
    }
    
    func main() {
    	next, stop := iter.Pull(seq)
    	next()
    	stop()
    	coroswitch(nil)
    }
    
    //go:linkname coroswitch runtime.coroswitch
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:05:33 UTC 2024
    - 506 bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/tests/end-to-end-tpu-reshard-variables.mlir

          %control = tf_executor.island {
            "tf.StatefulPartitionedCall"(%arg0) <{config = "", config_proto = "", executor_type = "", f = @partitioned}> : (tensor<*x!tf_type.resource>) -> ()
            tf_executor.yield
          }
          tf_executor.fetch %control : !tf_executor.control
        }
        return
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 13 21:23:47 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  4. test/range2.go

    func (*T) PM() {}
    func (T) M()   {}
    
    func test() {
    	for range T.M { // ERROR "cannot range over T.M \(value of type func\(T\)\): func must be func\(yield func\(...\) bool\): argument is not func"
    	}
    	for range (*T).PM { // ERROR "cannot range over \(\*T\).PM \(value of type func\(\*T\)\): func must be func\(yield func\(...\) bool\): argument is not func"
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 15:32:14 UTC 2023
    - 830 bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/tests/cluster_outlining.mlir

          %3 = "tf_device.cluster"() ({
            %4 = "tf.B"(%2) : (tensor<?xi32>) -> tensor<?xi32>
            tf_device.return %4 : tensor<?xi32>
          }) {} : () -> tensor<?xi32>
    
          // CHECK: tf_executor.yield %[[CLUSTER_OUTPUT]]
          tf_executor.yield %3 : tensor<?xi32>
        }
        tf_executor.fetch %1#0 : tensor<?xi32>
      }
      func.return %0 : tensor<?xi32>
    }
    
    // CHECK: func private @[[CLUSTER]]
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  6. src/internal/trace/testdata/testprog/iter-pull.go

    				break
    			}
    			iterChans[0] <- i
    		}
    	}()
    	wg.Wait()
    
    	// End of traced execution.
    	trace.Stop()
    }
    
    func pullRange(n int) intIter {
    	next, stop := iter.Pull(func(yield func(v int) bool) {
    		for i := range n {
    			yield(i)
    		}
    	})
    	return intIter{next: next, stop: stop}
    }
    
    type intIter struct {
    	next func() (int, bool)
    	stop func()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/tests/raise-custom-ops.mlir

    // CHECK-NEXT:   %[[MY_CUSTOM:.*]] = "tf.MyCustomOp"(%arg1, %arg2) {fused_activation_function = "RELU", int_attr = 2 : i32} : (tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32>
    // CHECK-NEXT:   "tfl.yield"(%[[MY_CUSTOM]]) : (tensor<4xf32>) -> ()
    // CHECK-NEXT: }) {fused_activation_function = "RELU", int_attr = 2 : i32} : (tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32>
    // CHECK-NEXT: %[[CUSTOM_2:.*]] = "tfl.custom_tf"(%[[MUL]], %[[CST]]) ({
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 4K bytes
    - Viewed (0)
  8. src/slices/iter_test.go

    			}
    			ev++
    			cnt++
    		}
    		if cnt != size {
    			t.Errorf("read %d values expected %d", cnt, size)
    		}
    	}
    }
    
    func testSeq(yield func(int) bool) {
    	for i := 0; i < 10; i += 2 {
    		if !yield(i) {
    			return
    		}
    	}
    }
    
    var testSeqResult = []int{0, 2, 4, 6, 8}
    
    func TestAppendSeq(t *testing.T) {
    	s := AppendSeq([]int{1, 2}, testSeq)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:28:50 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  9. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/execution/CharSequenceExtensions.kt

        var startIndex = 0
        while (true) {
            val endIndex = indexOf(delimiter, startIndex) + 1
            if (endIndex == 0) break
            yield(substring(startIndex, endIndex))
            startIndex = endIndex
        }
        if (startIndex <= lastIndex) {
            yield(substring(startIndex))
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  10. src/maps/iter_test.go

    			t.Errorf("Values(%v) = %v, want %v", m, got, want)
    		}
    	}
    }
    
    func TestInsert(t *testing.T) {
    	got := map[int]int{
    		1: 1,
    		2: 1,
    	}
    	Insert(got, func(yield func(int, int) bool) {
    		for i := 0; i < 10; i += 2 {
    			if !yield(i, i+1) {
    				return
    			}
    		}
    	})
    
    	want := map[int]int{
    		1: 1,
    		2: 1,
    	}
    	for i, v := range map[int]int{
    		0: 1,
    		2: 3,
    		4: 5,
    		6: 7,
    		8: 9,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:44:19 UTC 2024
    - 1.9K bytes
    - Viewed (0)
Back to top