Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for encodeInt (0.2 sec)

  1. src/encoding/gob/encgen.go

    		ipart := floatBits(imag(x))
    		state.encodeUint(rpart)
    		state.encodeUint(ipart)`,
    	},
    	{
    		"float32",
    		"Float32",
    		"0",
    		`bits := floatBits(float64(x))
    		state.encodeUint(bits)`,
    	},
    	{
    		"float64",
    		"Float64",
    		"0",
    		`bits := floatBits(x)
    		state.encodeUint(bits)`,
    	},
    	{
    		"int",
    		"Int",
    		"0",
    		`state.encodeInt(int64(x))`,
    	},
    	{
    		"int16",
    		"Int16",
    		"0",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:39:09 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  2. src/encoding/gob/enc_helpers.go

    	if !ok {
    		// It is kind bool but not type bool. TODO: We can handle this unsafely.
    		return false
    	}
    	for _, x := range slice {
    		if x != false || state.sendZero {
    			if x {
    				state.encodeUint(1)
    			} else {
    				state.encodeUint(0)
    			}
    		}
    	}
    	return true
    }
    
    func encComplex64Array(state *encoderState, v reflect.Value) bool {
    	// Can only slice if it is addressable.
    	if !v.CanAddr() {
    		return false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 10 17:50:11 UTC 2018
    - 9.9K bytes
    - Viewed (0)
  3. src/encoding/gob/encoder.go

    	if _, alreadySent := enc.sent[actual]; alreadySent {
    		return false
    	}
    	info, err := getTypeInfo(ut)
    	if err != nil {
    		enc.setError(err)
    		return
    	}
    	// Send the pair (-id, type)
    	// Id:
    	state.encodeInt(-int64(info.id))
    	// Type:
    	enc.encode(state.b, reflect.ValueOf(info.wire), wireTypeUserInfo)
    	enc.writeMessage(w, state.b)
    	if enc.err != nil {
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  4. src/encoding/gob/encode.go

    	state.b.Write(state.buf[bc : uint64Size+1])
    }
    
    // encodeInt writes an encoded signed integer to state.w.
    // The low bit of the encoding says whether to bit complement the (other bits of the)
    // uint to recover the int.
    func (state *encoderState) encodeInt(i int64) {
    	var x uint64
    	if i < 0 {
    		x = uint64(^i<<1) | 1
    	} else {
    		x = uint64(i << 1)
    	}
    	state.encodeUint(x)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 19K bytes
    - Viewed (0)
  5. src/encoding/gob/codec_test.go

    	defer testError(t)
    	b := new(encBuffer)
    	encState := newEncoderState(b)
    	for _, tt := range encodeT {
    		b.Reset()
    		encState.encodeUint(tt.x)
    		if !bytes.Equal(tt.b, b.Bytes()) {
    			t.Errorf("encodeUint: %#x encode: expected % x got % x", tt.x, tt.b, b.Bytes())
    		}
    	}
    	for u := uint64(0); ; u = (u + 1) * 7 {
    		b.Reset()
    		encState.encodeUint(u)
    		decState := newDecodeState(newDecBuffer(b.Bytes()))
    		v := decState.decodeUint()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 19 23:03:14 UTC 2023
    - 36.9K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/url/-Url.kt

    internal fun String.canonicalize(
      pos: Int = 0,
      limit: Int = length,
      encodeSet: String,
      alreadyEncoded: Boolean = false,
      strict: Boolean = false,
      plusIsSpace: Boolean = false,
      unicodeAllowed: Boolean = false,
    ): String {
      return canonicalizeWithCharset(
        pos = pos,
        limit = limit,
        encodeSet = encodeSet,
        alreadyEncoded = alreadyEncoded,
        strict = strict,
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Tue Jan 09 12:33:05 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/FormBody.kt

          ) = apply {
            names +=
              name.canonicalizeWithCharset(
                encodeSet = FORM_ENCODE_SET,
                // Plus is encoded as `%2B`, space is encoded as plus.
                plusIsSpace = false,
                charset = charset,
              )
            values +=
              value.canonicalizeWithCharset(
                encodeSet = FORM_ENCODE_SET,
                // Plus is encoded as `%2B`, space is encoded as plus.
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Tue Jan 09 12:33:05 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

          }
    
        fun username(username: String) =
          apply {
            this.encodedUsername = username.canonicalize(encodeSet = USERNAME_ENCODE_SET)
          }
    
        fun encodedUsername(encodedUsername: String) =
          apply {
            this.encodedUsername =
              encodedUsername.canonicalize(
                encodeSet = USERNAME_ENCODE_SET,
                alreadyEncoded = true,
              )
          }
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Tue Jan 09 12:33:05 UTC 2024
    - 63.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go

    	return c.doEncode(obj, w, memAlloc)
    }
    
    func (c *codec) doEncode(obj runtime.Object, w io.Writer, memAlloc runtime.MemoryAllocator) error {
    	encodeFn := c.encoder.Encode
    	if memAlloc != nil {
    		if encoder, supportsAllocator := c.encoder.(runtime.EncoderWithAllocator); supportsAllocator {
    			encodeFn = func(obj runtime.Object, w io.Writer) error {
    				return encoder.EncodeWithAllocator(obj, w, memAlloc)
    			}
    		} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 03 06:51:04 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/api/v2/testdata/outside_compilation.mlir

          %outputs_83, %control_84 = tf_executor.island wraps "tf.EncodePng"(%outputs_81) {compression = -1 : i64, device = "/device:CPU:0"} : (tensor<*xui8>) -> tensor<*x!tf_type.string>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Oct 19 20:19:45 UTC 2023
    - 21.9K bytes
    - Viewed (0)
Back to top