/external/deqp/framework/delibs/decpp/ |
D | dePoolArray.hpp | 38 template<typename T, deUint32 Alignment> 41 template<typename T, deUint32 Alignment> 51 template<typename T, deUint32 Alignment = (sizeof(T) > 4 ? 4 : (deUint32)sizeof(T))> 55 typedef PoolArrayIterator<T, Alignment> Iterator; 56 typedef PoolArrayConstIterator<T, Alignment> ConstIterator; 59 PoolArray (MemPool* pool, const PoolArray<T, Alignment>& other); 92 …PoolArray (const PoolArray<T, Alignment>& other); // \note Default copy ctor is not allowed, use… 105 template<typename T, deUint32 Alignment> 118 template<typename T, deUint32 Alignment> 119 class PoolArrayConstIterator : public PoolArrayIteratorBase<T, Alignment> [all …]
|
D | deArrayBuffer.hpp | 36 void* ArrayBuffer_AlignedMalloc (size_t numBytes, size_t alignment); 47 template <typename T, size_t Alignment = (sizeof(T) > 4 ? 4 : sizeof(T)), size_t Stride = sizeof(T)> 76 template <typename T, size_t Alignment, size_t Stride> 77 ArrayBuffer<T,Alignment,Stride>::ArrayBuffer (void) throw() in ArrayBuffer() 83 template <typename T, size_t Alignment, size_t Stride> 84 ArrayBuffer<T,Alignment,Stride>::ArrayBuffer (size_t numElements) in ArrayBuffer() 92 void* const ptr = detail::ArrayBuffer_AlignedMalloc(storageSize, Alignment); in ArrayBuffer() 102 template <typename T, size_t Alignment, size_t Stride> 103 ArrayBuffer<T,Alignment,Stride>::ArrayBuffer (const T* ptr, size_t numElements) in ArrayBuffer() 110 ArrayBuffer<T,Alignment,Stride> tmp(numElements); in ArrayBuffer() [all …]
|
/external/jemalloc/test/integration/ |
D | posix_memalign.c | 10 size_t alignment; in TEST_BEGIN() local 13 for (alignment = 0; alignment < sizeof(void *); alignment++) { in TEST_BEGIN() 14 assert_d_eq(posix_memalign(&p, alignment, 1), EINVAL, in TEST_BEGIN() 15 "Expected error for invalid alignment %zu", in TEST_BEGIN() 16 alignment); in TEST_BEGIN() 19 for (alignment = sizeof(size_t); alignment < MAXALIGN; in TEST_BEGIN() 20 alignment <<= 1) { in TEST_BEGIN() 21 assert_d_ne(posix_memalign(&p, alignment + 1, 1), 0, in TEST_BEGIN() 22 "Expected error for invalid alignment %zu", in TEST_BEGIN() 23 alignment + 1); in TEST_BEGIN() [all …]
|
D | aligned_alloc.c | 10 size_t alignment; in TEST_BEGIN() local 13 alignment = 0; in TEST_BEGIN() 15 p = aligned_alloc(alignment, 1); in TEST_BEGIN() 17 "Expected error for invalid alignment %zu", alignment); in TEST_BEGIN() 19 for (alignment = sizeof(size_t); alignment < MAXALIGN; in TEST_BEGIN() 20 alignment <<= 1) { in TEST_BEGIN() 22 p = aligned_alloc(alignment + 1, 1); in TEST_BEGIN() 24 "Expected error for invalid alignment %zu", in TEST_BEGIN() 25 alignment + 1); in TEST_BEGIN() 32 size_t alignment, size; in TEST_BEGIN() local [all …]
|
D | mallocx.c | 72 size_t hugemax, size, alignment; in TEST_BEGIN() local 93 alignment = ZU(0x8000000000000000); in TEST_BEGIN() 96 alignment = ZU(0x80000000); in TEST_BEGIN() 98 assert_ptr_null(mallocx(size, MALLOCX_ALIGN(alignment)), in TEST_BEGIN() 100 alignment); in TEST_BEGIN() 141 size_t nsz, rsz, sz, alignment, total; in TEST_BEGIN() local 148 for (alignment = 8; in TEST_BEGIN() 149 alignment <= MAXALIGN; in TEST_BEGIN() 150 alignment <<= 1) { in TEST_BEGIN() 153 sz < 3 * alignment && sz < (1U << 31); in TEST_BEGIN() [all …]
|
/external/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/ |
D | p5.cpp | 3 alignas(1) int n1; // expected-error {{requested alignment is less than minimum alignment of 4 for … 4 alignas(1) alignas(2) int n2; // expected-error {{less than minimum alignment}} 6 alignas(1) alignas(2) alignas(0) int n4; // expected-error {{less than minimum alignment}} 9 alignas(1) int n7 alignas(2), // expected-error {{less than minimum alignment}} 12 alignas(1) extern int n10; // expected-error {{less than minimum alignment}} 14 enum alignas(1) E1 {}; // expected-error {{requested alignment is less than minimum alignment of 4 … 17 …) E4 { e4 = 1ull << 33 }; // expected-error {{requested alignment is less than minimum alignment o… 28 struct alignas(2) S2 { // expected-error {{requested alignment is less than minimum alignment of 4 … 31 struct alignas(2) S3 { // expected-error {{requested alignment is less than minimum alignment of 8 … 34 struct alignas(2) S4 : S1 { // expected-error {{requested alignment is less than minimum alignment … [all …]
|
/external/llvm/test/MC/ARM/ |
D | neon-vld-vst-align.s | 13 @ CHECK-ERRORS: error: alignment must be 64 or omitted 16 @ CHECK-ERRORS: error: alignment must be 64 or omitted 20 @ CHECK-ERRORS: error: alignment must be 64 or omitted 23 @ CHECK-ERRORS: error: alignment must be 64 or omitted 35 @ CHECK-ERRORS: error: alignment must be 64 or omitted 38 @ CHECK-ERRORS: error: alignment must be 64 or omitted 42 @ CHECK-ERRORS: error: alignment must be 64 or omitted 45 @ CHECK-ERRORS: error: alignment must be 64 or omitted 57 @ CHECK-ERRORS: error: alignment must be 64 or omitted 60 @ CHECK-ERRORS: error: alignment must be 64 or omitted [all …]
|
/external/llvm/include/llvm/Support/ |
D | AlignOf.h | 1 //===--- AlignOf.h - Portable calculation of type alignment -----*- C++ -*-===// 27 // generated by any class using AlignOf<T> with a manually specified alignment. 39 /// the alignment of the template argument. For example, 40 /// AlignOf<int>::Alignment represents the alignment of type "int". The 41 /// alignment calculated is the minimum alignment, and not necessarily 42 /// the "desired" alignment returned by GCC's __alignof__ (for example). Note 43 /// that because the alignment is an enum value, it can be used as a 53 static constexpr unsigned Alignment = member 56 enum { Alignment = 59 enum { Alignment_GreaterEqual_2Bytes = Alignment >= 2 ? 1 : 0 }; [all …]
|
D | Endian.h | 29 /// \brief ::value is either alignment, or alignof(T) if alignment is 0. 30 template<class T, int alignment> 32 enum {value = alignment == 0 ? AlignOf<T>::Alignment : alignment}; 48 std::size_t alignment> 54 (detail::PickAlignment<value_type, alignment>::value)), in read() 61 template<typename value_type, endianness endian, std::size_t alignment, 64 value_type ret = read<value_type, endian, alignment>(memory); in readNext() 72 std::size_t alignment> 76 (detail::PickAlignment<value_type, alignment>::value)), in write() 86 template <typename value_type, endianness endian, std::size_t alignment> [all …]
|
/external/webrtc/webrtc/system_wrappers/source/ |
D | aligned_malloc.cc | 24 // Reference on memory alignment: 25 // http://stackoverflow.com/questions/227897/solve-the-memory-alignment-in-c-interview-question-tha… 28 uintptr_t GetRightAlign(uintptr_t start_pos, size_t alignment) { in GetRightAlign() argument 29 // The pointer should be aligned with |alignment| bytes. The - 1 guarantees in GetRightAlign() 31 return (start_pos + alignment - 1) & ~(alignment - 1); in GetRightAlign() 34 // Alignment must be an integer power of two. 35 bool ValidAlignment(size_t alignment) { in ValidAlignment() argument 36 if (!alignment) { in ValidAlignment() 39 return (alignment & (alignment - 1)) == 0; in ValidAlignment() 42 void* GetRightAlign(const void* pointer, size_t alignment) { in GetRightAlign() argument [all …]
|
D | aligned_malloc_unittest.cc | 25 // Returns true if |size| and |alignment| are valid combinations. 26 bool CorrectUsage(size_t size, size_t alignment) { in CorrectUsage() argument 28 static_cast<char*>(AlignedMalloc(size, alignment))); in CorrectUsage() 33 return 0u == scoped_address % alignment; in CorrectUsage() 38 const size_t alignment = 32; in TEST() local 41 static_cast<char*>(AlignedMalloc(size, alignment))); in TEST() 47 const char* realigned_ptr = GetRightAlign(misaligned_ptr, alignment); in TEST() 53 const size_t alignment = 64; in TEST() local 54 EXPECT_FALSE(CorrectUsage(incorrect_size, alignment)); in TEST() 65 size_t alignment = 2; in TEST() local [all …]
|
/external/llvm/lib/Transforms/Utils/ |
D | ASanStackFrameLayout.cpp | 21 // We sort the stack variables by alignment (largest first) to minimize 22 // unnecessary large gaps due to alignment. 30 return a.Alignment > b.Alignment; in CompareVars() 33 // We also force minimal alignment for all vars to kMinAlignment so that vars 34 // with e.g. alignment 1 and alignment 16 do not get reordered by CompareVars. 38 // The resulting frame size is a multiple of Alignment. 39 static size_t VarAndRedzoneSize(size_t Size, size_t Alignment) { in VarAndRedzoneSize() argument 47 return RoundUpToAlignment(Res, Alignment); in VarAndRedzoneSize() 61 Vars[i].Alignment = std::max(Vars[i].Alignment, kMinAlignment); in ComputeASanStackFrameLayout() 67 Layout->FrameAlignment = std::max(Granularity, Vars[0].Alignment); in ComputeASanStackFrameLayout() [all …]
|
/external/llvm/unittests/Support/ |
D | AlignOfTest.cpp | 1 //=== - llvm/unittest/Support/AlignOfTest.cpp - Alignment utility tests ----===// 11 // Disable warnings about alignment-based structure padding. 24 // We're testing that even questionable types work with the alignment utilities. 41 // Define some fixed alignment types to use in these tests. 92 // Ensure alignment is a compile-time constant. 94 [AlignOf<char>::Alignment > 0] 95 [AlignOf<short>::Alignment > 0] 96 [AlignOf<int>::Alignment > 0] 97 [AlignOf<long>::Alignment > 0] 98 [AlignOf<long long>::Alignment > 0] [all …]
|
/external/jemalloc/include/jemalloc/internal/ |
D | jemalloc_internal.h.in | 197 * n: alignment 206 /* Use MALLOCX_ALIGN_GET() if alignment may not be specified in flags. */ 223 * Minimum allocation alignment is 2^LG_QUANTUM bytes (ignoring tiny size 273 # error "Unknown minimum alignment for architecture; specify via " 330 #define ALIGNMENT_ADDR2BASE(a, alignment) \ argument 331 ((void *)((uintptr_t)(a) & (-(alignment)))) 334 #define ALIGNMENT_ADDR2OFFSET(a, alignment) \ argument 335 ((size_t)((uintptr_t)(a) & (alignment - 1))) 337 /* Return the smallest alignment multiple that is >= s. */ 338 #define ALIGNMENT_CEILING(s, alignment) \ argument [all …]
|
D | jemalloc_internal.h | 197 * n: alignment 206 /* Use MALLOCX_ALIGN_GET() if alignment may not be specified in flags. */ 223 * Minimum allocation alignment is 2^LG_QUANTUM bytes (ignoring tiny size 273 # error "Unknown minimum alignment for architecture; specify via " 330 #define ALIGNMENT_ADDR2BASE(a, alignment) \ argument 331 ((void *)((uintptr_t)(a) & (-(alignment)))) 334 #define ALIGNMENT_ADDR2OFFSET(a, alignment) \ argument 335 ((size_t)((uintptr_t)(a) & (alignment - 1))) 337 /* Return the smallest alignment multiple that is >= s. */ 338 #define ALIGNMENT_CEILING(s, alignment) \ argument [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | AlignmentFromAssumptions.cpp | 14 // complex alignment assumptions that apply to vector loads and stores that 19 #define AA_NAME "alignment-from-assumptions" 42 "Number of loads changed by alignment assumptions"); 44 "Number of stores changed by alignment assumptions"); 46 "Number of memory intrinsics changed by alignment assumptions"); 70 // For memory transfers, we need a common alignment for both the source and 71 // destination. If we have a new alignment for only one operand of a transfer 73 // another assumption later, then we may change the alignment at that point. 86 static const char aip_name[] = "Alignment from assumptions"; 99 // Given an expression for the (constant) alignment, AlignSCEV, and an [all …]
|
/external/dexmaker/src/dx/java/com/android/dx/dex/file/ |
D | Section.java | 34 /** {@code > 0;} alignment requirement for the final output; 36 private final int alignment; field in Section 47 * Validates an alignment. 49 * @param alignment the alignment 50 * @throws IllegalArgumentException thrown if {@code alignment} 53 public static void validateAlignment(int alignment) { in validateAlignment() argument 54 if ((alignment <= 0) || in validateAlignment() 55 (alignment & (alignment - 1)) != 0) { in validateAlignment() 56 throw new IllegalArgumentException("invalid alignment"); in validateAlignment() 66 * @param alignment {@code > 0;} alignment requirement for the final output; [all …]
|
/external/clang/lib/AST/ |
D | RecordLayoutBuilder.cpp | 59 /// as alignment attributes on fields and pragmas in effect. 66 /// \brief Overall record alignment in bits. 579 /// Alignment - The current alignment of the record layout. 580 CharUnits Alignment; member in __anon07e898d70111::ItaniumRecordLayoutBuilder 582 /// \brief The alignment if attribute packed is not used. 591 /// \brief Whether we need to infer alignment, even when we have an 613 /// MaxFieldAlignment - The maximum allowed field alignment. This is set by 661 Alignment(CharUnits::One()), UnpackedAlignment(CharUnits::One()), in ItaniumRecordLayoutBuilder() 741 /// alignment. 772 CharUnits getAligment() const { return Alignment; } in getAligment() [all …]
|
/external/deqp/external/vulkancts/framework/vulkan/ |
D | vkAllocationCallbackUtil.cpp | 37 static VKAPI_ATTR void* VKAPI_CALL systemAllocate (void*, size_t size, size_t alignment, VkSystemAl… in systemAllocate() argument 40 return deAlignedMalloc(size, (deUint32)alignment); in systemAllocate() 50 …KAPI_CALL systemReallocate (void*, void* pOriginal, size_t size, size_t alignment, VkSystemAllocat… in systemReallocate() argument 52 return deAlignedRealloc(pOriginal, size, alignment); in systemReallocate() 80 …id* VKAPI_CALL allocationCallback (void* pUserData, size_t size, size_t alignment, VkSystemAllocat… in allocationCallback() argument 82 …return reinterpret_cast<AllocationCallbacks*>(pUserData)->allocate(size, alignment, allocationScop… in allocationCallback() 85 …locationCallback (void* pUserData, void* pOriginal, size_t size, size_t alignment, VkSystemAllocat… in reallocationCallback() argument 87 …return reinterpret_cast<AllocationCallbacks*>(pUserData)->reallocate(pOriginal, size, alignment, a… in reallocationCallback() 130 AllocationCallbackRecord AllocationCallbackRecord::allocation (size_t size, size_t alignment, VkSys… in allocation() argument 136 record.data.allocation.alignment = alignment; in allocation() [all …]
|
/external/llvm/lib/IR/ |
D | DataLayout.cpp | 1 //===-- DataLayout.cpp - Data size & alignment routines --------------------==// 10 // This file defines layout properties related to datatype size/offset/alignment 58 // Keep track of maximum alignment constraint. in StructLayout() 65 // Empty structures have alignment of 1 byte. in StructLayout() 104 assert(abi_align <= pref_align && "Preferred alignment worse than ABI!"); in get() 131 assert(ABIAlign <= PrefAlign && "Preferred alignment worse than ABI!"); in get() 266 // ABI alignment. in parseSpecifier() 269 "Missing alignment specification for pointer in datalayout string"); in parseSpecifier() 274 "Pointer ABI alignment must be a power of 2"); in parseSpecifier() 276 // Preferred alignment. in parseSpecifier() [all …]
|
/external/clang/lib/Sema/ |
D | SemaAttr.cpp | 31 // alignment. 34 unsigned Alignment; member 43 /// Alignment - The current user specified alignment. 44 unsigned Alignment; member in __anon9b44d0920111::PragmaPackStack 51 PragmaPackStack() : Alignment(0) {} in PragmaPackStack() 53 void setAlignment(unsigned A) { Alignment = A; } in setAlignment() 54 unsigned getAlignment() { return Alignment; } in getAlignment() 56 /// push - Push the current alignment onto the stack, optionally 59 PackStackEntry PSE = { Alignment, Name }; in push() 64 /// alignment to the previous value. If \arg Name is non-zero then [all …]
|
/external/llvm/include/llvm/IR/ |
D | DataLayout.h | 1 //===--------- llvm/DataLayout.h - Data size & alignment info ---*- C++ -*-===// 10 // This file defines layout properties related to datatype size/offset/alignment 47 /// Enum used to categorize the alignment types stored by LayoutAlignElem 56 // FIXME: Currently the DataLayout string carries a "preferred alignment" 61 /// \brief Layout alignment element. 63 /// Stores the alignment data associated with a given alignment type (integer, 69 /// \brief Alignment type from \c AlignTypeEnum 80 /// \brief Layout pointer alignment element. 82 /// Stores the alignment data associated with a given pointer and address space. 123 /// \brief Primitive type alignment data. [all …]
|
/external/llvm/test/CodeGen/Generic/ |
D | 2009-03-17-LSR-APInt.ll | 5 %struct.Alignment = type { i32 } 11 …type { %"struct.QHashData::Node"*, %"struct.QHashData::Node"**, %struct.Alignment, i32, i32, i16, … 16 %"struct.QListData::Data" = type { %struct.Alignment, i32, i32, i32, i8, [1 x i8*] } 25 …%struct.QWidgetData = type { i64, i32, %struct.Alignment, i8, i8, i16, %struct.QRect, %struct.QPal… 41 …%struct.Alignment*), i32 (%struct.pthread_mutex_t*, %struct.Alignment*)* @pthread_mutex_init ; <i… 44 …ttr_t = weak alias i32 (%struct.Alignment*), i32 (%struct.Alignment*)* @pthread_mutexattr_init ; … 45 … weak alias i32 (%struct.Alignment*, i32), i32 (%struct.Alignment*, i32)* @pthread_mutexattr_setty… 46 …r_t = weak alias i32 (%struct.Alignment*), i32 (%struct.Alignment*)* @pthread_mutexattr_destroy ;… 98 define i32 @pthread_mutex_init(%struct.pthread_mutex_t*, %struct.Alignment*) { 110 define i32 @pthread_mutexattr_init(%struct.Alignment*) { [all …]
|
/external/libchrome/base/memory/ |
D | aligned_memory.cc | 16 void* AlignedAlloc(size_t size, size_t alignment) { in AlignedAlloc() argument 18 DCHECK_EQ(alignment & (alignment - 1), 0U); in AlignedAlloc() 19 DCHECK_EQ(alignment % sizeof(void*), 0U); in AlignedAlloc() 22 ptr = _aligned_malloc(size, alignment); in AlignedAlloc() 29 ptr = memalign(alignment, size); in AlignedAlloc() 31 if (posix_memalign(&ptr, alignment, size)) in AlignedAlloc() 39 << "size=" << size << ", alignment=" << alignment; in AlignedAlloc() 42 // Sanity check alignment just to be safe. in AlignedAlloc() 43 DCHECK_EQ(reinterpret_cast<uintptr_t>(ptr) & (alignment - 1), 0U); in AlignedAlloc()
|
/external/llvm/lib/ExecutionEngine/ |
D | SectionMemoryManager.cpp | 23 unsigned Alignment, in allocateDataSection() argument 28 return allocateSection(RODataMem, Size, Alignment); in allocateDataSection() 29 return allocateSection(RWDataMem, Size, Alignment); in allocateDataSection() 33 unsigned Alignment, in allocateCodeSection() argument 36 return allocateSection(CodeMem, Size, Alignment); in allocateCodeSection() 41 unsigned Alignment) { in allocateSection() argument 42 if (!Alignment) in allocateSection() 43 Alignment = 16; in allocateSection() 45 assert(!(Alignment & (Alignment - 1)) && "Alignment must be a power of two."); in allocateSection() 47 uintptr_t RequiredSize = Alignment * ((Size + Alignment - 1)/Alignment + 1); in allocateSection() [all …]
|