Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 148 for nelem (0.04 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/utils/bfloat16_type.cc

      return isa<FloatType>(type) && type.getIntOrFloatBitWidth() > 16;
    }
    
    Type ToBfloat16Type(Type type) {
      if (auto shaped = mlir::dyn_cast<ShapedType>(type)) {
        const Type elem = shaped.getElementType();
        if (IsLargeFloatType(elem)) {
          return shaped.clone(BFloat16Type::get(type.getContext()));
        }
      } else if (IsLargeFloatType(type)) {
        return BFloat16Type::get(type.getContext());
      }
      return type;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. src/internal/fmtsort/sort.go

    			}
    		}
    		return 0
    	case reflect.Interface:
    		if c, ok := nilCompare(aVal, bVal); ok {
    			return c
    		}
    		c := compare(reflect.ValueOf(aVal.Elem().Type()), reflect.ValueOf(bVal.Elem().Type()))
    		if c != 0 {
    			return c
    		}
    		return compare(aVal.Elem(), bVal.Elem())
    	default:
    		// Certain types cannot appear as keys (maps, funcs, slices), but be explicit.
    		panic("bad type in compare: " + aType.String())
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:31:45 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  3. src/go/types/conversions.go

    					*cause = "conversion of slice to array requires go1.20 or later"
    				}
    				return false
    			}
    		case *Pointer:
    			if a, _ := under(a.Elem()).(*Array); a != nil {
    				if Identical(s.Elem(), a.Elem()) {
    					if check == nil || check.allowVersion(x, go1_17) {
    						return true
    					}
    					// check != nil
    					if cause != nil {
    						*cause = "conversion of slice to array pointer requires go1.17 or later"
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:51:00 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  4. src/runtime/mcentral.go

    havespan:
    	if !traceDone {
    		trace := traceAcquire()
    		if trace.ok() {
    			trace.GCSweepDone()
    			traceRelease(trace)
    		}
    	}
    	n := int(s.nelems) - int(s.allocCount)
    	if n == 0 || s.freeindex == s.nelems || s.allocCount == s.nelems {
    		throw("span has no free objects")
    	}
    	freeByteBase := s.freeindex &^ (64 - 1)
    	whichByte := freeByteBase / 8
    	// Init alloc bits cache.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  5. src/runtime/cgocheck.go

    		at := (*arraytype)(unsafe.Pointer(typ))
    		for i := uintptr(0); i < at.Len; i++ {
    			if off < at.Elem.Size_ {
    				cgoCheckUsingType(at.Elem, src, off, size)
    			}
    			src = add(src, at.Elem.Size_)
    			skipped := off
    			if skipped > at.Elem.Size_ {
    				skipped = at.Elem.Size_
    			}
    			checked := at.Elem.Size_ - skipped
    			off -= skipped
    			if size <= checked {
    				return
    			}
    			size -= checked
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/typecheck/iimport.go

    // TODO(mdempsky): Store this information directly in the Type's Name.
    var typeSymIdx = make(map[*types.Type][2]int64)
    
    func BaseTypeIndex(t *types.Type) int64 {
    	tbase := t
    	if t.IsPtr() && t.Sym() == nil && t.Elem().Sym() != nil {
    		tbase = t.Elem()
    	}
    	i, ok := typeSymIdx[tbase]
    	if !ok {
    		return -1
    	}
    	if t != tbase {
    		return i[1]
    	}
    	return i[0]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 26 21:52:50 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/internal/typesinternal/recv.go

    // It also reports whether a Pointer was present.
    func ReceiverNamed(recv *types.Var) (isPtr bool, named *types.Named) {
    	t := recv.Type()
    	if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok {
    		isPtr = true
    		t = ptr.Elem()
    	}
    	named, _ = aliases.Unalias(t).(*types.Named)
    	return
    }
    
    // Unpointer returns T given *T or an alias thereof.
    // For all other types it is the identity function.
    // It does not look at underlying types.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  8. utils/utils_test.go

    		name  string
    		elems []string
    		elem  string
    		out   bool
    	}{
    		{"exists", []string{"1", "2", "3"}, "1", true},
    		{"not exists", []string{"1", "2", "3"}, "4", false},
    	}
    	for _, test := range containsTests {
    		t.Run(test.name, func(t *testing.T) {
    			if out := Contains(test.elems, test.elem); test.out != out {
    				t.Errorf("Contains(%v, %s) want: %t, got: %t", test.elems, test.elem, test.out, out)
    			}
    		})
    	}
    }
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Feb 19 03:42:25 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. src/cmd/go/internal/mvs/errors.go

    	for len(stack) > 0 && stack[0].m.Version == "" {
    		stack = stack[1:]
    	}
    
    	if len(stack) == 0 {
    		b.WriteString(e.Err.Error())
    	} else {
    		for _, elem := range stack[:len(stack)-1] {
    			fmt.Fprintf(b, "%s %s\n\t", elem.m, elem.nextReason)
    		}
    		// Ensure that the final module path and version are included as part of the
    		// error message.
    		m := stack[len(stack)-1].m
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 01 17:22:28 UTC 2023
    - 3K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go

    	}
    	if pt.Elem() == errorType {
    		return errors.New("second argument to errors.As should not be *error")
    	}
    	_, ok = pt.Elem().Underlying().(*types.Interface)
    	if ok || types.Implements(pt.Elem(), errorType.Underlying().(*types.Interface)) {
    		return nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 21:52:54 UTC 2023
    - 2.9K bytes
    - Viewed (0)
Back to top