Home
last modified time | relevance | path

Searched refs:alignment (Results 1 - 25 of 778) sorted by relevance

12345678910>>...32

/third_party/python/Lib/lib2to3/tests/data/
H A Dinfinite_recursion.py41 assert alignment(__mbstate_t) == 4, alignment(__mbstate_t)
77 assert alignment(sigcontext) == 4, alignment(sigcontext)
101 assert alignment(aes_key_st) == 4, alignment(aes_key_st)
119 assert alignment(asn1_ctx_st) == 4, alignment(asn1_ctx_st)
132 assert alignment(asn1_object_st) == 4, alignment(asn1_object_s
[all...]
/third_party/skia/tests/
H A DSkSLMemoryLayoutTest.cpp40 REPORTER_ASSERT(r, 4 == layout.alignment(*context.fTypes.fFloat)); in DEF_TEST()
41 REPORTER_ASSERT(r, 8 == layout.alignment(*context.fTypes.fFloat2)); in DEF_TEST()
42 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fFloat3)); in DEF_TEST()
43 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fFloat4)); in DEF_TEST()
44 REPORTER_ASSERT(r, 4 == layout.alignment(*context.fTypes.fInt)); in DEF_TEST()
45 REPORTER_ASSERT(r, 8 == layout.alignment(*context.fTypes.fInt2)); in DEF_TEST()
46 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fInt3)); in DEF_TEST()
47 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fInt4)); in DEF_TEST()
48 REPORTER_ASSERT(r, 1 == layout.alignment(*context.fTypes.fBool)); in DEF_TEST()
49 REPORTER_ASSERT(r, 2 == layout.alignment(*contex in DEF_TEST()
[all...]
H A DMemsetTest.cpp51 for (int alignment = 0; alignment < MAX_ALIGNMENT; ++alignment) { in test_16()
54 uint16_t* base = &buffer[PAD + alignment]; in test_16()
57 compare16(reporter, buffer, 0, PAD + alignment); in test_16()
59 compare16(reporter, base + count, 0, TOTAL - count - PAD - alignment); in test_16()
68 for (int alignment = 0; alignment < MAX_ALIGNMENT; ++alignment) { in test_32()
71 uint32_t* base = &buffer[PAD + alignment]; in test_32()
[all...]
/third_party/node/deps/v8/src/heap/
H A Dheap-allocator-inl.h57 int size_in_bytes, AllocationOrigin origin, AllocationAlignment alignment) { in AllocateRaw()
63 return AllocateRaw(size_in_bytes, AllocationType::kOld, origin, alignment); in AllocateRaw()
90 allocation = heap_->tp_heap_->Allocate(size_in_bytes, type, alignment); in AllocateRaw()
94 AllocateRawLargeInternal(size_in_bytes, type, origin, alignment); in AllocateRaw()
99 new_space()->AllocateRaw(size_in_bytes, alignment, origin); in AllocateRaw()
103 old_space()->AllocateRaw(size_in_bytes, alignment, origin); in AllocateRaw()
106 DCHECK_EQ(alignment, AllocationAlignment::kTaggedAligned); in AllocateRaw()
111 DCHECK_EQ(alignment, AllocationAlignment::kTaggedAligned); in AllocateRaw()
117 allocation = read_only_space()->AllocateRaw(size_in_bytes, alignment); in AllocateRaw()
121 alignment, origi in AllocateRaw()
56 AllocateRaw( int size_in_bytes, AllocationOrigin origin, AllocationAlignment alignment) AllocateRaw() argument
161 AllocateRaw(int size_in_bytes, AllocationType type, AllocationOrigin origin, AllocationAlignment alignment) AllocateRaw() argument
191 AllocateRawData(int size_in_bytes, AllocationType type, AllocationOrigin origin, AllocationAlignment alignment) AllocateRawData() argument
213 AllocateRawWith( int size, AllocationType allocation, AllocationOrigin origin, AllocationAlignment alignment) AllocateRawWith() argument
[all...]
H A Devacuation-allocator-inl.h18 AllocationAlignment alignment) { in Allocate()
21 return AllocateInNewSpace(object_size, origin, alignment); in Allocate()
24 alignment, origin); in Allocate()
27 alignment, origin); in Allocate()
30 ->AllocateRaw(object_size, alignment, origin); in Allocate()
84 int object_size, AllocationAlignment alignment) { in AllocateInLAB()
89 allocation = new_space_lab_.AllocateRawAligned(object_size, alignment); in AllocateInLAB()
94 allocation = new_space_lab_.AllocateRawAligned(object_size, alignment); in AllocateInLAB()
119 int object_size, AllocationOrigin origin, AllocationAlignment alignment) { in AllocateInNewSpace()
121 return new_space_->AllocateRawSynchronized(object_size, alignment, origi in AllocateInNewSpace()
15 Allocate(AllocationSpace space, int object_size, AllocationOrigin origin, AllocationAlignment alignment) Allocate() argument
83 AllocateInLAB( int object_size, AllocationAlignment alignment) AllocateInLAB() argument
118 AllocateInNewSpace( int object_size, AllocationOrigin origin, AllocationAlignment alignment) AllocateInNewSpace() argument
[all...]
H A Dlocal-heap-inl.h21 AllocationAlignment alignment) { in AllocateRaw()
28 alignment == AllocationAlignment::kTaggedAligned); in AllocateRaw()
46 code_space_allocator()->AllocateRaw(size_in_bytes, alignment, origin); in AllocateRaw()
61 return old_space_allocator()->AllocateRaw(size_in_bytes, alignment, in AllocateRaw()
66 return shared_old_space_allocator()->AllocateRaw(size_in_bytes, alignment, in AllocateRaw()
72 AllocationAlignment alignment) { in AllocateRawOrFail()
74 AllocationResult result = AllocateRaw(object_size, type, origin, alignment); in AllocateRawOrFail()
78 alignment); in AllocateRawOrFail()
19 AllocateRaw(int size_in_bytes, AllocationType type, AllocationOrigin origin, AllocationAlignment alignment) AllocateRaw() argument
70 AllocateRawOrFail(int object_size, AllocationType type, AllocationOrigin origin, AllocationAlignment alignment) AllocateRawOrFail() argument
H A Dconcurrent-allocator-inl.h22 AllocationAlignment alignment, in AllocateRaw()
31 return AllocateOutsideLab(object_size, alignment, origin); in AllocateRaw()
34 return AllocateInLab(object_size, alignment, origin); in AllocateRaw()
38 int object_size, AllocationAlignment alignment, AllocationOrigin origin) { in AllocateInLab()
39 AllocationResult allocation = lab_.AllocateRawAligned(object_size, alignment); in AllocateInLab()
41 ? AllocateInLabSlow(object_size, alignment, origin) in AllocateInLab()
21 AllocateRaw(int object_size, AllocationAlignment alignment, AllocationOrigin origin) AllocateRaw() argument
37 AllocateInLab( int object_size, AllocationAlignment alignment, AllocationOrigin origin) AllocateInLab() argument
/third_party/skia/third_party/externals/dawn/src/common/
H A DMath.h51 bool IsPtrAligned(const void* ptr, size_t alignment);
52 void* AlignVoidPtr(void* ptr, size_t alignment);
53 bool IsAligned(uint32_t value, size_t alignment);
56 T Align(T value, size_t alignment) { in Align() argument
57 ASSERT(value <= std::numeric_limits<T>::max() - (alignment - 1)); in Align()
58 ASSERT(IsPowerOfTwo(alignment)); in Align()
59 ASSERT(alignment != 0); in Align()
60 T alignmentT = static_cast<T>(alignment); in Align()
65 DAWN_FORCE_INLINE T* AlignPtr(T* ptr, size_t alignment) { in AlignPtr() argument
66 ASSERT(IsPowerOfTwo(alignment)); in AlignPtr()
73 AlignPtr(const T* ptr, size_t alignment) AlignPtr() argument
[all...]
H A DMath.cpp87 bool IsPtrAligned(const void* ptr, size_t alignment) { in IsPtrAligned() argument
88 ASSERT(IsPowerOfTwo(alignment)); in IsPtrAligned()
89 ASSERT(alignment != 0); in IsPtrAligned()
90 return (reinterpret_cast<size_t>(ptr) & (alignment - 1)) == 0; in IsPtrAligned()
93 bool IsAligned(uint32_t value, size_t alignment) { in IsAligned() argument
94 ASSERT(alignment <= UINT32_MAX); in IsAligned()
95 ASSERT(IsPowerOfTwo(alignment)); in IsAligned()
96 ASSERT(alignment != 0); in IsAligned()
97 uint32_t alignment32 = static_cast<uint32_t>(alignment); in IsAligned()
/third_party/skia/src/sksl/
H A DSkSLMemoryLayout.h47 * Returns a type's required alignment when used as a standalone variable.
49 size_t alignment(const Type& type) const { in alignment() function in SkSL::MemoryLayout
60 return this->roundUpIfNeeded(this->alignment(type.componentType())); in alignment()
64 size_t alignment = this->alignment(*f.fType); in alignment() local
65 if (alignment > result) { in alignment()
66 result = alignment; in alignment()
89 int align = this->alignment(type.componentType()); in stride()
125 size_t alignment = this->alignment(* in size() local
132 size_t alignment = this->alignment(type); size() local
[all...]
/third_party/musl/Benchmark/musl/
H A Dutil.cpp39 char* AlignUpMemoy(char* origPtr, size_t alignment) in AlignUpMemoy() argument
41 if ((alignment & (alignment - 1)) != 0) { in AlignUpMemoy()
42 perror("alignment is not a power of two."); in AlignUpMemoy()
46 if (alignment > 0) { in AlignUpMemoy()
47 ptr = ((ptr + (alignment - 1)) & (~(alignment - 1))); in AlignUpMemoy()
53 char* GetAlignedPtr(std::vector<char>* buf, size_t alignment, size_t nbytes) in GetAlignedPtr() argument
55 buf->resize(nbytes + 2 * alignment); in GetAlignedPtr()
56 return AlignUpMemoy(buf->data(), alignment); in GetAlignedPtr()
59 GetAlignedPtr(std::vector<wchar_t>* buf, size_t alignment, size_t nchars) GetAlignedPtr() argument
65 GetAlignedPtrFilled(std::vector<char>* buf, size_t alignment, size_t nbytes, char fillByte) GetAlignedPtrFilled() argument
72 GetAlignedPtrFilled(std::vector<wchar_t>* buf, size_t alignment, size_t nbytes, wchar_t fillByte) GetAlignedPtrFilled() argument
[all...]
/third_party/python/Modules/_ctypes/libffi_osx/
H A Dffi.c44 arg->size != 0 || arg->alignment != 0) in initialize_aggregate()
58 int curalign = (*ptr)->alignment; in initialize_aggregate()
68 arg->alignment = (arg->alignment > curalign) ? in initialize_aggregate()
69 arg->alignment : curalign; in initialize_aggregate()
71 arg->size = ALIGN(arg->size, (*ptr)->alignment); in initialize_aggregate()
73 arg->alignment = (arg->alignment > (*ptr)->alignment) ? in initialize_aggregate()
74 arg->alignment in initialize_aggregate()
[all...]
/third_party/skia/third_party/externals/angle2/src/common/
H A Daligned_memory.cpp23 void *AlignedAlloc(size_t size, size_t alignment) in AlignedAlloc() argument
26 ASSERT((alignment & (alignment - 1)) == 0); in AlignedAlloc()
27 ASSERT((alignment % sizeof(void *)) == 0); in AlignedAlloc()
30 ptr = _aligned_malloc(size, alignment); in AlignedAlloc()
37 ptr = memalign(alignment, size); in AlignedAlloc()
39 if (posix_memalign(&ptr, alignment, size)) in AlignedAlloc()
47 << "size=" << size << ", alignment=" << alignment; in AlignedAlloc() local
50 // Confidence check alignment jus in AlignedAlloc()
[all...]
/third_party/mesa3d/src/util/
H A Dos_memory_aligned.h30 * Memory alignment wrappers.
54 os_malloc_aligned(size_t size, size_t alignment) in os_malloc_aligned() argument
57 alignment = (alignment + sizeof(void*) - 1) & ~(sizeof(void*) - 1); in os_malloc_aligned()
58 if(posix_memalign(&ptr, alignment, size) != 0) in os_malloc_aligned()
68 * Return memory on given byte alignment
71 os_malloc_aligned(size_t size, size_t alignment) in os_malloc_aligned() argument
79 * alloc_size = size + alignment + sizeof(void *) in os_malloc_aligned()
83 if (add_overflow_size_t(size, alignment, &alloc_size) || in os_malloc_aligned()
92 buf = (char *)(((uintptr_t)ptr + sizeof(void *) + alignment in os_malloc_aligned()
118 os_realloc_aligned(void *ptr, size_t oldsize, size_t newsize, size_t alignment) os_realloc_aligned() argument
[all...]
H A Du_math.h649 * Align a value up to an alignment value
651 * If \c value is not already aligned to the requested alignment value, it
655 * \param alignment Alignment value to be used. This must be a power of two.
664 ALIGN(uintptr_t value, int32_t alignment) in ALIGN() argument
666 assert(util_is_power_of_two_nonzero(alignment)); in ALIGN()
667 return (((value) + (alignment) - 1) & ~((alignment) - 1)); in ALIGN()
671 * Like ALIGN(), but works with a non-power-of-two alignment.
674 ALIGN_NPOT(uintptr_t value, int32_t alignment) in ALIGN_NPOT() argument
676 assert(alignment > in ALIGN_NPOT()
692 ROUND_DOWN_TO(uint64_t value, int32_t alignment) ROUND_DOWN_TO() argument
702 align(int value, int alignment) align() argument
708 align64(uint64_t value, unsigned alignment) align64() argument
717 util_align_npot(size_t value, size_t alignment) util_align_npot() argument
[all...]
/third_party/skia/third_party/externals/swiftshader/third_party/marl/src/
H A Dmemory.cpp133 // specified minimum byte alignment using OS specific page mapping calls.
139 void* pagedMalloc(size_t alignment, in pagedMalloc() argument
143 (void)alignment; in pagedMalloc()
144 MARL_ASSERT(alignment < pageSize(), in pagedMalloc()
145 "alignment (0x%x) must be less than the page size (0x%x)", in pagedMalloc()
146 int(alignment), int(pageSize())); in pagedMalloc()
163 size_t alignment,
167 (void)alignment;
168 MARL_ASSERT(alignment < pageSize(),
169 "alignment (
[all...]
/third_party/skia/third_party/externals/swiftshader/src/System/
H A DMemory.cpp76 static void *allocate(size_t bytes, size_t alignment, bool clearToZero) in allocate() argument
78 ASSERT((alignment & (alignment - 1)) == 0); // Power of 2 alignment. in allocate()
80 size_t size = bytes + sizeof(Allocation) + alignment; in allocate()
91 aligned = (unsigned char *)((uintptr_t)(block + sizeof(Allocation) + alignment - 1) & -(intptr_t)alignment); in allocate()
102 void *allocateUninitialized(size_t bytes, size_t alignment) in allocateUninitialized() argument
104 return allocate(bytes, alignment, false); in allocateUninitialized()
107 void *allocateZero(size_t bytes, size_t alignment) in allocateZero() argument
114 allocateZeroOrPoison(size_t bytes, size_t alignment) allocateZeroOrPoison() argument
[all...]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
H A DEndian.h36 /// ::value is either alignment, or alignof(T) if alignment is 0.
37 template<class T, int alignment>
39 enum { value = alignment == 0 ? alignof(T) : alignment };
64 template <typename value_type, std::size_t alignment>
70 memory, (detail::PickAlignment<value_type, alignment>::value)), in read()
77 std::size_t alignment>
79 return read<value_type, alignment>(memory, endian); in read()
84 template <typename value_type, std::size_t alignment, typenam
[all...]
/third_party/vk-gl-cts/external/vulkancts/framework/vulkan/
H A DvkAllocationCallbackUtil.cpp37 static VKAPI_ATTR void* VKAPI_CALL systemAllocate (void*, size_t size, size_t alignment, VkSystemAllocationScope) in systemAllocate() argument
40 return deAlignedMalloc(size, (deUint32)alignment); in systemAllocate()
50 static VKAPI_ATTR void* VKAPI_CALL systemReallocate (void*, void* pOriginal, size_t size, size_t alignment, VkSystemAllocationScope) in systemReallocate() argument
52 return deAlignedRealloc(pOriginal, size, alignment); in systemReallocate()
80 static VKAPI_ATTR void* VKAPI_CALL allocationCallback (void* pUserData, size_t size, size_t alignment, VkSystemAllocationScope allocationScope) in allocationCallback() argument
82 return reinterpret_cast<AllocationCallbacks*>(pUserData)->allocate(size, alignment, allocationScope); in allocationCallback()
85 static VKAPI_ATTR void* VKAPI_CALL reallocationCallback (void* pUserData, void* pOriginal, size_t size, size_t alignment, VkSystemAllocationScope allocationScope) in reallocationCallback() argument
87 return reinterpret_cast<AllocationCallbacks*>(pUserData)->reallocate(pOriginal, size, alignment, allocationScope); in reallocationCallback()
130 AllocationCallbackRecord AllocationCallbackRecord::allocation (size_t size, size_t alignment, VkSystemAllocationScope scope, void* returnedPtr) in allocation() argument
136 record.data.allocation.alignment in allocation()
143 reallocation(void* original, size_t size, size_t alignment, VkSystemAllocationScope scope, void* returnedPtr) reallocation() argument
202 allocate(size_t size, size_t alignment, VkSystemAllocationScope allocationScope) allocate() argument
207 reallocate(void* original, size_t size, size_t alignment, VkSystemAllocationScope allocationScope) reallocate() argument
239 allocate(size_t size, size_t alignment, VkSystemAllocationScope allocationScope) allocate() argument
248 reallocate(void* original, size_t size, size_t alignment, VkSystemAllocationScope allocationScope) reallocate() argument
297 allocate(size_t size, size_t alignment, VkSystemAllocationScope allocationScope) allocate() argument
306 reallocate(void* original, size_t size, size_t alignment, VkSystemAllocationScope allocationScope) reallocate() argument
660 const size_t alignment = (alloc->type == AllocationCallbackRecord::TYPE_ALLOCATION ? alloc->data.allocation.alignment : alloc->data.reallocation.alignment); getLiveSystemAllocationTotal() local
[all...]
H A DvkAllocationCallbackUtil.hpp46 virtual void* allocate (size_t size, size_t alignment, VkSystemAllocationScope allocationScope) = 0;
47 virtual void* reallocate (void* original, size_t size, size_t alignment, VkSystemAllocationScope allocationScope) = 0;
79 size_t alignment; member
88 size_t alignment; member
109 static AllocationCallbackRecord allocation (size_t size, size_t alignment, VkSystemAllocationScope scope, void* returnedPtr);
110 static AllocationCallbackRecord reallocation (void* original, size_t size, size_t alignment, VkSystemAllocationScope scope, void* returnedPtr);
122 void* allocate (size_t size, size_t alignment, VkSystemAllocationScope allocationScope);
123 void* reallocate (void* original, size_t size, size_t alignment, VkSystemAllocationScope allocationScope);
139 void* allocate (size_t size, size_t alignment, VkSystemAllocationScope allocationScope);
140 void* reallocate (void* original, size_t size, size_t alignment, VkSystemAllocationScop
[all...]
/third_party/mesa3d/src/asahi/lib/
H A Dpool.c82 agx_pool_alloc_aligned(struct agx_pool *pool, size_t sz, unsigned alignment) in agx_pool_alloc_aligned() argument
84 alignment = MAX2(alignment, 4096); in agx_pool_alloc_aligned()
85 assert(alignment == util_next_power_of_two(alignment)); in agx_pool_alloc_aligned()
89 unsigned offset = ALIGN_POT(pool->transient_offset, alignment); in agx_pool_alloc_aligned()
115 agx_pool_upload_aligned(struct agx_pool *pool, const void *data, size_t sz, unsigned alignment) in agx_pool_upload_aligned() argument
117 alignment = MAX2(alignment, 4096); in agx_pool_upload_aligned()
118 struct agx_ptr transfer = agx_pool_alloc_aligned(pool, sz, alignment); in agx_pool_upload_aligned()
[all...]
/third_party/mesa3d/src/gallium/drivers/freedreno/a3xx/
H A Dfd3_resource.c29 setup_slices(struct fd_resource *rsc, uint32_t alignment, in setup_slices() argument
35 /* 32 pixel alignment */ in setup_slices()
60 slice->size0 = align(nblocksy * pitch, alignment); in setup_slices()
61 else if (level == 0 || alignment == 1) in setup_slices()
62 slice->size0 = align(nblocksy * pitch, alignment); in setup_slices()
75 uint32_t alignment; in fd3_setup_slices() local
81 alignment = 4096; in fd3_setup_slices()
84 alignment = 1; in fd3_setup_slices()
88 return setup_slices(rsc, alignment, rsc->b.b.format); in fd3_setup_slices()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/include/llvm/Support/
H A DEndian.h28 /// \brief ::value is either alignment, or alignof(T) if alignment is 0.
29 template<class T, int alignment>
31 enum { value = alignment == 0 ? alignof(T) : alignment };
47 std::size_t alignment>
53 (detail::PickAlignment<value_type, alignment>::value)), in read()
60 template<typename value_type, endianness endian, std::size_t alignment,
63 value_type ret = read<value_type, endian, alignment>(memory); in readNext()
71 std::size_t alignment>
[all...]
/third_party/skia/third_party/externals/swiftshader/src/Vulkan/
H A DVkMemory.cpp22 void *allocateDeviceMemory(size_t bytes, size_t alignment) in allocateDeviceMemory() argument
26 return sw::allocateZero(bytes, alignment); in allocateDeviceMemory()
29 return sw::allocateZeroOrPoison(bytes, alignment); in allocateDeviceMemory()
38 void *allocateHostMemory(size_t bytes, size_t alignment, const VkAllocationCallbacks *pAllocator, VkSystemAllocationScope allocationScope) in allocateHostMemory() argument
42 return pAllocator->pfnAllocation(pAllocator->pUserData, bytes, alignment, allocationScope); in allocateHostMemory()
47 return sw::allocateZeroOrPoison(bytes, alignment); in allocateHostMemory()
/third_party/ltp/tools/sparse/sparse-src/
H A Dsymbol.c125 unsigned long alignment; in lay_out_struct() local
142 alignment = info->packed ? 1 : sym->ctype.alignment; in lay_out_struct()
143 align_bit_mask = bytes_to_bits(alignment) - 1; in lay_out_struct()
228 if (member->ctype.alignment > info.max_align && !sym->packed) { in examine_struct_union_type()
229 // Unnamed bitfields do not affect alignment. in examine_struct_union_type()
231 info.max_align = member->ctype.alignment; in examine_struct_union_type()
241 if (!sym->ctype.alignment) in examine_struct_union_type()
242 sym->ctype.alignment = info.max_align; in examine_struct_union_type()
245 bit_align = bytes_to_bits(sym->ctype.alignment) in examine_struct_union_type()
293 unsigned long bit_size = -1, alignment; examine_array_type() local
320 unsigned long alignment, modifiers; examine_bitfield_type() local
480 unsigned long alignment; examine_node_type() local
963 unsigned long alignment = bits_to_bytes(bit_size); init_ctype() local
[all...]

Completed in 11 milliseconds

12345678910>>...32