Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 277 for yield (0.04 sec)

  1. 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)
  2. 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)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tf_passes.td

        "tf.IfRegion"(%0) ( {
          %2 = "tf.A"() : () -> (tensor<f32>)
          "tf.Yield"() : () -> ()
          }, {
          "tf.Yield"() : () -> ()
         }) { is_stateless = true } : (tensor<i1>) -> ()
        "tf.IfRegion"(%0) ( {
          %2 = "tf.B"() : () -> (tensor<f32>)
          "tf.Yield"() : () -> ()
          }, {
          "tf.Yield"() : () -> ()
          }) { is_stateless = true } : (tensor<i1>) -> ()
        ```
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 99.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/decompose_optionals.cc

        // match the "func.return" within the function.
        //
        // So this would transform
        // func.func @f(...) -> ... {
        //     yield %x : foo
        // }
        // ...
        // func.call @f(...) -> bar
        //
        // to
        //
        // func.func @f(...) -> ... {
        //     yield %x : foo
        // }
        // ...
        // func.call f(...) -> foo
        auto symbol_uses = f.getSymbolUses(f->getParentOp());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  5. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

                  while (!shutdown.get()) {
                    interruptee.interrupt();
                    Thread.yield();
                  }
                }
              });
          this.shutdown = shutdown;
          start();
        }
    
        void shutdown() {
          shutdown.set(true);
          while (this.isAlive()) {
            Thread.yield();
          }
        }
      }
    
      void assertWrapsInterruptedException(RuntimeException e) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  6. cni/pkg/install/install.go

    	// at this moment, and if not, yield. This is to catch other CNIs which might have mutated the file between
    	// the (theoretical) window after we initially install/write, but before we actually start the filewatch.
    	if err := checkValidCNIConfig(in.cfg, in.cniConfigFilepath); err != nil {
    		return nil
    	}
    
    	// If a file we are watching has a change event, yield and let caller check validity
    	select {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 21:45:18 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  7. src/vendor/golang.org/x/crypto/sha3/shake.go

    // N is used to define functions based on cSHAKE, it can be empty when plain cSHAKE is
    // desired. S is a customization byte string used for domain separation - two cSHAKE
    // computations on same input with different S yield unrelated outputs.
    // When N and S are both empty, this is equivalent to NewShake128.
    func NewCShake128(N, S []byte) ShakeHash {
    	if len(N) == 0 && len(S) == 0 {
    		return NewShake128()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/stmt.go

    		switch {
    		case cb.Params().Len() > 2:
    			return bad("func must be func(yield func(...) bool): yield func has too many parameters")
    		case cb.Results().Len() != 1 || !isBoolean(cb.Results().At(0).Type()):
    			return bad("func must be func(yield func(...) bool): yield func does not return bool")
    		}
    		if cb.Params().Len() >= 1 {
    			key = cb.Params().At(0).Type()
    		}
    		if cb.Params().Len() >= 2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  9. src/go/types/stmt.go

    		switch {
    		case cb.Params().Len() > 2:
    			return bad("func must be func(yield func(...) bool): yield func has too many parameters")
    		case cb.Results().Len() != 1 || !isBoolean(cb.Results().At(0).Type()):
    			return bad("func must be func(yield func(...) bool): yield func does not return bool")
    		}
    		if cb.Params().Len() >= 1 {
    			key = cb.Params().At(0).Type()
    		}
    		if cb.Params().Len() >= 2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  10. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/references/KDocReferenceResolver.kt

            val parts = fqName.pathSegments()
            if (parts.isEmpty()) {
                yield(FqNameInterpretation.create(packageParts = emptyList(), classParts = emptyList(), callable = null))
                return@sequence
            }
            for (lastPackagePartIndexExclusive in 0..parts.size) {
                yield(
                    FqNameInterpretation.create(
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 04 08:26:19 UTC 2024
    - 22.3K bytes
    - Viewed (0)
Back to top