Home
last modified time | relevance | path

Searched full:alignment (Results 1 – 25 of 3524) sorted by relevance

12345678910>>...141

/external/deqp/framework/delibs/decpp/
DdePoolArray.hpp38 template<typename T, deUint32 Alignment>
41 template<typename T, deUint32 Alignment>
51 template<typename T, deUint32 Alignment = (sizeof(T) > sizeof(void*) ? (deUint32)sizeof(void*) : (d…
55 typedef PoolArrayIterator<T, Alignment> Iterator;
56 typedef PoolArrayConstIterator<T, Alignment> ConstIterator;
62 PoolArray (MemPool* pool, const PoolArray<T, Alignment>& other);
101 …PoolArray (const PoolArray<T, Alignment>& other); // \note Default copy ctor is not allowed, use…
114 template<typename T, deUint32 Alignment>
127 template<typename T, deUint32 Alignment>
128 class PoolArrayConstIterator : public PoolArrayIteratorBase<T, Alignment>
[all …]
DdeArrayBuffer.hpp36 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/
Dposix_memalign.c21 size_t alignment; in TEST_BEGIN() local
24 for (alignment = 0; alignment < sizeof(void *); alignment++) { in TEST_BEGIN()
25 assert_d_eq(posix_memalign(&p, alignment, 1), EINVAL, in TEST_BEGIN()
26 "Expected error for invalid alignment %zu", in TEST_BEGIN()
27 alignment); in TEST_BEGIN()
30 for (alignment = sizeof(size_t); alignment < MAXALIGN; in TEST_BEGIN()
31 alignment <<= 1) { in TEST_BEGIN()
32 assert_d_ne(posix_memalign(&p, alignment + 1, 1), 0, in TEST_BEGIN()
33 "Expected error for invalid alignment %zu", in TEST_BEGIN()
34 alignment + 1); in TEST_BEGIN()
[all …]
Daligned_alloc.c21 size_t alignment; in TEST_BEGIN() local
24 alignment = 0; in TEST_BEGIN()
26 p = aligned_alloc(alignment, 1); in TEST_BEGIN()
28 "Expected error for invalid alignment %zu", alignment); in TEST_BEGIN()
30 for (alignment = sizeof(size_t); alignment < MAXALIGN; in TEST_BEGIN()
31 alignment <<= 1) { in TEST_BEGIN()
33 p = aligned_alloc(alignment + 1, 1); in TEST_BEGIN()
35 "Expected error for invalid alignment %zu", in TEST_BEGIN()
36 alignment + 1); in TEST_BEGIN()
43 size_t alignment, size; in TEST_BEGIN() local
[all …]
/external/python/cpython2/Lib/lib2to3/tests/data/
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_st)
143 assert alignment(asn1_string_st) == 4, alignment(asn1_string_st)
153 assert alignment(ASN1_ENCODING_st) == 4, alignment(ASN1_ENCODING_st)
165 assert alignment(asn1_string_table_st) == 4, alignment(asn1_string_table_st)
230 assert alignment(N12asn1_type_st4DOLLAR_11E) == 4, alignment(N12asn1_type_st4DOLLAR_11E)
236 assert alignment(asn1_type_st) == 4, alignment(asn1_type_st)
[all …]
/external/skia/tests/
DSkSLMemoryLayoutTest.cpp37 REPORTER_ASSERT(r, 4 == layout.alignment(*context.fFloat_Type)); in DEF_TEST()
38 REPORTER_ASSERT(r, 8 == layout.alignment(*context.fVec2_Type)); in DEF_TEST()
39 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fVec3_Type)); in DEF_TEST()
40 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fVec4_Type)); in DEF_TEST()
41 REPORTER_ASSERT(r, 4 == layout.alignment(*context.fInt_Type)); in DEF_TEST()
42 REPORTER_ASSERT(r, 8 == layout.alignment(*context.fIVec2_Type)); in DEF_TEST()
43 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fIVec3_Type)); in DEF_TEST()
44 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fIVec4_Type)); in DEF_TEST()
45 REPORTER_ASSERT(r, 1 == layout.alignment(*context.fBool_Type)); in DEF_TEST()
46 REPORTER_ASSERT(r, 2 == layout.alignment(*context.fBVec2_Type)); in DEF_TEST()
[all …]
DMemsetTest.cpp51 for (int alignment = 0; alignment < MAX_ALIGNMENT; ++alignment) { in test_16() local
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() local
71 uint32_t* base = &buffer[PAD + alignment]; in test_32()
74 compare32(reporter, buffer, 0, PAD + alignment); in test_32()
76 compare32(reporter, base + count, 0, TOTAL - count - PAD - alignment); in test_32()
84 * depending on the alignment of the dst, and/or the size of the count.
/external/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/
Dp5.cpp3 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/swiftshader/third_party/LLVM/include/llvm/Target/
DTargetData.h1 //===-- llvm/Target/TargetData.h - Data size & alignment info ---*- C++ -*-===//
10 // This file defines target properties related to datatype size/offset/alignment
39 /// Enum used to categorize the alignment types stored by TargetAlignElem
41 INTEGER_ALIGN = 'i', ///< Integer type alignment
42 VECTOR_ALIGN = 'v', ///< Vector type alignment
43 FLOAT_ALIGN = 'f', ///< Floating point type alignment
44 AGGREGATE_ALIGN = 'a', ///< Aggregate alignment
45 STACK_ALIGN = 's' ///< Stack objects alignment
48 /// Target alignment element.
50 /// Stores the alignment data associated with a given alignment type (pointer,
[all …]
/external/swiftshader/third_party/LLVM/include/llvm/Support/
DAlignOf.h1 //===--- AlignOf.h - Portable calculation of type alignment -----*- C++ -*-===//
29 /// the alignment of the template argument. For example,
30 /// AlignOf<int>::Alignment represents the alignment of type "int". The
31 /// alignment calculated is the minimum alignment, and not necessarily
32 /// the "desired" alignment returned by GCC's __alignof__ (for example). Note
33 /// that because the alignment is an enum value, it can be used as a
37 enum { Alignment = enumerator
40 enum { Alignment_GreaterEqual_2Bytes = Alignment >= 2 ? 1 : 0 };
41 enum { Alignment_GreaterEqual_4Bytes = Alignment >= 4 ? 1 : 0 };
42 enum { Alignment_GreaterEqual_8Bytes = Alignment >= 8 ? 1 : 0 };
[all …]
/external/llvm/include/llvm/Support/
DAlignOf.h1 //===--- AlignOf.h - Portable calculation of type alignment -----*- C++ -*-===//
26 // For everything other than an abstract class we can calulate alignment by
33 // generated by any class using AlignOf<T> with a manually specified alignment.
44 // Abstract base class helper, this will have the minimal alignment and size
51 // When we have an abstract class type, specialize the alignment computation
64 /// the alignment of the template argument. For example,
65 /// AlignOf<int>::Alignment represents the alignment of type "int". The
66 /// alignment calculated is the minimum alignment, and not necessarily
67 /// the "desired" alignment returned by GCC's __alignof__ (for example). Note
68 /// that because the alignment is an enum value, it can be used as a
[all …]
/external/webrtc/webrtc/system_wrappers/source/
Daligned_malloc.cc24 // 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 …]
Daligned_malloc_unittest.cc25 // 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/test/MC/ARM/
Dneon-vld-vst-align.s13 @ 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/skia/src/sksl/
DSkSLMemoryLayout.h43 * Returns a type's required alignment when used as a standalone variable.
45 size_t alignment(const Type& type) const { in alignment() function
56 return this->roundUpIfNeeded(this->alignment(type.componentType())); in alignment()
60 size_t alignment = this->alignment(*f.fType); in alignment() local
61 if (alignment > result) { in alignment()
62 result = alignment; in alignment()
80 return this->alignment(type); in stride()
106 size_t alignment = this->alignment(*f.fType); in size() local
107 if (total % alignment != 0) { in size()
108 total += alignment - total % alignment; in size()
[all …]
/external/syslinux/com32/lib/sys/module/
Delfutils.c39 int elf_malloc(void **memptr, size_t alignment, size_t size) { in elf_malloc() argument
43 if ((alignment & (alignment - 1)) != 0) in elf_malloc()
45 if (alignment % sizeof(void*) != 0) in elf_malloc()
46 alignment = sizeof(void*); in elf_malloc()
48 start_addr = malloc(size + (alignment > sizeof(struct memalign_info) ? in elf_malloc()
49 alignment : sizeof(struct memalign_info))); in elf_malloc()
56 ((unsigned long)start_addr % alignment) + in elf_malloc()
57 alignment - sizeof(struct memalign_info)); in elf_malloc()
75 int elf_malloc(void **memptr, size_t alignment, size_t size) { in elf_malloc() argument
76 if ((alignment & (alignment - 1)) != 0) in elf_malloc()
[all …]
/external/llvm/lib/Transforms/Utils/
DASanStackFrameLayout.cpp21 // 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 alignTo(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/swiftshader/third_party/LLVM/lib/Support/
DAllocator.cpp32 /// AlignPtr - Align Ptr to Alignment bytes, rounding up. Alignment should
35 char *BumpPtrAllocator::AlignPtr(char *Ptr, size_t Alignment) { in AlignPtr() argument
36 assert(Alignment && (Alignment & (Alignment - 1)) == 0 && in AlignPtr()
37 "Alignment is not a power of two!"); in AlignPtr()
39 // Do the alignment. in AlignPtr()
40 return (char*)(((uintptr_t)Ptr + Alignment - 1) & in AlignPtr()
41 ~(uintptr_t)(Alignment - 1)); in AlignPtr()
87 /// Allocate - Allocate space at the specified alignment.
89 void *BumpPtrAllocator::Allocate(size_t Size, size_t Alignment) { in Allocate() argument
96 // 0-byte alignment means 1-byte alignment. in Allocate()
[all …]
/external/llvm/unittests/Support/
DAlignOfTest.cpp1 //=== - 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.
108 // Ensure alignment is a compile-time constant.
110 [AlignOf<char>::Alignment > 0]
111 [AlignOf<short>::Alignment > 0]
112 [AlignOf<int>::Alignment > 0]
113 [AlignOf<long>::Alignment > 0]
114 [AlignOf<long long>::Alignment > 0]
[all …]
/external/libcxx/src/
Dnew.cpp179 operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC in operator new() argument
183 if (static_cast<size_t>(alignment) < sizeof(void*)) in operator new()
184 alignment = std::align_val_t(sizeof(void*)); in operator new()
187 while ((p = _aligned_malloc(size, static_cast<size_t>(alignment))) == nullptr) in operator new()
189 while (::posix_memalign(&p, static_cast<size_t>(alignment), size) != 0) in operator new()
211 operator new(size_t size, std::align_val_t alignment, const std::nothrow_t&) _NOEXCEPT in operator new() argument
218 p = ::operator new(size, alignment); in operator new()
230 operator new[](size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC in operator new[]() argument
232 return ::operator new(size, alignment); in operator new[]()
237 operator new[](size_t size, std::align_val_t alignment, const std::nothrow_t&) _NOEXCEPT in operator new[]() argument
[all …]
/external/eigen/test/
Ddynalloc.cpp13 #define ALIGNMENT EIGEN_MAX_ALIGN_BYTES macro
15 #define ALIGNMENT 1 macro
25 VERIFY(internal::UIntPtr(p)%ALIGNMENT==0); in check_handmade_aligned_malloc()
34 for(int i = ALIGNMENT; i < 1000; i++) in check_aligned_malloc()
37 VERIFY(internal::UIntPtr(p)%ALIGNMENT==0); in check_aligned_malloc()
46 for(int i = ALIGNMENT; i < 1000; i++) in check_aligned_new()
49 VERIFY(internal::UIntPtr(p)%ALIGNMENT==0); in check_aligned_new()
58 for(int i = ALIGNMENT; i < 400; i++) in check_aligned_stack_alloc()
61 VERIFY(internal::UIntPtr(p)%ALIGNMENT==0); in check_aligned_stack_alloc()
86 // TODO have to be updated once we support multiple alignment values in check_dynaligned()
[all …]
/external/clang/lib/AST/
DRecordLayoutBuilder.cpp59 /// 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 __anona2f417160111::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/jemalloc/include/jemalloc/internal/
Djemalloc_internal.h203 * n: alignment
212 /* Use MALLOCX_ALIGN_GET() if alignment may not be specified in flags. */
229 * Minimum allocation alignment is 2^LG_QUANTUM bytes (ignoring tiny size
282 # error "Unknown minimum alignment for architecture; specify via "
339 #define ALIGNMENT_ADDR2BASE(a, alignment) \ argument
340 ((void *)((uintptr_t)(a) & ((~(alignment)) + 1)))
343 #define ALIGNMENT_ADDR2OFFSET(a, alignment) \ argument
344 ((size_t)((uintptr_t)(a) & (alignment - 1)))
346 /* Return the smallest alignment multiple that is >= s. */
347 #define ALIGNMENT_CEILING(s, alignment) \ argument
[all …]
Djemalloc_internal.h.in203 * n: alignment
212 /* Use MALLOCX_ALIGN_GET() if alignment may not be specified in flags. */
229 * Minimum allocation alignment is 2^LG_QUANTUM bytes (ignoring tiny size
282 # error "Unknown minimum alignment for architecture; specify via "
339 #define ALIGNMENT_ADDR2BASE(a, alignment) \ argument
340 ((void *)((uintptr_t)(a) & ((~(alignment)) + 1)))
343 #define ALIGNMENT_ADDR2OFFSET(a, alignment) \ argument
344 ((size_t)((uintptr_t)(a) & (alignment - 1)))
346 /* Return the smallest alignment multiple that is >= s. */
347 #define ALIGNMENT_CEILING(s, alignment) \ argument
[all …]
/external/universal-tween-engine/java/applets/src/aurelienribon/tweenengine/applets/
DTimelineApplet.form19 <Group type="102" alignment="0" attributes="0">
22 <Component id="jPanel1" alignment="1" max="32767" attributes="0"/>
23 <Component id="jPanel4" alignment="0" max="32767" attributes="1"/>
24 <Group type="102" alignment="1" attributes="0">
36 <Group type="102" alignment="1" attributes="0">
40 <Component id="jPanel3" alignment="0" max="32767" attributes="0"/>
62 <Group type="102" alignment="0" attributes="0">
65 … <Component id="jScrollPane1" alignment="0" pref="598" max="32767" attributes="0"/>
66 <Group type="102" alignment="0" attributes="0">
78 <Group type="102" alignment="0" attributes="0">
[all …]

12345678910>>...141