Home
last modified time | relevance | path

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

12345678910>>...291

/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_new/test/integration/
Dposix_memalign.c17 size_t alignment; in TEST_BEGIN() local
20 for (alignment = 0; alignment < sizeof(void *); alignment++) { in TEST_BEGIN()
21 assert_d_eq(posix_memalign(&p, alignment, 1), EINVAL, in TEST_BEGIN()
22 "Expected error for invalid alignment %zu", in TEST_BEGIN()
23 alignment); in TEST_BEGIN()
26 for (alignment = sizeof(size_t); alignment < MAXALIGN; in TEST_BEGIN()
27 alignment <<= 1) { in TEST_BEGIN()
28 assert_d_ne(posix_memalign(&p, alignment + 1, 1), 0, in TEST_BEGIN()
29 "Expected error for invalid alignment %zu", in TEST_BEGIN()
30 alignment + 1); in TEST_BEGIN()
[all …]
Daligned_alloc.c17 size_t alignment; in TEST_BEGIN() local
20 alignment = 0; in TEST_BEGIN()
22 p = aligned_alloc(alignment, 1); in TEST_BEGIN()
24 "Expected error for invalid alignment %zu", alignment); in TEST_BEGIN()
26 for (alignment = sizeof(size_t); alignment < MAXALIGN; in TEST_BEGIN()
27 alignment <<= 1) { in TEST_BEGIN()
29 p = aligned_alloc(alignment + 1, 1); in TEST_BEGIN()
31 "Expected error for invalid alignment %zu", in TEST_BEGIN()
32 alignment + 1); in TEST_BEGIN()
38 size_t alignment, size; in TEST_BEGIN() local
[all …]
/external/python/cpython3/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/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/gwp_asan/gwp_asan/tests/
Dalignment.cpp1 //===-- alignment.cpp -------------------------------------------*- C++ -*-===//
14 static size_t getRequiredBackingSize(size_t Size, size_t Alignment, in getRequiredBackingSize() argument
16 return GuardedPoolAllocator::getRequiredBackingSize(Size, Alignment, in getRequiredBackingSize()
19 static uintptr_t alignUp(uintptr_t Ptr, size_t Alignment) { in alignUp() argument
20 return GuardedPoolAllocator::alignUp(Ptr, Alignment); in alignUp()
22 static uintptr_t alignDown(uintptr_t Ptr, size_t Alignment) { in alignDown() argument
23 return GuardedPoolAllocator::alignDown(Ptr, Alignment); in alignDown()
32 // alignment functionality.
36 // Alignment < Page Size. in TEST()
38 /* Ptr */ 0x4000, /* Alignment */ 0x1)); in TEST()
[all …]
/external/llvm-project/llvm/test/CodeGen/SystemZ/
Dframe-26.mir38 alignment: 16
47 - { id: 0, size: 96, alignment: 8 }
48 - { id: 1, size: 1960, alignment: 8 }
49 - { id: 2, size: 8, alignment: 8 }
50 - { id: 3, size: 320, alignment: 8 }
51 - { id: 4, size: 4, alignment: 4 }
52 - { id: 5, size: 8, alignment: 8 }
53 - { id: 6, size: 8, alignment: 8 }
54 - { id: 7, size: 4, alignment: 4 }
55 - { id: 8, size: 8, alignment: 8 }
[all …]
/external/skqp/tests/
DSkSLMemoryLayoutTest.cpp35 REPORTER_ASSERT(r, 4 == layout.alignment(*context.fFloat_Type)); in DEF_TEST()
36 REPORTER_ASSERT(r, 8 == layout.alignment(*context.fFloat2_Type)); in DEF_TEST()
37 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fFloat3_Type)); in DEF_TEST()
38 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fFloat4_Type)); in DEF_TEST()
39 REPORTER_ASSERT(r, 4 == layout.alignment(*context.fInt_Type)); in DEF_TEST()
40 REPORTER_ASSERT(r, 8 == layout.alignment(*context.fInt2_Type)); in DEF_TEST()
41 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fInt3_Type)); in DEF_TEST()
42 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fInt4_Type)); in DEF_TEST()
43 REPORTER_ASSERT(r, 1 == layout.alignment(*context.fBool_Type)); in DEF_TEST()
44 REPORTER_ASSERT(r, 2 == layout.alignment(*context.fBool2_Type)); in DEF_TEST()
[all …]
/external/llvm-project/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/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/llvm-project/llvm/lib/CodeGen/
DMachineFrameInfo.cpp31 void MachineFrameInfo::ensureMaxAlignment(Align Alignment) { in ensureMaxAlignment() argument
33 assert(Alignment <= StackAlignment && in ensureMaxAlignment()
34 "For targets without stack realignment, Alignment is out of limit!"); in ensureMaxAlignment()
35 if (MaxAlignment < Alignment) in ensureMaxAlignment()
36 MaxAlignment = Alignment; in ensureMaxAlignment()
39 /// Clamp the alignment if requested and emit a warning.
40 static inline Align clampStackAlignment(bool ShouldClamp, Align Alignment, in clampStackAlignment() argument
42 if (!ShouldClamp || Alignment <= StackAlignment) in clampStackAlignment()
43 return Alignment; in clampStackAlignment()
44 LLVM_DEBUG(dbgs() << "Warning: requested alignment " << DebugStr(Alignment) in clampStackAlignment()
[all …]
/external/igt-gpu-tools/tests/i915/
Dgem_exec_alignment.c74 uint64_t alignment, max_alignment, count, i; in many() local
91 igt_info("gtt_size=%lld MiB, max-alignment=%lld, count=%lld\n", in many()
115 for (alignment = 4096; alignment < gtt_size; alignment <<= 1) { in many()
117 execobj[i].alignment = alignment; in many()
118 if (alignment > max_alignment) { in many()
119 uint64_t factor = alignment / max_alignment; in many()
125 igt_debug("testing %lld x alignment=%#llx [%db]\n", in many()
127 (long long)alignment, in many()
128 find_last_bit(alignment)-1); in many()
131 igt_assert_eq_u64(execobj[i].alignment, alignment); in many()
[all …]
/external/llvm-project/mlir/lib/Dialect/SPIRV/
DLayoutUtils.cpp9 // This file implements Utilities used to get alignment and layout information
22 Size alignment = 1; in decorateType() local
23 return decorateType(structType, size, alignment); in decorateType()
29 VulkanLayoutUtils::Size &alignment) { in decorateType() argument
57 // "A structure has a base alignment equal to the largest base alignment of in decorateType()
65 // structure or an array and the next multiple of the alignment of that in decorateType()
68 alignment = maxMemberAlignment; in decorateType()
80 VulkanLayoutUtils::Size &alignment) { in decorateType() argument
82 alignment = getScalarTypeAlignment(type); in decorateType()
84 size = alignment; in decorateType()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/
DMachineFrameInfo.cpp31 void MachineFrameInfo::ensureMaxAlignment(Align Alignment) { in ensureMaxAlignment() argument
33 assert(Alignment <= StackAlignment && in ensureMaxAlignment()
34 "For targets without stack realignment, Alignment is out of limit!"); in ensureMaxAlignment()
35 if (MaxAlignment < Alignment) in ensureMaxAlignment()
36 MaxAlignment = Alignment; in ensureMaxAlignment()
39 /// Clamp the alignment if requested and emit a warning.
40 static inline Align clampStackAlignment(bool ShouldClamp, Align Alignment, in clampStackAlignment() argument
42 if (!ShouldClamp || Alignment <= StackAlignment) in clampStackAlignment()
43 return Alignment; in clampStackAlignment()
44 LLVM_DEBUG(dbgs() << "Warning: requested alignment " << Alignment.value() in clampStackAlignment()
[all …]
/external/skia/tests/
DSkSLMemoryLayoutTest.cpp38 REPORTER_ASSERT(r, 4 == layout.alignment(*context.fTypes.fFloat)); in DEF_TEST()
39 REPORTER_ASSERT(r, 8 == layout.alignment(*context.fTypes.fFloat2)); in DEF_TEST()
40 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fFloat3)); in DEF_TEST()
41 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fFloat4)); in DEF_TEST()
42 REPORTER_ASSERT(r, 4 == layout.alignment(*context.fTypes.fInt)); in DEF_TEST()
43 REPORTER_ASSERT(r, 8 == layout.alignment(*context.fTypes.fInt2)); in DEF_TEST()
44 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fInt3)); in DEF_TEST()
45 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fInt4)); in DEF_TEST()
46 REPORTER_ASSERT(r, 1 == layout.alignment(*context.fTypes.fBool)); in DEF_TEST()
47 REPORTER_ASSERT(r, 2 == layout.alignment(*context.fTypes.fBool2)); in DEF_TEST()
[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/llvm-project/lld/test/MachO/
Dcommon-symbol-coalescing.s11 ## its alignment.
13 # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=SMALLER-ALIGNMENT
15 # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=SMALLER-ALIGNMENT
20 # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=LARGER-ALIGNMENT
22 # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=SMALLER-ALIGNMENT
25 # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=LARGER-ALIGNMENT
27 # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=LARGER-ALIGNMENT
30 # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=LARGER-ALIGNMENT
32 # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=LARGER-ALIGNMENT
34 # SMALLER-ALIGNMENT-LABEL: Sections:
[all …]
/external/tensorflow/tensorflow/compiler/tf2tensorrt/utils/
Dtrt_allocator_test.cc23 bool RunTest(const uint64_t alignment, const uint64_t size, in RunTest() argument
28 void* result = Align(alignment, size, ptr, space); in RunTest()
36 EXPECT_EQ(0, ptr_val % alignment); in RunTest()
49 for (uint64_t alignment = 1; alignment <= space * 4; alignment *= 2) { in TEST() local
52 alignment == 1 ? static_cast<uint64_t>(1) : alignment - 1, in TEST()
53 alignment, alignment + 1, alignment + (alignment / 2)}) { in TEST()
54 if (ptr_val % alignment == 0) { in TEST()
59 EXPECT_EQ(space >= size, RunTest(alignment, size, ptr_val, space)); in TEST()
62 EXPECT_FALSE(RunTest(alignment, space, ptr_val, space)); in TEST()
63 const uint64_t diff = alignment - ptr_val % alignment; in TEST()
[all …]
/external/llvm-project/compiler-rt/test/scudo/
Dmemalign.c10 // tests for the condition where the alignment is not a power of 2.
21 void *aligned_alloc(size_t alignment, size_t size);
26 size_t alignment = 1U << 12; in main() local
33 posix_memalign(&p, alignment, size); in main()
35 assert(((uintptr_t)p & (alignment - 1)) == 0); in main()
37 p = aligned_alloc(alignment, size); in main()
39 assert(((uintptr_t)p & (alignment - 1)) == 0); in main()
41 // Tests various combinations of alignment and sizes in main()
43 alignment = 1U << i; in main()
47 p = memalign(alignment, size - (2 * sizeof(void *) * k)); in main()
[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/llvm-project/llvm/test/MC/ARM/
Dneon-vld-vst-align.s13 @ CHECK-ERRORS: alignment must be 64 or omitted
16 @ CHECK-ERRORS: alignment must be 64 or omitted
20 @ CHECK-ERRORS: alignment must be 64 or omitted
23 @ CHECK-ERRORS: alignment must be 64 or omitted
35 @ CHECK-ERRORS: alignment must be 64 or omitted
38 @ CHECK-ERRORS: alignment must be 64 or omitted
42 @ CHECK-ERRORS: alignment must be 64 or omitted
45 @ CHECK-ERRORS: alignment must be 64 or omitted
57 @ CHECK-ERRORS: alignment must be 64 or omitted
60 @ CHECK-ERRORS: alignment must be 64 or omitted
[all …]
/external/llvm-project/compiler-rt/lib/scudo/
Dscudo_errors.cpp30 void NORETURN reportAllocationAlignmentTooBig(uptr Alignment, in reportAllocationAlignmentTooBig() argument
32 dieWithMessage("invalid allocation alignment: %zd exceeds maximum supported " in reportAllocationAlignmentTooBig()
33 "allocation of %zd\n", Alignment, MaxAlignment); in reportAllocationAlignmentTooBig()
36 void NORETURN reportAllocationAlignmentNotPowerOfTwo(uptr Alignment) { in reportAllocationAlignmentNotPowerOfTwo() argument
37 dieWithMessage("invalid allocation alignment: %zd, alignment must be a power " in reportAllocationAlignmentNotPowerOfTwo()
38 "of two\n", Alignment); in reportAllocationAlignmentNotPowerOfTwo()
41 void NORETURN reportInvalidPosixMemalignAlignment(uptr Alignment) { in reportInvalidPosixMemalignAlignment() argument
43 "invalid alignment requested in posix_memalign: %zd, alignment" in reportInvalidPosixMemalignAlignment()
45 Alignment, sizeof(void *)); in reportInvalidPosixMemalignAlignment()
48 void NORETURN reportInvalidAlignedAllocAlignment(uptr Size, uptr Alignment) { in reportInvalidAlignedAllocAlignment() argument
[all …]
/external/webrtc/rtc_base/memory/
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 …]
/external/oss-fuzz/projects/jbig2dec/
Djbig2_fuzzer.cc26 #define ALIGNMENT ((size_t) 16) macro
50 if (size > SIZE_MAX - ALIGNMENT) in jbig2_fuzzer_alloc()
52 if (size + ALIGNMENT > MAX_ALLOCATION - used) in jbig2_fuzzer_alloc()
53 return jbig2_fuzzer_reached_limit(0, size + ALIGNMENT); in jbig2_fuzzer_alloc()
55 ptr = (char *) malloc(size + ALIGNMENT); in jbig2_fuzzer_alloc()
60 used += size + ALIGNMENT; in jbig2_fuzzer_alloc()
62 return ptr + ALIGNMENT; in jbig2_fuzzer_alloc()
71 if (ptr < (void *) ALIGNMENT) in jbig2_fuzzer_free()
74 ptr = (char *) ptr - ALIGNMENT; in jbig2_fuzzer_free()
77 used -= size + ALIGNMENT; in jbig2_fuzzer_free()
[all …]

12345678910>>...291