Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 2,789 for yield (1.79 sec)

  1. src/runtime/testdata/testprog/coro.go

    	return nil
    }
    
    func iterSimple(yield func(int) bool) {
    	for range 3 {
    		if !yield(5) {
    			return
    		}
    	}
    }
    
    func iterNested(yield func(int) bool) {
    	next, stop := iter.Pull(iterSimple)
    	for {
    		v, ok := next()
    		if ok {
    			if !yield(v) {
    				stop()
    			}
    		} else {
    			return
    		}
    	}
    }
    
    func iterLock(yield func(int) bool) {
    	for range 3 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 19:46:10 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/tests/region-control-flow-to-functional.mlir

            %2 = "tf.Abs"(%asin) : (tensor<*xf32>) -> tensor<*xf32>
            "tf.Yield"(%2) : (tensor<*xf32>) -> ()
          }, {
            %2 = "tf.Neg"(%arg1) : (tensor<*xf32>) -> tensor<*xf32>
            "tf.Yield"(%2) : (tensor<*xf32>) -> ()
          }) { is_stateless = true } :  (tensor<i1>) -> tensor<*xf32>
    
        "tf.Yield"(%1) : (tensor<*xf32>) -> ()
        }, {
        // Outer Else
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 02 11:15:34 UTC 2024
    - 44.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/tests/breakup-islands.mlir

          tf_executor.yield %add1, %add2 : tensor<*xi32>, tensor<*xi32>
        }
        %island2:3 = tf_executor.island(%island1#2) {
          %sub = "tf.Sub"(%arg0, %arg1) : (tensor<*xi32>, tensor<i32>) -> tensor<*xi32>
          %mul = "tf.Mul"(%sub, %arg1) : (tensor<*xi32>, tensor<i32>) -> tensor<*xi32>
          tf_executor.yield %sub, %mul : tensor<*xi32>, tensor<*xi32>
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 31 08:59:10 UTC 2023
    - 28.5K bytes
    - Viewed (0)
  4. src/iter/pull_test.go

    import (
    	"fmt"
    	. "iter"
    	"runtime"
    	"testing"
    )
    
    func count(n int) Seq[int] {
    	return func(yield func(int) bool) {
    		for i := range n {
    			if !yield(i) {
    				break
    			}
    		}
    	}
    }
    
    func squares(n int) Seq2[int, int64] {
    	return func(yield func(int, int64) bool) {
    		for i := range n {
    			if !yield(i, int64(i)*int64(i)) {
    				break
    			}
    		}
    	}
    }
    
    func TestPull(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. src/iter/iter.go

    // When called as seq(yield), seq calls yield(v) for each value v in the sequence,
    // stopping early if yield returns false.
    type Seq[V any] func(yield func(V) bool)
    
    // Seq2 is an iterator over sequences of pairs of values, most commonly key-value pairs.
    // When called as seq(yield), seq calls yield(k, v) for each pair (k, v) in the sequence,
    // stopping early if yield returns false.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/tests/functional-control-flow-to-regions.mlir

      // CHECK-SAME: _then_func_name = "testIf1Then"
      // CHECK-SAME: is_stateless = false
      // CHECK: [[Result0:%.*]] = func.call @testIf1Then
      // CHECK: "tf.Yield"([[Result0]])
      // CHECK: [[Result1:%.*]] = func.call @testIf1Else
      // CHECK: "tf.Yield"([[Result1]])
      // CHECK: _attr0 = 10
      // CHECK-SAME: _attr1 = true
      // CHECK-NOT: attr2 =
      // CHECK-NOT: else_branch
      // CHECK-NOT: then_branch
      // CHECK-SAME: }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Nov 06 21:59:28 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/tests/rewrite_tpu_embedding_ops.mlir

          "tf.Yield"(%0) : (tensor<512x256xf32>) -> ()
        }, {
          "tf.Yield"(%arg2) : (tensor<512x256xf32>) -> ()
        }) { is_stateless = true}: (tensor<i1>) -> tensor<512x256xf32>
        "tf.Yield"(%1) : (tensor<512x256xf32>) -> ()
      }, {
        "tf.Yield"(%arg2) : (tensor<512x256xf32>) -> ()
      }) { is_stateless = true}: (tensor<i1>) -> tensor<512x256xf32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  8. src/runtime/testdata/testprogcgo/coro.go

    	})
    	return err
    }
    
    func iterSimple(yield func(int) bool) {
    	for range 3 {
    		if !yield(5) {
    			return
    		}
    	}
    }
    
    func iterNested(yield func(int) bool) {
    	next, stop := iter.Pull(iterSimple)
    	for {
    		v, ok := next()
    		if ok {
    			if !yield(v) {
    				stop()
    			}
    		} else {
    			return
    		}
    	}
    }
    
    func iterCallback(yield func(int) bool) {
    	for range 3 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 19:46:10 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/tests/split_into_island_per_op.mlir

    func.func @multiple_func_body_ops() {
      tf_executor.graph {
        tf_executor.island {
          "tf.NoOp"() : () -> ()
          tf_executor.yield
        }
        tf_executor.fetch
      }
      tf_executor.graph {
        tf_executor.island {
          "tf.NoOp"() : () -> ()
          tf_executor.yield
        }
        tf_executor.fetch
      }
      func.return
    }
    
    // -----
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 20.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/tests/replicate_to_island_legacy.mlir

            tf_device.return %2 : tensor<i64>
          }
          tf_executor.yield %1#0, %1#1 : tensor<i64>, tensor<i64>
        }
        tf_executor.fetch
      }
      func.return
    }
    
    // CHECK:      tf_executor.island
    // CHECK:      [[CONST_0:%.+]] = "tf.Const"
    // CHECK-SAME: value = dense<1> : tensor<i64>
    // CHECK:      tf_executor.yield [[CONST_0]]
    // CHECK:      tf_executor.island
    // CHECK:      [[CONST_1:%.+]] = "tf.Const"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 31 08:59:10 UTC 2023
    - 9.3K bytes
    - Viewed (0)
Back to top