Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for byteslice (0.18 sec)

  1. src/log/slog/text_handler.go

    			s.appendString(string(data))
    			return nil
    		}
    		if bs, ok := byteSlice(v.any); ok {
    			// As of Go 1.19, this only allocates for strings longer than 32 bytes.
    			s.buf.WriteString(strconv.Quote(string(bs)))
    			return nil
    		}
    		s.appendString(fmt.Sprintf("%+v", v.Any()))
    	default:
    		*s.buf = v.append(*s.buf)
    	}
    	return nil
    }
    
    // byteSlice returns its argument as a []byte if the argument's
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 23 22:56:07 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfr/ir/tfr_types.h

      static TFRTypeStorage* construct(TypeStorageAllocator& allocator, KeyTy key) {
        // Allocate a new storage instance.
        auto byteSize = TFRTypeStorage::totalSizeToAlloc<StringAttr>(key.size());
        auto rawMem = allocator.allocate(byteSize, alignof(TFRTypeStorage));
        auto result = ::new (rawMem) TFRTypeStorage(key.size());
    
        // Copy in the string attributes into the trailing storage.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 05 07:17:01 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  3. tensorflow/cc/experimental/libtf/runtime/runtime.h

      // compatible.
      if (t->ByteSize() != sizeof(T) * data.size()) {
        return tensorflow::errors::InvalidArgument(absl::StrCat(
            "Invalid number of bytes in data buffer\n", "Expected bytes: ",
            t->ByteSize(), "\n", "Actual bytes: ", sizeof(T) * data.size()));
      }
      memcpy(t->Data(), data.data(), t->ByteSize());
      return Tensor(Convert(TaggedValue(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 01 11:18:25 UTC 2022
    - 4.4K bytes
    - Viewed (0)
  4. src/internal/pkgbits/codes.go

    // Note: These values are public and cannot be changed without
    // updating the go/types importers.
    
    const (
    	TypeBasic CodeType = iota
    	TypeNamed
    	TypePointer
    	TypeSlice
    	TypeArray
    	TypeChan
    	TypeMap
    	TypeSignature
    	TypeStruct
    	TypeInterface
    	TypeUnion
    	TypeTypeParam
    )
    
    // A CodeObj distinguishes among go/types.Object encodings.
    type CodeObj int
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 25 16:15:47 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  5. src/crypto/elliptic/nistec.go

    func (curve *nistCurve[Point]) normalizeScalar(scalar []byte) []byte {
    	byteSize := (curve.params.N.BitLen() + 7) / 8
    	if len(scalar) == byteSize {
    		return scalar
    	}
    	s := new(big.Int).SetBytes(scalar)
    	if len(scalar) > byteSize {
    		s.Mod(s, curve.params.N)
    	}
    	out := make([]byte, byteSize)
    	return s.FillBytes(out)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 21 16:19:34 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  6. test/codegen/strings.go

    func CountRunes(s string) int { // Issue #24923
    	// amd64:`.*countrunes`
    	return len([]rune(s))
    }
    
    func CountBytes(s []byte) int {
    	// amd64:-`.*runtime.slicebytetostring`
    	return len(string(s))
    }
    
    func ToByteSlice() []byte { // Issue #24698
    	// amd64:`LEAQ\ttype:\[3\]uint8`
    	// amd64:`CALL\truntime\.newobject`
    	// amd64:-`.*runtime.stringtoslicebyte`
    	return []byte("foo")
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 26 17:17:28 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  7. tensorflow/c/tf_tensor_internal.h

      void Release() override;
    
      DataType Type() const override;
      int NumDims() const override;
      int64_t Dim(int dim_index) const override;
      int64_t NumElements() const override;
      size_t ByteSize() const override;
      void* Data() const override;
      bool IsAligned() const override;
      bool CanMove() const override;
      std::string SummarizeValue() const override;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 24 20:38:55 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  8. src/go/types/instantiate_test.go

    			"T", []Type{Typ[Int]},
    			true,
    		},
    		{
    			"package differenttypeargs; type T[P any] int",
    			"T", []Type{Typ[Int]},
    			"T", []Type{Typ[String]},
    			false,
    		},
    		{
    			"package typeslice; type T[P any] int",
    			"T", []Type{NewSlice(Typ[Int])},
    			"T", []Type{NewSlice(Typ[Int])},
    			true,
    		},
    		{
    			// interface{interface{...}} is equivalent to interface{...}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/instantiate_test.go

    			"T", []Type{Typ[Int]},
    			true,
    		},
    		{
    			"package differenttypeargs; type T[P any] int",
    			"T", []Type{Typ[Int]},
    			"T", []Type{Typ[String]},
    			false,
    		},
    		{
    			"package typeslice; type T[P any] int",
    			"T", []Type{NewSlice(Typ[Int])},
    			"T", []Type{NewSlice(Typ[Int])},
    			true,
    		},
    		{
    			// interface{interface{...}} is equivalent to interface{...}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 28 17:58:07 UTC 2023
    - 5.8K bytes
    - Viewed (0)
Back to top