Home
last modified time | relevance | path

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

12345678910>>...325

/external/deqp/framework/delibs/decpp/
DdePoolArray.hpp38 template <typename T, uint32_t Alignment>
41 template <typename T, uint32_t Alignment>
52 …uint32_t Alignment = (sizeof(T) > sizeof(void *) ? (uint32_t)sizeof(void *) : (uint32_t)sizeof(T))>
56 typedef PoolArrayIterator<T, Alignment> Iterator;
57 typedef PoolArrayConstIterator<T, Alignment> ConstIterator;
63 PoolArray(MemPool *pool, const PoolArray<T, Alignment> &other);
144 PoolArray(const PoolArray<T, Alignment>
158 template <typename T, uint32_t Alignment>
178 template <typename T, uint32_t Alignment>
179 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() : m_ptr(nullptr) in ArrayBuffer()
82 template <typename T, size_t Alignment, size_t Stride>
83 ArrayBuffer<T, Alignment, Stride>::ArrayBuffer(size_t numElements) : m_ptr(nullptr) in ArrayBuffer()
90 void *const ptr = detail::ArrayBuffer_AlignedMalloc(storageSize, Alignment); in ArrayBuffer()
100 template <typename T, size_t Alignment, size_t Stride>
101 ArrayBuffer<T, Alignment, Stride>::ArrayBuffer(const T *ptr, size_t numElements) : m_ptr(nullptr) in ArrayBuffer()
107 ArrayBuffer<T, Alignment, Stride> tmp(numElements); in ArrayBuffer()
[all …]
/external/skia/tests/graphite/
DUniformOffsetCalculatorTest.cpp17 // Used to test the exact alignment and size of an individual type. Returns the alignment and size
20 int alignment; member
26 // Set the start offset at 1 to force alignment. in calculate_alignment_and_size()
29 int alignment = calc.advanceOffset(type, arrayCount); in calculate_alignment_and_size() local
30 return {alignment, calc.size() - alignment}; in calculate_alignment_and_size()
37 // Set the start offset at 1 to force alignment. in calculate_struct_alignment_and_size()
46 int alignment = outer.advanceStruct(substruct, arrayCount); in calculate_struct_alignment_and_size() local
47 SkASSERT(alignment == substruct.requiredAlignment()); in calculate_struct_alignment_and_size()
48 return {alignment, outer.size() - alignment}; in calculate_struct_alignment_and_size()
53 auto [alignment, size] = calculate_alignment_and_size(kLayout, type); \
[all …]
/external/sdv/vsomeip/third_party/boost/align/test/
Daligned_allocator_test.cpp13 template<std::size_t Alignment>
17 boost::alignment::aligned_allocator<int, Alignment> a; in test_allocate()
20 BOOST_TEST(boost::alignment::is_aligned(p, Alignment)); in test_allocate()
25 boost::alignment::aligned_allocator<int, Alignment> a; in test_allocate()
31 template<std::size_t Alignment>
34 boost::alignment::aligned_allocator<int, Alignment> a; in test_construct()
42 template<std::size_t Alignment>
46 boost::alignment::aligned_allocator<char, Alignment> a1; in test_constructor()
47 boost::alignment::aligned_allocator<int, Alignment> a2(a1); in test_constructor()
51 boost::alignment::aligned_allocator<char, Alignment> a1; in test_constructor()
[all …]
Daligned_allocator_adaptor_test.cpp72 template<std::size_t Alignment>
76 boost::alignment::aligned_allocator_adaptor<A<int>, Alignment> a(5); in test_allocate()
79 BOOST_TEST(boost::alignment::is_aligned(p, Alignment)); in test_allocate()
84 boost::alignment::aligned_allocator_adaptor<A<int>, Alignment> a(5); in test_allocate()
88 BOOST_TEST(boost::alignment::is_aligned(q, Alignment)); in test_allocate()
94 boost::alignment::aligned_allocator_adaptor<A<int>, Alignment> a(5); in test_allocate()
100 template<std::size_t Alignment>
103 boost::alignment::aligned_allocator_adaptor<A<int>, Alignment> a(5); in test_construct()
111 template<std::size_t Alignment>
115 boost::alignment::aligned_allocator_adaptor<A<char>, Alignment> a(5); in test_constructor()
[all …]
Dalign_test.cpp12 template<std::size_t Alignment>
15 char s[Alignment << 1]; in test()
17 while (!boost::alignment::is_aligned(b, Alignment)) { in test()
21 std::size_t n = Alignment; in test()
23 void* q = boost::alignment::align(Alignment, 1, p, n); in test()
26 BOOST_TEST(boost::alignment::is_aligned(q, Alignment)); in test()
27 BOOST_TEST(n == Alignment); in test()
32 void* q = boost::alignment::align(Alignment, 1, p, n); in test()
38 std::size_t n = Alignment - 1; in test()
40 void* q = boost::alignment::align(Alignment, 1, p, n); in test()
[all …]
Daligned_alloc_test.cpp13 void test(std::size_t alignment) in test() argument
16 void* p = boost::alignment::aligned_alloc(alignment, alignment + 1); in test()
18 BOOST_TEST(boost::alignment::is_aligned(p, alignment)); in test()
19 std::memset(p, 0, alignment); in test()
20 boost::alignment::aligned_free(p); in test()
23 void* p = boost::alignment::aligned_alloc(alignment, 1); in test()
25 BOOST_TEST(boost::alignment::is_aligned(p, alignment)); in test()
27 boost::alignment::aligned_free(p); in test()
30 void* p = boost::alignment::aligned_alloc(alignment, 0); in test()
31 boost::alignment::aligned_free(p); in test()
/external/python/cpython3/Objects/mimalloc/
Dalloc-aligned.c19 …gned_at_fallback(mi_heap_t* const heap, const size_t size, const size_t alignment, const size_t of… in mi_heap_malloc_zero_aligned_at_fallback() argument
22 mi_assert_internal(alignment != 0 && _mi_is_power_of_two(alignment)); in mi_heap_malloc_zero_aligned_at_fallback()
24 const uintptr_t align_mask = alignment - 1; // for any x, `(x & align_mask) == (x % alignment)` in mi_heap_malloc_zero_aligned_at_fallback()
27 // use regular allocation if it is guaranteed to fit the alignment constraints in mi_heap_malloc_zero_aligned_at_fallback()
28 …if (offset==0 && alignment<=padsize && padsize<=MI_MAX_ALIGN_GUARANTEE && (padsize&align_mask)==0)… in mi_heap_malloc_zero_aligned_at_fallback()
30 mi_assert_internal(p == NULL || ((uintptr_t)p % alignment) == 0); in mi_heap_malloc_zero_aligned_at_fallback()
36 if mi_unlikely(alignment > MI_ALIGNMENT_MAX) { in mi_heap_malloc_zero_aligned_at_fallback()
37 …// use OS allocation for very large alignment and allocate inside a huge page (dedicated segment w… in mi_heap_malloc_zero_aligned_at_fallback()
41 // todo: cannot support offset alignment for very large alignments yet in mi_heap_malloc_zero_aligned_at_fallback()
43 …tion with a very large alignment cannot be used with an alignment offset (size %zu, alignment %zu,… in mi_heap_malloc_zero_aligned_at_fallback()
[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/sdv/vsomeip/third_party/boost/align/doc/
Dalign.qbk20 and macros, for the control, inspection, and diagnostic of memory alignment.
28 C++11 added the ability to specify increased alignment (over-alignment) for
32 allocation functions and allocators that respect the alignment requirements of
36 [[`aligned_alloc(alignment, size)`]
44 [heading Pointer alignment]
53 [heading Querying alignment]
56 the alignment requirement of a type. Unfortunately some C++ standard library
63 [heading Hinting alignment]
67 compiler of a given alignment property of a memory block. This library
71 [heading Checking alignment]
[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/rust/android-crates-io/crates/vulkano/src/memory/allocator/
Dlayout.rs26 alignment: DeviceAlignment, field
31 /// nearest multiple of its layout's alignment.
42 let (size, alignment) = Self::size_alignment_from_layout(&layout); in from_layout()
57 Ok(unsafe { DeviceLayout::new_unchecked(size, alignment) }) in from_layout()
68 let (size, alignment) = (self.size(), self.alignment().as_devicesize()); in into_layout()
78 Ok(unsafe { Layout::from_size_align_unchecked(size as usize, alignment as usize) }) in into_layout()
85 if size > usize::MAX as DeviceSize || alignment > usize::MAX as DeviceSize { in into_layout()
87 } else if let Ok(layout) = Layout::from_size_align(size as usize, alignment as usize) { in into_layout()
95 /// Creates a new `DeviceLayout` from the given `size` and `alignment`.
97 /// Returns [`None`] if `size` is zero, `alignment` is not a power of two, or if `size` would
[all …]
/external/pigweed/pw_bytes/public/pw_bytes/
Dalignment.h26 /// Returns whether the given pointer meets the given alignment requirement.
27 inline bool IsAlignedAs(const void* ptr, size_t alignment) { in IsAlignedAs() argument
28 return (cpp20::bit_cast<uintptr_t>(ptr) % alignment) == 0; in IsAlignedAs()
31 /// Returns whether the given pointer meets the alignment requirement for the
38 /// Returns the value rounded down to the nearest multiple of alignment.
39 constexpr size_t AlignDown(uintptr_t value, size_t alignment) { in AlignDown() argument
40 PW_ASSERT(!PW_MUL_OVERFLOW((value / alignment), alignment, &value)); in AlignDown()
44 /// Returns the value rounded down to the nearest multiple of alignment.
46 constexpr T* AlignDown(T* value, size_t alignment) { in AlignDown() argument
48 AlignDown(reinterpret_cast<uintptr_t>(value), alignment)); in AlignDown()
[all …]
/external/cronet/tot/base/memory/
Daligned_memory.h28 // sized alignment:
31 // size, alignment);
32 // CHECK(reinterpret_cast<uintptr_t>(array.data()) % alignment == 0);
38 // auto [a, s] = base::AlignedUninitCharArray<float>(size, alignment);
41 // CHECK(reinterpret_cast<uintptr_t>(array.data()) % alignment == 0);
42 // CHECK(reinterpret_cast<uintptr_t>(span.data()) % alignment == 0);
47 // float* my_array = static_cast<float*>(AlignedAlloc(size, alignment));
48 // CHECK(reinterpret_cast<uintptr_t>(my_array) % alignment == 0);
56 // Allocate memory of size `size` aligned to `alignment`.
59 // alignment.
[all …]
/external/cronet/stable/base/memory/
Daligned_memory.h28 // sized alignment:
31 // size, alignment);
32 // CHECK(reinterpret_cast<uintptr_t>(array.data()) % alignment == 0);
38 // auto [a, s] = base::AlignedUninitCharArray<float>(size, alignment);
41 // CHECK(reinterpret_cast<uintptr_t>(array.data()) % alignment == 0);
42 // CHECK(reinterpret_cast<uintptr_t>(span.data()) % alignment == 0);
47 // float* my_array = static_cast<float*>(AlignedAlloc(size, alignment));
48 // CHECK(reinterpret_cast<uintptr_t>(my_array) % alignment == 0);
56 // Allocate memory of size `size` aligned to `alignment`.
59 // alignment.
[all …]
/external/pigweed/pw_format/rust/pw_format/
Dcore_fmt.rs31 fixed_width, precision, Alignment, Argument, ConversionSpec, Flag, FormatFragment,
111 fn map_alignment(value: char) -> Result<Alignment, String> { in map_alignment() argument
113 '<' => Ok(Alignment::Left), in map_alignment()
114 '^' => Ok(Alignment::Center), in map_alignment()
115 '>' => Ok(Alignment::Right), in map_alignment()
116 _ => Err(format!("Unsupported alignment '{}'", value)), in map_alignment()
120 /// An alignment flag (`<`, `^`, or `>`).
121 fn bare_alignment(input: &str) -> IResult<&str, Alignment> { in bare_alignment() argument
125 /// A combined fill character and alignment flag (`<`, `^`, or `>`).
126 fn fill_and_alignment(input: &str) -> IResult<&str, (char, Alignment)> { in fill_and_alignment() argument
[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/pigweed/pw_format/rust/pw_format/tests/
Dprintf.rs27 alignment: Alignment::None, in test_parse()
39 alignment: Alignment::Left, in test_parse()
155 alignment: Alignment::None, in test_integer()
177 alignment: Alignment::Left, in test_integer_with_minus()
199 alignment: Alignment::None, in test_integer_with_plus()
221 alignment: Alignment::None, in test_integer_with_blank_space()
243 alignment: Alignment::None, in test_integer_with_plus_and_blank_space_ignores_blank_space()
260 alignment: Alignment::None, in test_integer_with_plus_and_blank_space_ignores_blank_space()
282 alignment: Alignment::None, in test_integer_with_hash()
304 alignment: Alignment::None, in test_integer_with_zero()
[all …]
Dcore_fmt.rs29 alignment: Alignment::None, in std_fmt_examples_parse_correctly()
48 alignment: Alignment::None, in std_fmt_examples_parse_correctly()
65 alignment: Alignment::None, in std_fmt_examples_parse_correctly()
82 alignment: Alignment::None, in std_fmt_examples_parse_correctly()
99 alignment: Alignment::None, in std_fmt_examples_parse_correctly()
116 alignment: Alignment::None, in std_fmt_examples_parse_correctly()
133 alignment: Alignment::Left, in std_fmt_examples_parse_correctly()
150 alignment: Alignment::Left, in std_fmt_examples_parse_correctly()
167 alignment: Alignment::Center, in std_fmt_examples_parse_correctly()
184 alignment: Alignment::Right, in std_fmt_examples_parse_correctly()
[all …]
/external/swiftshader/third_party/llvm-16.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 " << DebugStr(Alignment) in clampStackAlignment()
[all …]
/external/googleapis/google/genomics/v1/
Dreadalignment.proto30 // A linear alignment can be represented by one CIGAR string. Describes the
31 // mapped position and local alignment of the read to the reference.
33 // The position of this alignment.
36 // The mapping quality of this alignment. Represents how likely
43 // Represents the local alignment of this sequence (alignment matches, indels,
48 // A read alignment describes a linear alignment of a string of DNA to a
60 // Mapped reads (reads having a non-null `alignment`) can be aligned to either
62 // of a mapped read is encoded by `alignment.position.reverseStrand`.
67 // to right. That is, `alignment.position.position` always refers to the
68 // left-most reference coordinate and `alignment.cigar` describes the alignment
[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/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/speex/doc/
Dmanual.lyx3364 <column alignment="center" valignment="top" width="0pt">
3365 <column alignment="center" valignment="top" width="0pt">
3366 <column alignment="center" valignment="top" width="0pt">
3368 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="…
3377 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="…
3386 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightlin…
3397 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3406 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3415 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="n…
3426 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
[all …]

12345678910>>...325