Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for setMap (0.1 sec)

  1. src/reflect/all_test.go

    	shouldPanic("SetCap", func() { vs.SetCap(10) })
    	shouldPanic("SetLen", func() { vs.SetLen(-1) })
    	shouldPanic("SetCap", func() { vs.SetCap(-1) })
    	shouldPanic("SetCap", func() { vs.SetCap(6) }) // smaller than len
    	vs.SetLen(5)
    	if len(xs) != 5 || cap(xs) != 8 {
    		t.Errorf("after SetLen(5), len, cap = %d, %d, want 5, 8", len(xs), cap(xs))
    	}
    	vs.SetCap(6)
    	if len(xs) != 5 || cap(xs) != 6 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  2. src/reflect/value.go

    	}
    	s.Len = n
    }
    
    // SetCap sets v's capacity to n.
    // It panics if v's Kind is not [Slice] or if n is smaller than the length or
    // greater than the capacity of the slice.
    func (v Value) SetCap(n int) {
    	v.mustBeAssignable()
    	v.mustBe(Slice)
    	s := (*unsafeheader.Slice)(v.ptr)
    	if n < s.Len || n > s.Cap {
    		panic("reflect: slice capacity out of range in SetCap")
    	}
    	s.Cap = n
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/extract_outside_compilation_pass.cc

        std::vector<int>* output_permutation, NodeDef* node_def) {
      string old_name = node_def->op();
      string new_name =
          absl::StrCat(xla_cluster_name_, "_", new_function_name_, "_", old_name);
      node_def->set_op(new_name);
      node_def->set_name(new_name);
    
      // Later we will run PruneForReverseReachability(), so make sure all original
      // nodes are reachable from sink node and won't be removed.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 104.7K bytes
    - Viewed (0)
Back to top