Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 179 for allocators_ (0.26 sec)

  1. pkg/registry/core/service/allocator/bitmap_test.go

    limitations under the License.
    */
    
    package allocator
    
    import (
    	"testing"
    
    	"k8s.io/apimachinery/pkg/util/sets"
    )
    
    func TestAllocate(t *testing.T) {
    	testCases := []struct {
    		name      string
    		allocator func(max int, rangeSpec string, reserved int) *AllocationBitmap
    		max       int
    		reserved  int
    	}{
    		{
    			name:      "NewAllocationMap",
    			allocator: NewAllocationMapWithOffset,
    			max:       32,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 10 08:56:31 UTC 2022
    - 13.3K bytes
    - Viewed (0)
  2. pkg/registry/core/service/ipallocator/controller/repair.go

    	err := wait.PollImmediate(time.Second, 10*time.Second, func() (bool, error) {
    		for family, allocator := range c.allocatorByFamily {
    			// get snapshot if it is not there
    			if _, ok := snapshotByFamily[family]; !ok {
    				snapshot, err := allocator.Get()
    				if err != nil {
    					return false, err
    				}
    
    				snapshotByFamily[family] = snapshot
    			}
    		}
    		return true, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 30 15:46:06 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  3. pkg/registry/core/service/ipallocator/cidrallocator_test.go

    		allocator, err := r.getAllocator(netutils.ParseIPSloppy("10.0.0.11"))
    		if err != nil {
    			return false, nil
    		}
    		allocator.ipAddressSynced = func() bool { return true }
    		return allocator.ready.Load(), nil
    	})
    	if err != nil {
    		t.Fatal(err)
    	}
    	// allocate one IP from the new allocator
    	err = r.Allocate(netutils.ParseIPSloppy("10.0.0.11"))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:06 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  4. pkg/registry/core/service/ipallocator/ipallocator.go

    	return len(ips)
    }
    
    // for testing, it assumes this is the allocator is unique for the ipFamily
    func (a *Allocator) Free() int {
    	return int(a.size) - a.Used()
    }
    
    // Destroy
    func (a *Allocator) Destroy() {
    }
    
    // DryRun
    func (a *Allocator) DryRun() Interface {
    	return dryRunAllocator{a}
    }
    
    // EnableMetrics
    func (a *Allocator) EnableMetrics() {
    	registerMetrics()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17K bytes
    - Viewed (0)
  5. pkg/controller/nodeipam/ipam/cidr_allocator.go

    	"k8s.io/klog/v2"
    )
    
    // CIDRAllocatorType is the type of the allocator to use.
    type CIDRAllocatorType string
    
    const (
    	// RangeAllocatorType is the allocator that uses an internal CIDR
    	// range allocator to do node CIDR range allocations.
    	RangeAllocatorType CIDRAllocatorType = "RangeAllocator"
    	// CloudAllocatorType is the allocator that uses cloud platform
    	// support to do node CIDR range allocations.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 13:03:57 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util_test.cc

      return new PJRT_Buffer{std::move(*buffer), c_api_client->pjrt_c_client()};
    }
    
    TEST(TensorPjRtBufferUtilTest, GetPjRtCBufferFromTensorNoBuffer) {
      auto allocator = std::make_unique<AsyncValueAllocator>();
      tensorflow::Tensor tensor(allocator.get(), DT_FLOAT, {1});
    
      EXPECT_THAT(
          GetPjRtCBufferFromTensor(&tensor),
          StatusIs(error::INTERNAL, HasSubstr(absl::StrCat(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 01 16:29:40 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfrt/tests/ir/fallback_opt.mlir

    func.func @custom_allocator(%ch: !tfrt.chain, %arg: !tfrt_fallback.tf_tensor, %allocator: !tfrt_fallback.tf_allocator) -> (!tfrt.chain, !tfrt_fallback.tf_tensor) {
      // CHECK: tfrt_fallback_async.executeop.allocator(%{{.*}}) key(200) cost(100) device("cpu") "tf.Cast"(%{{.*}}) {Truncate = false, T = f32} : 1
      %0 = tfrt_fallback_async.executeop.allocator(%allocator) key(200) cost(100) device("cpu") "tf.Cast"(%arg) {Truncate = false, T = f32} : 1
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 25 11:03:04 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/cache.go

    	// Reusable regalloc state.
    	regallocValues []valState
    
    	ValueToProgAfter []*obj.Prog
    	debugState       debugState
    
    	Liveness interface{} // *gc.livenessFuncCache
    
    	// Free "headers" for use by the allocators in allocators.go.
    	// Used to put slices in sync.Pools without allocation.
    	hdrValueSlice []*[]*Value
    	hdrInt64Slice []*[]int64
    }
    
    func (c *Cache) Reset() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 15 23:00:54 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  9. pkg/registry/core/service/allocator/storage/storage.go

    	destroyFn func()
    }
    
    // Etcd implements allocator.Interface and rangeallocation.RangeRegistry
    var _ allocator.Interface = &Etcd{}
    var _ rangeallocation.RangeRegistry = &Etcd{}
    
    // NewEtcd returns an allocator that is backed by Etcd and can manage
    // persisting the snapshot state of allocation after each allocation is made.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  10. pkg/registry/core/service/ipallocator/storage/storage_test.go

    	"k8s.io/kubernetes/pkg/registry/core/service/allocator"
    	allocatorstore "k8s.io/kubernetes/pkg/registry/core/service/allocator/storage"
    	"k8s.io/kubernetes/pkg/registry/core/service/ipallocator"
    	"k8s.io/kubernetes/pkg/registry/registrytest"
    	netutils "k8s.io/utils/net"
    )
    
    func newStorage(t *testing.T) (*etcd3testing.EtcdTestServer, ipallocator.Interface, allocator.Interface, storage.Interface, factory.DestroyFunc) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 5.9K bytes
    - Viewed (0)
Back to top