Home
last modified time | relevance | path

Searched refs:heap (Results 1 – 25 of 541) sorted by relevance

12345678910>>...22

/third_party/mesa3d/src/gallium/drivers/d3d12/
Dd3d12_descriptor_pool.cpp49 ID3D12DescriptorHeap *heap; member
65 struct d3d12_descriptor_heap *heap = CALLOC_STRUCT(d3d12_descriptor_heap); in d3d12_descriptor_heap_new() local
67 heap->desc.NumDescriptors = num_descriptors; in d3d12_descriptor_heap_new()
68 heap->desc.Type = type; in d3d12_descriptor_heap_new()
69 heap->desc.Flags = flags; in d3d12_descriptor_heap_new()
70 if (FAILED(dev->CreateDescriptorHeap(&heap->desc, in d3d12_descriptor_heap_new()
71 IID_PPV_ARGS(&heap->heap)))) { in d3d12_descriptor_heap_new()
72 FREE(heap); in d3d12_descriptor_heap_new()
76 heap->dev = dev; in d3d12_descriptor_heap_new()
77 heap->desc_size = dev->GetDescriptorHandleIncrementSize(type); in d3d12_descriptor_heap_new()
[all …]
Dd3d12_descriptor_pool.h35 struct d3d12_descriptor_heap *heap; member
41 return (handle->heap != NULL); in d3d12_descriptor_handle_is_allocated()
71 d3d12_descriptor_heap_free(struct d3d12_descriptor_heap *heap);
74 d3d12_descriptor_heap_get(struct d3d12_descriptor_heap *heap);
77 d2d12_descriptor_heap_get_next_handle(struct d3d12_descriptor_heap *heap,
81 d3d12_descriptor_heap_get_remaining_handles(struct d3d12_descriptor_heap *heap);
84 d3d12_descriptor_heap_alloc_handle(struct d3d12_descriptor_heap *heap,
88 d3d12_descriptor_heap_append_handles(struct d3d12_descriptor_heap *heap,
93 d3d12_descriptor_heap_clear(struct d3d12_descriptor_heap *heap);
/third_party/python/Modules/
D_heapqmodule.c21 siftdown(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos) in siftdown() argument
27 assert(PyList_Check(heap)); in siftdown()
28 size = PyList_GET_SIZE(heap); in siftdown()
36 arr = _PyList_ITEMS(heap); in siftdown()
48 if (size != PyList_GET_SIZE(heap)) { in siftdown()
55 arr = _PyList_ITEMS(heap); in siftdown()
66 siftup(PyListObject *heap, Py_ssize_t pos) in siftup() argument
72 assert(PyList_Check(heap)); in siftup()
73 endpos = PyList_GET_SIZE(heap); in siftup()
81 arr = _PyList_ITEMS(heap); in siftup()
[all …]
/third_party/mbedtls/library/
Dmemory_buffer_alloc.c82 static buffer_alloc_ctx heap; variable
108 memory_header *cur = heap.first; in debug_chain()
118 cur = heap.first_free; in debug_chain()
175 memory_header *prv = heap.first, *cur; in verify_chain()
186 if( heap.first->prev != NULL ) in verify_chain()
195 cur = heap.first->next; in verify_chain()
226 memory_header *new, *cur = heap.first_free; in buffer_alloc_calloc()
235 if( heap.buf == NULL || heap.first == NULL ) in buffer_alloc_calloc()
274 heap.alloc_count++; in buffer_alloc_calloc()
289 heap.first_free = cur->next_free; in buffer_alloc_calloc()
[all …]
/third_party/harfbuzz/src/
Dhb-priority-queue.hh47 hb_vector_t<item_t> heap; member
50 void init () { heap.init (); } in init()
52 void fini () { heap.fini (); } in fini()
54 void reset () { heap.resize (0); } in reset()
56 bool in_error () const { return heap.in_error (); } in in_error()
60 heap.push (item_t (priority, value)); in insert()
61 bubble_up (heap.length - 1); in insert()
66 item_t result = heap[0]; in pop_minimum()
68 heap[0] = heap[heap.length - 1]; in pop_minimum()
69 heap.shrink (heap.length - 1); in pop_minimum()
[all …]
/third_party/skia/third_party/externals/harfbuzz/src/
Dhb-priority-queue.hh47 hb_vector_t<item_t> heap; member
50 void init () { heap.init (); } in init()
52 void fini () { heap.fini (); } in fini()
54 void reset () { heap.resize (0); } in reset()
56 bool in_error () const { return heap.in_error (); } in in_error()
60 heap.push (item_t (priority, value)); in insert()
61 bubble_up (heap.length - 1); in insert()
66 item_t result = heap[0]; in pop_minimum()
68 heap[0] = heap[heap.length - 1]; in pop_minimum()
69 heap.shrink (heap.length - 1); in pop_minimum()
[all …]
/third_party/libuv/src/
Dheap-inl.h40 struct heap { struct
50 HEAP_EXPORT(void heap_init(struct heap* heap)); argument
51 HEAP_EXPORT(struct heap_node* heap_min(const struct heap* heap));
52 HEAP_EXPORT(void heap_insert(struct heap* heap,
55 HEAP_EXPORT(void heap_remove(struct heap* heap,
58 HEAP_EXPORT(void heap_dequeue(struct heap* heap, heap_compare_fn less_than));
62 HEAP_EXPORT(void heap_init(struct heap* heap)) { in HEAP_EXPORT() argument
63 heap->min = NULL; in HEAP_EXPORT()
64 heap->nelts = 0; in HEAP_EXPORT()
67 HEAP_EXPORT(struct heap_node* heap_min(const struct heap* heap)) { in HEAP_EXPORT() argument
[all …]
/third_party/python/Lib/
Dheapq.py130 def heappush(heap, item): argument
132 heap.append(item)
133 _siftdown(heap, 0, len(heap)-1)
135 def heappop(heap): argument
137 lastelt = heap.pop() # raises appropriate IndexError if heap is empty
138 if heap:
139 returnitem = heap[0]
140 heap[0] = lastelt
141 _siftup(heap, 0)
145 def heapreplace(heap, item): argument
[all …]
/third_party/skia/tests/
DTDPQueueTest.cpp15 SkTDPQueue<int, intless> heap; in simple_test() local
16 REPORTER_ASSERT(reporter, 0 == heap.count()); in simple_test()
18 heap.insert(0); in simple_test()
19 REPORTER_ASSERT(reporter, 1 == heap.count()); in simple_test()
20 REPORTER_ASSERT(reporter, 0 == heap.peek()); in simple_test()
21 heap.pop(); in simple_test()
22 REPORTER_ASSERT(reporter, 0 == heap.count()); in simple_test()
24 heap.insert(0); in simple_test()
25 heap.insert(1); in simple_test()
26 REPORTER_ASSERT(reporter, 2 == heap.count()); in simple_test()
[all …]
/third_party/flutter/skia/tests/
DTDPQueueTest.cpp15 SkTDPQueue<int, intless> heap; in simple_test() local
16 REPORTER_ASSERT(reporter, 0 == heap.count()); in simple_test()
18 heap.insert(0); in simple_test()
19 REPORTER_ASSERT(reporter, 1 == heap.count()); in simple_test()
20 REPORTER_ASSERT(reporter, 0 == heap.peek()); in simple_test()
21 heap.pop(); in simple_test()
22 REPORTER_ASSERT(reporter, 0 == heap.count()); in simple_test()
24 heap.insert(0); in simple_test()
25 heap.insert(1); in simple_test()
26 REPORTER_ASSERT(reporter, 2 == heap.count()); in simple_test()
[all …]
/third_party/mesa3d/src/util/
Du_mm.c34 u_mmDumpMemInfo(const struct mem_block *heap) in u_mmDumpMemInfo() argument
36 debug_printf("Memory heap %p:\n", (void *) heap); in u_mmDumpMemInfo()
37 if (heap == NULL) { in u_mmDumpMemInfo()
44 for (p = heap->next; p != heap; p = p->next) { in u_mmDumpMemInfo()
58 for (p = heap->next_free; p != heap; p = p->next_free) { in u_mmDumpMemInfo()
72 struct mem_block *heap, *block; in u_mmInit() local
77 heap = CALLOC_STRUCT(mem_block); in u_mmInit()
78 if (!heap) in u_mmInit()
83 FREE(heap); in u_mmInit()
87 heap->next = block; in u_mmInit()
[all …]
Dvma.c46 util_vma_heap_init(struct util_vma_heap *heap, in util_vma_heap_init() argument
49 list_inithead(&heap->holes); in util_vma_heap_init()
50 util_vma_heap_free(heap, start, size); in util_vma_heap_init()
53 heap->alloc_high = true; in util_vma_heap_init()
57 util_vma_heap_finish(struct util_vma_heap *heap) in util_vma_heap_finish() argument
59 util_vma_foreach_hole_safe(hole, heap) in util_vma_heap_finish()
65 util_vma_heap_validate(struct util_vma_heap *heap) in util_vma_heap_validate() argument
68 util_vma_foreach_hole(hole, heap) { in util_vma_heap_validate()
72 if (&hole->link == heap->holes.next) { in util_vma_heap_validate()
91 #define util_vma_heap_validate(heap) argument
[all …]
/third_party/libdrm/intel/
Dmm.c32 drm_private void mmDumpMemInfo(const struct mem_block *heap) in mmDumpMemInfo() argument
34 drmMsg("Memory heap %p:\n", (void *)heap); in mmDumpMemInfo()
35 if (heap == 0) { in mmDumpMemInfo()
40 for (p = heap->next; p != heap; p = p->next) { in mmDumpMemInfo()
48 for (p = heap->next_free; p != heap; p = p->next_free) { in mmDumpMemInfo()
60 struct mem_block *heap, *block; in mmInit() local
65 heap = (struct mem_block *)calloc(1, sizeof(struct mem_block)); in mmInit()
66 if (!heap) in mmInit()
71 free(heap); in mmInit()
75 heap->next = block; in mmInit()
[all …]
/third_party/node/lib/internal/
Dpriority_queue.js35 const heap = this[kHeap];
37 heap[pos] = value;
39 if (heap.length === pos)
40 heap.length *= 2;
52 const heap = this[kHeap];
54 const item = heap[pos];
58 if (childIndex > size || compare(heap[pos * 2], heap[childIndex]) < 0)
60 const child = heap[childIndex];
65 heap[pos] = child;
68 heap[pos] = item;
[all …]
/third_party/python/Modules/clinic/
D_heapqmodule.c.h15 _heapq_heappush_impl(PyObject *module, PyObject *heap, PyObject *item);
21 PyObject *heap; in _heapq_heappush() local
31 heap = args[0]; in _heapq_heappush()
33 return_value = _heapq_heappush_impl(module, heap, item); in _heapq_heappush()
49 _heapq_heappop_impl(PyObject *module, PyObject *heap);
55 PyObject *heap; in _heapq_heappop() local
61 heap = arg; in _heapq_heappop()
62 return_value = _heapq_heappop_impl(module, heap); in _heapq_heappop()
86 _heapq_heapreplace_impl(PyObject *module, PyObject *heap, PyObject *item);
92 PyObject *heap; in _heapq_heapreplace() local
[all …]
/third_party/vk-gl-cts/framework/delibs/depool/
DdePoolHeap.h67 DE_INLINE int TYPENAME##_getNumElements (const TYPENAME* heap) DE_UNUSED_FUNCTION; \
68 DE_INLINE deBool TYPENAME##_reserve (DE_PTR_TYPE(TYPENAME) heap, int capacity) DE_UNUSED_FUNCTIO…
69 DE_INLINE void TYPENAME##_reset (DE_PTR_TYPE(TYPENAME) heap) DE_UNUSED_FUNCTION; \
70 DE_INLINE void TYPENAME##_moveDown (DE_PTR_TYPE(TYPENAME) heap, int ndx) DE_UNUSED_FUNCTION; \
71 DE_INLINE void TYPENAME##_moveUp (DE_PTR_TYPE(TYPENAME) heap, int ndx) DE_UNUSED_FUNCTION; \
72 DE_INLINE deBool TYPENAME##_push (DE_PTR_TYPE(TYPENAME) heap, VALUETYPE elem) DE_UNUSED_FUNCTION…
73 DE_INLINE VALUETYPE TYPENAME##_popMin (DE_PTR_TYPE(TYPENAME) heap) DE_UNUSED_FUNCTION; \
77 DE_PTR_TYPE(TYPENAME) heap = DE_POOL_NEW(pool, TYPENAME); \
78 if (!heap) \
80 heap->array = TYPENAME##Array_create(pool); \
[all …]
DdePoolHeap.c62 TestHeap* heap = TestHeap_create(pool); in dePoolHeap_selfTest() local
65 TestHeap_push(heap, HeapItem_create(10, 10)); in dePoolHeap_selfTest()
66 TestHeap_push(heap, HeapItem_create(0, 10)); in dePoolHeap_selfTest()
67 TestHeap_push(heap, HeapItem_create(20, 10)); in dePoolHeap_selfTest()
68 DE_TEST_ASSERT(TestHeap_getNumElements(heap) == 3); in dePoolHeap_selfTest()
70 DE_TEST_ASSERT(TestHeap_popMin(heap).priority == 0); in dePoolHeap_selfTest()
71 DE_TEST_ASSERT(TestHeap_popMin(heap).priority == 10); in dePoolHeap_selfTest()
72 DE_TEST_ASSERT(TestHeap_popMin(heap).priority == 20); in dePoolHeap_selfTest()
73 DE_TEST_ASSERT(TestHeap_getNumElements(heap) == 0); in dePoolHeap_selfTest()
80 TestHeap_push(heap, HeapItem_create(i, -i)); in dePoolHeap_selfTest()
[all …]
/third_party/mesa3d/src/imagination/vulkan/winsys/
Dpvr_winsys_helper.c77 struct pvr_winsys_heap *const heap) in pvr_winsys_helper_winsys_heap_init() argument
100 heap->ws = ws; in pvr_winsys_helper_winsys_heap_init()
101 heap->base_addr = base_address; in pvr_winsys_helper_winsys_heap_init()
102 heap->reserved_addr = reserved_address; in pvr_winsys_helper_winsys_heap_init()
104 heap->size = size; in pvr_winsys_helper_winsys_heap_init()
105 heap->reserved_size = reserved_size; in pvr_winsys_helper_winsys_heap_init()
107 heap->page_size = 1 << log2_page_size; in pvr_winsys_helper_winsys_heap_init()
108 heap->log2_page_size = log2_page_size; in pvr_winsys_helper_winsys_heap_init()
110 util_vma_heap_init(&heap->vma_heap, vma_heap_begin_addr.addr, vma_heap_size); in pvr_winsys_helper_winsys_heap_init()
112 heap->vma_heap.alloc_high = false; in pvr_winsys_helper_winsys_heap_init()
[all …]
/third_party/mesa3d/src/gallium/drivers/nouveau/
Dnouveau_heap.c29 nouveau_heap_init(struct nouveau_heap **heap, in nouveau_heap_init() argument
40 *heap = r; in nouveau_heap_init()
45 nouveau_heap_destroy(struct nouveau_heap **heap) in nouveau_heap_destroy() argument
47 if (!*heap) in nouveau_heap_destroy()
49 free(*heap); in nouveau_heap_destroy()
50 *heap = NULL; in nouveau_heap_destroy()
54 nouveau_heap_alloc(struct nouveau_heap *heap, unsigned size, void *priv, in nouveau_heap_alloc() argument
59 if (!heap || !size || !res || *res) in nouveau_heap_alloc()
62 while (heap) { in nouveau_heap_alloc()
63 if (!heap->in_use && heap->size >= size) { in nouveau_heap_alloc()
[all …]
/third_party/skia/src/gpu/d3d/
DGrD3DDescriptorTableManager.cpp33 void GrD3DDescriptorTableManager::recycle(Heap* heap) { in recycle() argument
35 sk_sp<Heap> wrappedHeap(heap); in recycle()
37 SkASSERT(heap); in recycle()
38 switch (heap->type()) { in recycle()
54 std::unique_ptr<GrD3DDescriptorHeap> heap = in Make() local
57 if (!heap) { in Make()
61 return sk_sp< GrD3DDescriptorTableManager::Heap>(new Heap(gpu, heap, type, descriptorCount)); in Make()
84 sk_sp<Heap> heap = Heap::Make(gpu, fHeapType, fCurrentHeapDescriptorCount); in HeapPool() local
85 fDescriptorHeaps.push_back(heap); in HeapPool()
95 auto& heap = fDescriptorHeaps[fDescriptorHeaps.size() - 1]; in allocateTable() local
[all …]
/third_party/python/Lib/test/
Dtest_heapq.py52 heap = []
54 self.check_invariant(heap)
58 self.module.heappush(heap, item)
59 self.check_invariant(heap)
61 while heap:
62 item = self.module.heappop(heap)
63 self.check_invariant(heap)
78 def check_invariant(self, heap): argument
80 for pos, item in enumerate(heap):
83 self.assertTrue(heap[parentpos] <= item)
[all …]
/third_party/mesa3d/src/gallium/include/winsys/
Dradeon_winsys.h755 static inline enum radeon_bo_domain radeon_domain_from_heap(int heap) in radeon_domain_from_heap() argument
757 assert(heap >= 0); in radeon_domain_from_heap()
759 if (heap & RADEON_HEAP_BIT_VRAM) in radeon_domain_from_heap()
765 static inline unsigned radeon_flags_from_heap(int heap) in radeon_flags_from_heap() argument
767 assert(heap >= 0); in radeon_flags_from_heap()
771 if (heap & RADEON_HEAP_BIT_READ_ONLY) in radeon_flags_from_heap()
773 if (heap & RADEON_HEAP_BIT_32BIT) in radeon_flags_from_heap()
775 if (heap & RADEON_HEAP_BIT_ENCRYPTED) in radeon_flags_from_heap()
778 if (heap & RADEON_HEAP_BIT_VRAM) { in radeon_flags_from_heap()
780 if (heap & RADEON_HEAP_BIT_NO_CPU_ACCESS) in radeon_flags_from_heap()
[all …]
/third_party/python/Doc/library/
Dheapq.rst16 This module provides an implementation of the heap queue algorithm, also known
21 ``heap[k] <= heap[2*k+1]`` and ``heap[k] <= heap[2*k+2]`` for all *k*, counting
23 considered to be infinite. The interesting property of a heap is that its
24 smallest element is always the root, ``heap[0]``.
26 The API below differs from textbook heap algorithms in two aspects: (a) We use
30 item, not the largest (called a "min heap" in textbooks; a "max heap" is more
33 These two make it possible to view the heap as a regular Python list without
34 surprises: ``heap[0]`` is the smallest item, and ``heap.sort()`` maintains the
35 heap invariant!
37 To create a heap, use a list initialized to ``[]``, or you can transform a
[all …]
/third_party/mesa3d/src/microsoft/vulkan/
Ddzn_abi_helper.h81 dzn_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(ID3D12DescriptorHeap *heap) in dzn_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart() argument
85 ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap, &ret); in dzn_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart()
87 ret = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap); in dzn_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart()
89 …LE (STDMETHODCALLTYPE *)(ID3D12DescriptorHeap *))heap->lpVtbl->GetCPUDescriptorHandleForHeapStart)… in dzn_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart()
95 dzn_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(ID3D12DescriptorHeap *heap) in dzn_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart() argument
99 ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(heap, &ret); in dzn_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart()
101 ret = ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(heap); in dzn_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart()
103 …LE (STDMETHODCALLTYPE *)(ID3D12DescriptorHeap *))heap->lpVtbl->GetGPUDescriptorHandleForHeapStart)… in dzn_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart()
/third_party/iowow/src/utils/
Diwpool.c14 void *heap; member
22 char *heap; /**< Current pool heap ptr */ member
40 pool->unit->heap = malloc(siz); in iwpool_create()
41 if (!pool->unit->heap) { in iwpool_create()
45 pool->heap = pool->unit->heap; in iwpool_create()
54 if (pool->unit && pool->unit->heap) { in iwpool_create()
55 free(pool->unit->heap); in iwpool_create()
73 nunit->heap = malloc(siz); in iwpool_extend()
74 if (!nunit->heap) { in iwpool_extend()
79 pool->heap = nunit->heap; in iwpool_extend()
[all …]

12345678910>>...22