Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 288 for vmap (0.14 sec)

  1. src/go/parser/testdata/map.go2

    package orderedmap
    
    import "chans"
    
    // Map is an ordered map.
    type Map[K, V any] struct {
    	root    *node[K, V]
    	compare func(K, K) int
    }
    
    // node is the type of a node in the binary tree.
    type node[K, V any] struct {
    	key         K
    	val         V
    	left, right *node[K, V]
    }
    
    // New returns a new map.
    func New[K, V any](compare func(K, K) int) *Map[K, V] {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 24 19:44:06 UTC 2020
    - 2.6K bytes
    - Viewed (0)
  2. src/internal/abi/map.go

    // Copyright 2023 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package abi
    
    // Map constants common to several packages
    // runtime/runtime-gdb.py:MapTypePrinter contains its own copy
    const (
    	// Maximum number of key/elem pairs a bucket can hold.
    	MapBucketCountBits = 3 // log2 of number of elements in a bucket.
    	MapBucketCount     = 1 << MapBucketCountBits
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 20:09:01 UTC 2024
    - 719 bytes
    - Viewed (0)
  3. test/typeparam/map.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"fmt"
    	"reflect"
    	"strconv"
    )
    
    // Map calls the function f on every element of the slice s,
    // returning a new slice of the results.
    func mapper[F, T any](s []F, f func(F) T) []T {
    	r := make([]T, len(s))
    	for i, v := range s {
    		r[i] = f(v)
    	}
    	return r
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 885 bytes
    - Viewed (0)
  4. pkg/typemap/map.go

    import (
    	"reflect"
    
    	"istio.io/istio/pkg/ptr"
    )
    
    // TypeMap provides a map that holds a map of Type -> Value. There can be only a single value per type.
    // The value stored for a type must be of the same type as the key.
    type TypeMap struct {
    	inner map[reflect.Type]any
    }
    
    func NewTypeMap() TypeMap {
    	return TypeMap{make(map[reflect.Type]any)}
    }
    
    func Set[T any](t TypeMap, v T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 16:38:40 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  5. pilot/pkg/model/endpointshards.go

    // Shardz returns a full deep copy of the global map of shards. This should be used only for testing
    // and debugging, as the cloning is expensive.
    func (e *EndpointIndex) Shardz() map[string]map[string]*EndpointShards {
    	e.mu.RLock()
    	defer e.mu.RUnlock()
    	out := make(map[string]map[string]*EndpointShards, len(e.shardsBySvc))
    	for svcKey, v := range e.shardsBySvc {
    		out[svcKey] = make(map[string]*EndpointShards, len(v))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 04:34:37 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  6. cni/pkg/install/testdata/invalid-map.conflist

    Pengyuan Bian <******@****.***> 1625172474 -0700
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 01 20:47:54 UTC 2021
    - 3 bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/core/collection/CaseInsensitiveMapTest.java

            map.putAll(m);
            assertThat(map.get("THREE"), is("3"));
            assertThat(map.get("FOUR"), is("4"));
            assertThat(map.size(), is(4));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testPerformance() throws Exception {
            for (int j = 0; j < 3; ++j) {
                final int num = 100000;
                final Map<String, String> hmap = new HashMap<String, String>();
    Registered: Wed Jun 12 12:50:12 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. src/runtime/runtime_mmap_test.go

    	}
    
    	// Mmap should fail at a half page into the buffer.
    	_, err = runtime.Mmap(unsafe.Pointer(uintptr(b)+ps/2), ps, 0, runtime.MAP_ANON|runtime.MAP_PRIVATE|runtime.MAP_FIXED, -1, 0)
    	if err == 0 {
    		t.Errorf("Mmap should have failed with half-page alignment %d, but succeeded: %v", ps/2, err)
    	}
    
    	// Mmap should succeed at a full page into the buffer.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  9. test/fixedbugs/issue52279.dir/lib.go

    package lib
    
    type FMap[K comparable, V comparable] map[K]V
    
    //go:noinline
    func (m FMap[K, V]) Flip() FMap[V, K] {
    	out := make(FMap[V, K])
    	return out
    }
    
    type MyType uint8
    
    const (
    	FIRST MyType = 0
    )
    
    var typeStrs = FMap[MyType, string]{
    	FIRST: "FIRST",
    }
    
    func (self MyType) String() string {
    	return typeStrs[self]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 10 19:15:31 UTC 2022
    - 321 bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/_builtin/runtime.go

    func makemap64(mapType *byte, hint int64, mapbuf *any) (hmap map[any]any)
    func makemap(mapType *byte, hint int, mapbuf *any) (hmap map[any]any)
    func makemap_small() (hmap map[any]any)
    func mapaccess1(mapType *byte, hmap map[any]any, key *any) (val *any)
    func mapaccess1_fast32(mapType *byte, hmap map[any]any, key uint32) (val *any)
    func mapaccess1_fast64(mapType *byte, hmap map[any]any, key uint64) (val *any)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 10.6K bytes
    - Viewed (0)
Back to top