Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 179 for allocators_ (0.29 sec)

  1. src/cmd/compile/internal/ssa/id.go

    // Copyright 2015 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 ssa
    
    type ID int32
    
    // idAlloc provides an allocator for unique integers.
    type idAlloc struct {
    	last ID
    }
    
    // get allocates an ID and returns it. IDs are always > 0.
    func (a *idAlloc) get() ID {
    	x := a.last
    	x++
    	if x == 1<<31-1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 22 19:21:16 UTC 2016
    - 576 bytes
    - Viewed (0)
  2. test/abi/store_reg_args.go

    // license that can be found in the LICENSE file.
    
    // When the function Store an Arg and also use it in another place,
    // be sure not to generate duplicated OpArgXXXReg values, which confuses
    // the register allocator.
    
    package main
    
    //go:noinline
    //go:registerparams
    func F(x, y float32) {
    	if x < 0 {
    		panic("FAIL")
    	}
    	g = [4]float32{x, y, x, y}
    }
    
    var g [4]float32
    
    func main() {
    	F(1, 2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 30 22:10:19 UTC 2021
    - 587 bytes
    - Viewed (0)
  3. src/internal/coverage/calloc/batchcounteralloc.go

    // Copyright 2022 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 calloc
    
    // This package contains a simple "batch" allocator for allocating
    // coverage counters (slices of uint32 basically), for working with
    // coverage data files. Collections of counter arrays tend to all be
    // live/dead over the same time period, so a good fit for batch
    // allocation.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 28 11:47:16 UTC 2022
    - 754 bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go

    		// don't put the allocator inside the embeddedEncodeFn as that would allocate memory on every call.
    		// instead, we allocate the buffer for the entire watch session and release it when we close the connection.
    		memoryAllocator = runtime.AllocatorPool.Get().(*runtime.Allocator)
    		embeddedEncoder = runtime.NewEncoderWithAllocator(encoderWithAllocator, memoryAllocator)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 14 16:37:25 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  5. pkg/registry/core/service/allocator/utils.go

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package allocator
    
    import (
    	"math/big"
    	"math/bits"
    )
    
    // countBits returns the number of set bits in n
    func countBits(n *big.Int) int {
    	var count int = 0
    	for _, w := range n.Bits() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 01 15:09:56 UTC 2021
    - 816 bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/xla_host_send_recv_device_context_test.cc

        device_alloc_attr.set_on_host(false);
        device_allocator_ = device_->GetAllocator(device_alloc_attr);
      }
    
     protected:
      std::unique_ptr<Device> device_;
      Allocator* host_allocator_;
      Allocator* device_allocator_;
    };
    
    TEST_F(XlaHostSendRecvDeviceContextTest, CopyDeviceTensorToCPU) {
      SetDevice("GPU");
      Tensor origin_cpu_tensor(host_allocator_, DT_FLOAT, TensorShape({2, 2}));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 22:46:36 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  7. test/fixedbugs/issue54343.go

    }
    
    var m = New[int]().M
    
    func New[X any]() *T[X] {
    	p := new(T[X])
    	runtime.SetFinalizer(p, func(*T[X]) { close(done) })
    	return p
    }
    
    type T[X any] [4]int // N.B., [4]int avoids runtime's tiny object allocator
    
    func (*T[X]) M() {}
    
    var done = make(chan int)
    
    func wait() bool {
    	for i := 0; i < 10; i++ {
    		runtime.GC()
    		select {
    		case <-done:
    			return true
    		default:
    		}
    	}
    	return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 11 20:13:07 UTC 2022
    - 695 bytes
    - Viewed (0)
  8. src/runtime/mpagealloc_test.go

    				BaseChunkIdx + chunkIdxBigJump*1 + chunkIdxSmallOffset: {},
    				BaseChunkIdx + chunkIdxBigJump*2:                       {},
    			},
    			hits: []hit{
    				// We first allocate into A to set the page allocator's searchAddr to the
    				// end of that chunk. That is the only purpose A serves.
    				{1, PageBase(BaseChunkIdx, PallocChunkPages-1), 0},
    				// Then, we make a big allocation that doesn't fit into B, and so must be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 06 19:16:48 UTC 2021
    - 32.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/xla_launch_util_test.cc

        TF_CHECK_OK(device_->TryGetDeviceContext(&device_context_));
    
        // Get the host allocator.
        AllocatorAttributes host_alloc_attr;
        host_alloc_attr.set_on_host(true);
        host_allocator_ = device_->GetAllocator(host_alloc_attr);
    
        // Get the device allocator. This should give us an AsyncValueAllocator.
        AllocatorAttributes device_alloc_attr;
        device_alloc_attr.set_on_host(false);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 09:53:30 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/xla_compile_on_demand_op.cc

      std::shared_ptr<se::DeviceMemoryAllocator> allocator_ptr =
          GetAllocator(ctx->device(), stream, platform_info_);
      se::DeviceMemoryAllocator* allocator = allocator_ptr.get();
      XlaComputationLaunchContext launch_context(
          client, allocator, client->default_device_ordinal(),
          /*allocate_xla_tensors=*/platform_info_.xla_device_metadata() != nullptr,
          platform_info_.xla_device_metadata()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 29 08:39:39 UTC 2024
    - 13.4K bytes
    - Viewed (0)
Back to top