Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 279 for idioms (0.16 sec)

  1. src/runtime/mksizeclasses.go

    	// Nathan Kurz arXiv:1902.01961
    	//
    	// To minimize the risk of introducing errors, we implement the
    	// algorithm exactly as stated, rather than trying to adapt it to
    	// fit typical Go idioms.
    	N := bits.Len(uint(max))
    	var F int
    	if powerOfTwo(d) {
    		F = int(math.Log2(float64(d)))
    		if d != 1<<F {
    			panic("imprecise log2")
    		}
    	} else {
    		for L := 0; ; L++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:31:27 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/loopbce.go

    				min:   min,
    				max:   max,
    				entry: b.Succs[0].b,
    				flags: flags,
    			})
    			b.Logf("found induction variable %v (inc = %v, min = %v, max = %v)\n", ind, inc, min, max)
    		}
    
    		// TODO: other unrolling idioms
    		// for i := 0; i < KNN - KNN % k ; i += k
    		// for i := 0; i < KNN&^(k-1) ; i += k // k a power of 2
    		// for i := 0; i < KNN&(-k) ; i += k // k a power of 2
    	}
    
    	return iv
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 07 17:37:47 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  3. src/regexp/onepass.go

    					continue
    				}
    				return nil
    			}
    		}
    	}
    	// Creates a slightly optimized copy of the original Prog
    	// that cleans up some Prog idioms that block valid onepass programs
    	p = onePassCopy(prog)
    
    	// checkAmbiguity on InstAlts, build onepass Prog if possible
    	p = makeOnePass(p)
    
    	if p != nil {
    		cleanupOnePass(p, prog)
    	}
    	return p
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  4. doc/go_mem.html

    }
    
    func main() {
    	go f()
    	g()
    }
    </pre>
    
    <p>
    it can happen that <code>g</code> prints <code>2</code> and then <code>0</code>.
    </p>
    
    <p>
    This fact invalidates a few common idioms.
    </p>
    
    <p>
    Double-checked locking is an attempt to avoid the overhead of synchronization.
    For example, the <code>twoprint</code> program might be
    incorrectly written as:
    </p>
    
    <pre>
    var a string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 15:54:42 UTC 2024
    - 26.6K bytes
    - Viewed (0)
  5. src/cmd/internal/obj/link.go

    	InParallel    bool // parallel backend phase in effect
    	UseBASEntries bool // use Base Address Selection Entries in location lists and PC ranges
    	IsAsm         bool // is the source assembly language, which may contain surprising idioms (e.g., call tables)
    	Std           bool // is standard library package
    
    	// state for writing objects
    	Text []*LSym
    	Data []*LSym
    
    	// Constant symbols (e.g. $i64.*) are data symbols created late
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  6. src/time/time.go

    // the operation being timed:
    //
    //	start := time.Now()
    //	... operation that takes 20 milliseconds ...
    //	t := time.Now()
    //	elapsed := t.Sub(start)
    //
    // Other idioms, such as [time.Since](start), [time.Until](deadline), and
    // time.Now().Before(deadline), are similarly robust against wall clock
    // resets.
    //
    // The rest of this section gives the precise details of how operations
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 50.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfr/examples/pad/ops_defs.py

        left_padding = split_outputs[0]
        core = split_outputs[1]
        right_padding = split_outputs[2]
        reversed_left_padding = tf.raw_ops.Reverse(tensor=left_padding, dims=rdims)
        reversed_right_padding = tf.raw_ops.Reverse(
            tensor=right_padding, dims=rdims)
        zero_like = tf.raw_ops.ZerosLike(x=core)
        left_offset, _ = tf.raw_ops.SplitV(
            value=zero_like,
            size_splits=[-1, left_padding_size],
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Oct 01 05:00:29 UTC 2021
    - 5.6K bytes
    - Viewed (0)
  8. src/os/read_test.go

    		t.Fatal(err)
    	}
    	defer f.Close()
    	defer Remove(f.Name())
    
    	msg := "Programming today is a race between software engineers striving to " +
    		"build bigger and better idiot-proof programs, and the Universe trying " +
    		"to produce bigger and better idiots. So far, the Universe is winning."
    
    	if err := WriteFile(f.Name(), []byte(msg), 0644); err != nil {
    		t.Fatalf("WriteFile %s: %v", f.Name(), err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 02:36:46 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  9. src/io/ioutil/ioutil_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	filename := f.Name()
    	data := "Programming today is a race between software engineers striving to " +
    		"build bigger and better idiot-proof programs, and the Universe trying " +
    		"to produce bigger and better idiots. So far, the Universe is winning."
    
    	if err := WriteFile(filename, []byte(data), 0644); err != nil {
    		t.Fatalf("WriteFile %s: %v", filename, err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 20:56:32 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  10. tensorflow/c/c_api_test.cc

      const int num_dims = 2;
      int64_t* dims = new int64_t[num_dims];
      int64_t num_elements = 1;
      dims[0] = batch_size;
      dims[1] = 1;
      for (int64_t i = 0; i < num_dims; ++i) {
        num_elements *= dims[i];
      }
      TF_Tensor* t = TF_AllocateTensor(TF_STRING, dims, num_dims,
                                       sizeof(TF_TString) * num_elements);
      delete[] dims;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 96.9K bytes
    - Viewed (0)
Back to top