Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for byteslice (0.19 sec)

  1. src/database/sql/convert_test.go

    		{s: 123, d: &scanint, wantint: 123},
    		{s: someTime, d: &scantime, wanttime: someTime},
    
    		// To strings
    		{s: "string", d: &scanstr, wantstr: "string"},
    		{s: []byte("byteslice"), d: &scanstr, wantstr: "byteslice"},
    		{s: 123, d: &scanstr, wantstr: "123"},
    		{s: int8(123), d: &scanstr, wantstr: "123"},
    		{s: int64(123), d: &scanstr, wantstr: "123"},
    		{s: uint8(123), d: &scanstr, wantstr: "123"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 10 20:23:22 UTC 2024
    - 17K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/order.go

    		o.exprList(n.List)
    
    		if len(n.List) > 5 {
    			t := types.NewArray(types.Types[types.TSTRING], int64(len(n.List)))
    			n.Prealloc = o.newTemp(t, false)
    		}
    
    		// Mark string(byteSlice) arguments to reuse byteSlice backing
    		// buffer during conversion. String concatenation does not
    		// memorize the strings for later use, so it is safe.
    		// However, we can do it only if there is at least one non-empty string literal.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  3. src/net/textproto/reader.go

    		} else if !upper && 'A' <= c && c <= 'Z' {
    			c += toLower
    		}
    		a[i] = c
    		upper = c == '-' // for next time
    	}
    	commonHeaderOnce.Do(initCommonHeader)
    	// The compiler recognizes m[string(byteSlice)] as a special
    	// case, so a copy of a's bytes into a new string does not
    	// happen in this map lookup:
    	if v := commonHeader[string(a)]; v != "" {
    		return v, true
    	}
    	return string(a), true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/switch.go

    	// convert switch {...} to switch true {...}
    	if cond == nil {
    		cond = ir.NewBool(base.Pos, true)
    		cond = typecheck.Expr(cond)
    		cond = typecheck.DefaultLit(cond, nil)
    	}
    
    	// Given "switch string(byteslice)",
    	// with all cases being side-effect free,
    	// use a zero-cost alias of the byte slice.
    	// Do this before calling walkExpr on cond,
    	// because walkExpr will lower the string
    	// conversion into a runtime call.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  5. src/debug/dwarf/type.go

    // the zero value is used.
    type CommonType struct {
    	ByteSize int64  // size of value of this type, in bytes
    	Name     string // name that can be used to refer to type
    }
    
    func (c *CommonType) Common() *CommonType { return c }
    
    func (c *CommonType) Size() int64 { return c.ByteSize }
    
    // Basic types
    
    // A BasicType holds fields common to all basic types.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 21.9K bytes
    - Viewed (0)
  6. tensorflow/c/tf_tensor.cc

    int64_t TF_Dim(const TF_Tensor* t, int dim_index) {
      return t->tensor->Dim(dim_index);
    }
    
    size_t TF_TensorByteSize(const TF_Tensor* t) { return t->tensor->ByteSize(); }
    
    void* TF_TensorData(const TF_Tensor* t) { return t->tensor->Data(); }
    
    int64_t TF_TensorElementCount(const TF_Tensor* t) {
      int64_t result = 1;
      int rank = TF_NumDims(t);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go

    // returned size will not be correct if RawJSOn is set on unk.
    func estimateUnknownSize(unk *runtime.Unknown, byteSize uint64) uint64 {
    	size := uint64(unk.Size())
    	// protobuf uses 1 byte for the tag, a varint for the length of the array (at most 8 bytes - uint64 - here),
    	// and the size of the array.
    	size += 1 + 8 + byteSize
    	return size
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 23 13:38:23 UTC 2022
    - 17.8K bytes
    - Viewed (0)
  8. internal/grid/msg_gen.go

    	o = bts
    	return
    }
    
    // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
    func (z *connectReq) Msgsize() (s int) {
    	s = 1 + 3 + msgp.ArrayHeaderSize + (16 * (msgp.ByteSize)) + 5 + msgp.StringPrefixSize + len(z.Host)
    	return
    }
    
    // DecodeMsg implements msgp.Decodable
    func (z *connectResp) DecodeMsg(dc *msgp.Reader) (err error) {
    	var field []byte
    	_ = field
    	var zb0001 uint32
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Nov 21 01:09:35 UTC 2023
    - 18.8K bytes
    - Viewed (0)
  9. src/go/internal/gcimporter/ureader.go

    	case pkgbits.TypeMap:
    		return types.NewMap(r.typ(), r.typ())
    	case pkgbits.TypePointer:
    		return types.NewPointer(r.typ())
    	case pkgbits.TypeSignature:
    		return r.signature(nil, nil, nil)
    	case pkgbits.TypeSlice:
    		return types.NewSlice(r.typ())
    	case pkgbits.TypeStruct:
    		return r.structType()
    	case pkgbits.TypeInterface:
    		return r.interfaceType()
    	case pkgbits.TypeUnion:
    		return r.unionType()
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  10. tensorflow/cc/experimental/libtf/object.h

        return tensorflow::errors::InvalidArgument(absl::StrCat(
            "Mismatched number of elements: \n", "Expected: ", data.size(), "\n",
            "Actual: ", t->NumElements(), "\n"));
      }
      memcpy(data.data(), t->Data(), t->ByteSize());
      return ::tensorflow::OkStatus();
    }
    
    /// @brief The Tuple class for holding TaggedValues of type TUPLE.
    class Tuple : public Handle {
     public:
      /// Constructs a Tuple handle.
      template <class... T>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 11 08:05:36 UTC 2023
    - 23.6K bytes
    - Viewed (0)
Back to top