| /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 : 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)> 73 template <typename T, size_t Alignment, size_t Stride> 74 ArrayBuffer<T,Alignment,Stride>::ArrayBuffer (void) throw() in ArrayBuffer() 80 template <typename T, size_t Alignment, size_t Stride> 81 ArrayBuffer<T,Alignment,Stride>::ArrayBuffer (size_t numElements) in ArrayBuffer() 89 void* const ptr = detail::ArrayBuffer_AlignedMalloc(storageSize, Alignment); in ArrayBuffer() 99 template <typename T, size_t Alignment, size_t Stride> 100 ArrayBuffer<T,Alignment,Stride>::ArrayBuffer (const ArrayBuffer<T,Alignment,Stride>& other) in ArrayBuffer() argument 116 template <typename T, size_t Alignment, size_t Stride> [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 | 38 size_t nsz, rsz, sz, alignment, total; in TEST_BEGIN() local 45 for (alignment = 8; in TEST_BEGIN() 46 alignment <= MAXALIGN; in TEST_BEGIN() 47 alignment <<= 1) { in TEST_BEGIN() 50 sz < 3 * alignment && sz < (1U << 31); in TEST_BEGIN() 51 sz += (alignment >> (LG_SIZEOF_PTR-1)) - 1) { in TEST_BEGIN() 53 nsz = nallocx(sz, MALLOCX_ALIGN(alignment) | in TEST_BEGIN() 56 "nallocx() error for alignment=%zu, " in TEST_BEGIN() 57 "size=%zu (%#zx)", alignment, sz, sz); in TEST_BEGIN() 58 ps[i] = mallocx(sz, MALLOCX_ALIGN(alignment) | in TEST_BEGIN() [all …]
|
| /external/chromium_org/chrome/browser/themes/ |
| D | theme_properties_unittest.cc | 16 int alignment = ThemeProperties::StringToAlignment(top_left); in TEST_F() local 18 alignment); in TEST_F() 19 EXPECT_EQ(top_left, ThemeProperties::AlignmentToString(alignment)); in TEST_F() 22 alignment = ThemeProperties::StringToAlignment("top"); in TEST_F() 23 EXPECT_EQ(ThemeProperties::ALIGN_TOP, alignment); in TEST_F() 24 EXPECT_EQ("center top", ThemeProperties::AlignmentToString(alignment)); in TEST_F() 26 alignment = ThemeProperties::StringToAlignment("left"); in TEST_F() 27 EXPECT_EQ(ThemeProperties::ALIGN_LEFT, alignment); in TEST_F() 28 EXPECT_EQ("left center", ThemeProperties::AlignmentToString(alignment)); in TEST_F() 30 alignment = ThemeProperties::StringToAlignment("right"); in TEST_F() [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… 22 struct alignas(2) S2 { // expected-error {{requested alignment is less than minimum alignment of 4 … 25 struct alignas(2) S3 { // expected-error {{requested alignment is less than minimum alignment of 8 … 28 struct alignas(2) S4 : S1 { // expected-error {{requested alignment is less than minimum alignment … [all …]
|
| /external/chromium_org/third_party/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/chromium_org/third_party/tcmalloc/vendor/src/ |
| D | system-alloc.cc | 108 // Structure for discovering alignment 146 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 154 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 162 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 182 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 196 size_t alignment) { in Alloc() argument 213 if (static_cast<ptrdiff_t>(size + alignment) < 0) return NULL; in Alloc() 216 // tested for overflow at the alignment boundary. in Alloc() 217 size = ((size + alignment - 1) / alignment) * alignment; in Alloc() 243 if ((ptr & (alignment-1)) == 0) return result; in Alloc() [all …]
|
| D | common.cc | 56 int alignment = kAlignment; in AlignmentForSize() local 58 // Cap alignment at kPageSize for large sizes. in AlignmentForSize() 59 alignment = kPageSize; in AlignmentForSize() 61 // Space wasted due to alignment is at most 1/8, i.e., 12.5%. in AlignmentForSize() 62 alignment = (1 << LgFloor(size)) / 8; in AlignmentForSize() 64 // We need an alignment of at least 16 bytes to satisfy in AlignmentForSize() 66 alignment = 16; in AlignmentForSize() 68 // Maximum alignment allowed is page size alignment. in AlignmentForSize() 69 if (alignment > kPageSize) { in AlignmentForSize() 70 alignment = kPageSize; in AlignmentForSize() [all …]
|
| /external/llvm/include/llvm/Support/ |
| D | AlignOf.h | 1 //===--- AlignOf.h - Portable calculation of type alignment -----*- C++ -*-===// 31 /// the alignment of the template argument. For example, 32 /// AlignOf<int>::Alignment represents the alignment of type "int". The 33 /// alignment calculated is the minimum alignment, and not necessarily 34 /// the "desired" alignment returned by GCC's __alignof__ (for example). Note 35 /// that because the alignment is an enum value, it can be used as a 39 enum { Alignment = enumerator 42 enum { Alignment_GreaterEqual_2Bytes = Alignment >= 2 ? 1 : 0 }; 43 enum { Alignment_GreaterEqual_4Bytes = Alignment >= 4 ? 1 : 0 }; 44 enum { Alignment_GreaterEqual_8Bytes = Alignment >= 8 ? 1 : 0 }; [all …]
|
| /external/llvm/lib/Transforms/Utils/ |
| D | ASanStackFrameLayout.cpp | 20 // We sort the stack variables by alignment (largest first) to minimize 21 // unnecessary large gaps due to alignment. 29 return a.Alignment > b.Alignment; in CompareVars() 32 // We also force minimal alignment for all vars to kMinAlignment so that vars 33 // with e.g. alignment 1 and alignment 16 do not get reordered by CompareVars. 42 // The resulting frame size is a multiple of Alignment. 43 static size_t VarAndRedzoneSize(size_t Size, size_t Alignment) { in VarAndRedzoneSize() argument 51 return RoundUpTo(Res, Alignment); in VarAndRedzoneSize() 65 Vars[i].Alignment = std::max(Vars[i].Alignment, kMinAlignment); in ComputeASanStackFrameLayout() 71 Layout->FrameAlignment = std::max(Granularity, Vars[0].Alignment); in ComputeASanStackFrameLayout() [all …]
|
| /external/jemalloc/include/jemalloc/internal/ |
| D | jemalloc_internal.h | 175 * Minimum alignment of allocations is 2^LG_QUANTUM bytes (ignoring tiny size 275 #define ALIGNMENT_ADDR2BASE(a, alignment) \ argument 276 ((void *)((uintptr_t)(a) & (-(alignment)))) 279 #define ALIGNMENT_ADDR2OFFSET(a, alignment) \ argument 280 ((size_t)((uintptr_t)(a) & (alignment - 1))) 282 /* Return the smallest alignment multiple that is >= s. */ 283 #define ALIGNMENT_CEILING(s, alignment) \ argument 284 (((s) + (alignment - 1)) & (-(alignment))) 458 size_t sa2u(size_t size, size_t alignment); 489 * specified size and alignment. [all …]
|
| D | jemalloc_internal.h.in | 175 * Minimum alignment of allocations is 2^LG_QUANTUM bytes (ignoring tiny size 275 #define ALIGNMENT_ADDR2BASE(a, alignment) \ argument 276 ((void *)((uintptr_t)(a) & (-(alignment)))) 279 #define ALIGNMENT_ADDR2OFFSET(a, alignment) \ argument 280 ((size_t)((uintptr_t)(a) & (alignment - 1))) 282 /* Return the smallest alignment multiple that is >= s. */ 283 #define ALIGNMENT_CEILING(s, alignment) \ argument 284 (((s) + (alignment - 1)) & (-(alignment))) 458 size_t sa2u(size_t size, size_t alignment); 489 * specified size and 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/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 46 /// Enum used to categorize the alignment types stored by LayoutAlignElem 48 INVALID_ALIGN = 0, ///< An invalid alignment 49 INTEGER_ALIGN = 'i', ///< Integer type alignment 50 VECTOR_ALIGN = 'v', ///< Vector type alignment 51 FLOAT_ALIGN = 'f', ///< Floating point type alignment 52 AGGREGATE_ALIGN = 'a' ///< Aggregate alignment 55 /// Layout alignment element. 57 /// Stores the alignment data associated with a given alignment type (integer, [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/chromium_org/third_party/tcmalloc/chromium/src/ |
| D | system-alloc.cc | 242 // Structure for discovering alignment 289 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 297 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 305 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 325 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 339 size_t alignment) { in Alloc() argument 355 if (static_cast<ptrdiff_t>(size + alignment) < 0) return NULL; in Alloc() 358 // tested for overflow at the alignment boundary. in Alloc() 359 size = ((size + alignment - 1) / alignment) * alignment; in Alloc() 385 if ((ptr & (alignment-1)) == 0) return result; in Alloc() [all …]
|
| /external/chromium_org/base/memory/ |
| D | aligned_memory.cc | 15 void* AlignedAlloc(size_t size, size_t alignment) { in AlignedAlloc() argument 17 DCHECK_EQ(alignment & (alignment - 1), 0U); in AlignedAlloc() 18 DCHECK_EQ(alignment % sizeof(void*), 0U); in AlignedAlloc() 21 ptr = _aligned_malloc(size, alignment); in AlignedAlloc() 28 ptr = memalign(alignment, size); in AlignedAlloc() 30 if (posix_memalign(&ptr, alignment, size)) in AlignedAlloc() 38 << "size=" << size << ", alignment=" << alignment; in AlignedAlloc() 41 // Sanity check alignment just to be safe. in AlignedAlloc() 42 DCHECK_EQ(reinterpret_cast<uintptr_t>(ptr) & (alignment - 1), 0U); in AlignedAlloc()
|
| /external/llvm/unittests/Support/ |
| D | AlignOfTest.cpp | 1 //=== - llvm/unittest/Support/AlignOfTest.cpp - Alignment utility tests ----===// 18 // We're testing that even questionable types work with the alignment utilities. 35 // Define some fixed alignment types to use in these tests. 90 // Ensure alignment is a compile-time constant. 92 [AlignOf<char>::Alignment > 0] 93 [AlignOf<short>::Alignment > 0] 94 [AlignOf<int>::Alignment > 0] 95 [AlignOf<long>::Alignment > 0] 96 [AlignOf<long long>::Alignment > 0] 97 [AlignOf<float>::Alignment > 0] [all …]
|
| /external/webrtc/src/system_wrappers/source/ |
| D | aligned_malloc.cc | 34 // Ok reference on memory alignment: 35 // http://stackoverflow.com/questions/227897/solve-the-memory-alignment-in-c-interview-question-tha… 48 void* AlignedMalloc(size_t size, size_t alignment) in AlignedMalloc() argument 50 if(alignment == 0) in AlignedMalloc() 52 // Don't allow alignment 0 since it's undefined. in AlignedMalloc() 55 // Make sure that the alignment is an integer power of two or fail. in AlignedMalloc() 56 if(alignment & (alignment - 1)) in AlignedMalloc() 68 // alignment - 1 bytes needs to be allocated. in AlignedMalloc() 72 alignment - 1); in AlignedMalloc() 84 // The buffer should be aligned with 'alignment' bytes. The - 1 guarantees in AlignedMalloc() [all …]
|
| /external/clang/test/Sema/ |
| D | ms_bitfield_layout.c | 18 // CHECK: Alignment:32 30 // CHECK: Alignment:16 42 // CHECK: Alignment:32 54 // CHECK: Alignment:8 67 // CHECK: Alignment:16 86 // CHECK: Alignment:16 99 // CHECK: Alignment:16 111 // CHECK: Alignment:16 121 // CHECK: Alignment:16 138 // CHECK: Alignment:8 [all …]
|
| /external/llvm/lib/ExecutionEngine/MCJIT/ |
| D | SectionMemoryManager.cpp | 22 unsigned Alignment, in allocateDataSection() argument 27 return allocateSection(RODataMem, Size, Alignment); in allocateDataSection() 28 return allocateSection(RWDataMem, Size, Alignment); in allocateDataSection() 32 unsigned Alignment, in allocateCodeSection() argument 35 return allocateSection(CodeMem, Size, Alignment); in allocateCodeSection() 40 unsigned Alignment) { in allocateSection() argument 41 if (!Alignment) in allocateSection() 42 Alignment = 16; in allocateSection() 44 assert(!(Alignment & (Alignment - 1)) && "Alignment must be a power of two."); in allocateSection() 46 uintptr_t RequiredSize = Alignment * ((Size + Alignment - 1)/Alignment + 1); in allocateSection() [all …]
|
| /external/chromium_org/third_party/webrtc/system_wrappers/interface/ |
| D | aligned_malloc.h | 18 // Note: alignment must be a power of two. The alignment is in bytes. 24 // Returns a pointer to the first boundry of |alignment| bytes following the 28 void* GetRightAlign(const void* ptr, size_t alignment); 30 // Allocates memory of |size| bytes aligned on an |alignment| boundry. 33 void* AlignedMalloc(size_t size, size_t alignment); 40 T* GetRightAlign(const T* ptr, size_t alignment) { in GetRightAlign() argument 42 alignment)); in GetRightAlign() 45 T* AlignedMalloc(size_t size, size_t alignment) { in AlignedMalloc() argument 46 return reinterpret_cast<T*>(AlignedMalloc(size, alignment)); in AlignedMalloc()
|