| /third_party/flutter/flutter/packages/flutter/test/painting/ |
| D | alignment_test.dart | 10 void approxExpect(Alignment a, Alignment b) { 16 test('Alignment control test', () { 17 const Alignment alignment = Alignment(0.5, 0.25); 19 expect(alignment, hasOneLineDescription); 20 expect(alignment.hashCode, equals(const Alignment(0.5, 0.25).hashCode)); 22 expect(alignment / 2.0, const Alignment(0.25, 0.125)); 23 expect(alignment ~/ 2.0, const Alignment(0.0, 0.0)); 24 expect(alignment % 5.0, const Alignment(0.5, 0.25)); 27 test('Alignment.lerp()', () { 28 const Alignment a = Alignment.topLeft; [all …]
|
| D | gradient_test.dart | 12 begin: Alignment.bottomRight, 13 end: Alignment(0.7, 1.0), 23 begin: Alignment.bottomRight, 24 end: Alignment(0.7, 1.0), 35 begin: Alignment.topLeft, 36 end: Alignment.bottomLeft, 43 begin: Alignment.topRight, 44 end: Alignment.topLeft, 53 begin: Alignment(0.0, -1.0), 54 end: Alignment(-1.0, 0.0), [all …]
|
| /third_party/vk-gl-cts/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) > 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 …]
|
| 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 …]
|
| /third_party/python/Lib/lib2to3/tests/data/ |
| D | infinite_recursion.py | 41 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 …]
|
| /third_party/flutter/flutter/packages/flutter/lib/src/painting/ |
| D | alignment.dart | 11 /// Base class for [Alignment] that allows for text-direction aware 15 /// Alignment] and its variants, or [new AlignmentDirectional]. 18 /// [Alignment] object, call the [resolve] method. 33 /// If you know you are adding two [Alignment] or two [AlignmentDirectional] 37 /// If [add] is applied to two objects of the same type ([Alignment] or 41 /// into a concrete [Alignment] using [resolve]. 79 /// If either is null, this function interpolates from [Alignment.center], and 82 /// If [lerp] is applied to two objects of the same type ([Alignment] or 86 /// into a concrete [Alignment] using [resolve]. 97 if (a is Alignment && b is Alignment) [all …]
|
| /third_party/flutter/skia/tests/ |
| D | SkSLMemoryLayoutTest.cpp | 35 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 …]
|
| D | MemsetTest.cpp | 51 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.
|
| /third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/ |
| D | MachineFrameInfo.cpp | 31 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 …]
|
| /third_party/skia/tests/ |
| D | SkSLMemoryLayoutTest.cpp | 40 REPORTER_ASSERT(r, 4 == layout.alignment(*context.fTypes.fFloat)); in DEF_TEST() 41 REPORTER_ASSERT(r, 8 == layout.alignment(*context.fTypes.fFloat2)); in DEF_TEST() 42 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fFloat3)); in DEF_TEST() 43 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fFloat4)); in DEF_TEST() 44 REPORTER_ASSERT(r, 4 == layout.alignment(*context.fTypes.fInt)); in DEF_TEST() 45 REPORTER_ASSERT(r, 8 == layout.alignment(*context.fTypes.fInt2)); in DEF_TEST() 46 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fInt3)); in DEF_TEST() 47 REPORTER_ASSERT(r, 16 == layout.alignment(*context.fTypes.fInt4)); in DEF_TEST() 48 REPORTER_ASSERT(r, 1 == layout.alignment(*context.fTypes.fBool)); in DEF_TEST() 49 REPORTER_ASSERT(r, 2 == layout.alignment(*context.fTypes.fBool2)); in DEF_TEST() [all …]
|
| D | MemsetTest.cpp | 51 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.
|
| /third_party/musl/ndk-test/sanitize/scudo/src/ |
| D | memalign.c | 10 // tests for the condition where the alignment is not a power of 2. 21 void *aligned_alloc(size_t alignment, size_t size); 25 size_t alignment = 1U << 12; in main() local 32 posix_memalign(&p, alignment, size); in main() 34 assert(((uintptr_t)p & (alignment - 1)) == 0); in main() 36 p = aligned_alloc(alignment, size); in main() 38 assert(((uintptr_t)p & (alignment - 1)) == 0); in main() 40 // Tests various combinations of alignment and sizes in main() 42 alignment = 1U << i; in main() 46 p = memalign(alignment, size - (2 * sizeof(void *) * k)); in main() [all …]
|
| /third_party/skia/third_party/externals/dawn/src/common/ |
| D | Math.h | 51 bool IsPtrAligned(const void* ptr, size_t alignment); 52 void* AlignVoidPtr(void* ptr, size_t alignment); 53 bool IsAligned(uint32_t value, size_t alignment); 56 T Align(T value, size_t alignment) { in Align() argument 57 ASSERT(value <= std::numeric_limits<T>::max() - (alignment - 1)); in Align() 58 ASSERT(IsPowerOfTwo(alignment)); in Align() 59 ASSERT(alignment != 0); in Align() 60 T alignmentT = static_cast<T>(alignment); in Align() 65 DAWN_FORCE_INLINE T* AlignPtr(T* ptr, size_t alignment) { in AlignPtr() argument 66 ASSERT(IsPowerOfTwo(alignment)); in AlignPtr() [all …]
|
| /third_party/flutter/skia/src/sksl/ |
| D | SkSLMemoryLayout.h | 45 * Returns a type's required alignment when used as a standalone variable. 47 size_t alignment(const Type& type) const { in alignment() function 58 return this->roundUpIfNeeded(this->alignment(type.componentType())); in alignment() 62 size_t alignment = this->alignment(*f.fType); in alignment() local 63 if (alignment > result) { in alignment() 64 result = alignment; in alignment() 85 int align = this->alignment(type.componentType()); in stride() 118 size_t alignment = this->alignment(*f.fType); in size() local 119 if (total % alignment != 0) { in size() 120 total += alignment - total % alignment; in size() [all …]
|
| /third_party/flutter/flutter/packages/flutter/test/widgets/ |
| D | align_test.dart | 14 alignment: const Alignment(0.50, 0.50), 21 alignment: const Alignment(0.0, 0.0), 28 alignment: Alignment.topLeft, 35 alignment: AlignmentDirectional.topStart, 41 alignment: Alignment.topLeft, 51 alignment: AlignmentDirectional.topStart, 62 alignment: Alignment.topLeft, 75 alignment: AlignmentDirectional.topStart, 86 alignment: Alignment.topLeft, 104 alignment: const Alignment(0.0, 0.0),
|
| /third_party/musl/Benchmark/musl/ |
| D | util.cpp | 25 char* AlignUpMemoy(char* origPtr, size_t alignment) in AlignUpMemoy() argument 27 if ((alignment & (alignment - 1)) != 0) { in AlignUpMemoy() 28 perror("alignment is not a power of two."); in AlignUpMemoy() 32 if (alignment > 0) { in AlignUpMemoy() 33 ptr = ((ptr + (alignment - 1)) & (~(alignment - 1))); in AlignUpMemoy() 39 char* GetAlignedPtr(std::vector<char>* buf, size_t alignment, size_t nbytes) in GetAlignedPtr() argument 41 buf->resize(nbytes + 2 * alignment); in GetAlignedPtr() 42 return AlignUpMemoy(buf->data(), alignment); in GetAlignedPtr() 45 wchar_t* GetAlignedPtr(std::vector<wchar_t>* buf, size_t alignment, size_t nchars) in GetAlignedPtr() argument 47 buf->resize(nchars + ceil((2 * alignment) / sizeof(wchar_t))); in GetAlignedPtr() [all …]
|
| /third_party/flutter/skia/third_party/externals/dawn/src/common/ |
| D | Math.cpp | 55 bool IsPtrAligned(const void* ptr, size_t alignment) { in IsPtrAligned() argument 56 ASSERT(IsPowerOfTwo(alignment)); in IsPtrAligned() 57 ASSERT(alignment != 0); in IsPtrAligned() 58 return (reinterpret_cast<size_t>(ptr) & (alignment - 1)) == 0; in IsPtrAligned() 61 void* AlignVoidPtr(void* ptr, size_t alignment) { in AlignVoidPtr() argument 62 ASSERT(IsPowerOfTwo(alignment)); in AlignVoidPtr() 63 ASSERT(alignment != 0); in AlignVoidPtr() 64 return reinterpret_cast<void*>((reinterpret_cast<size_t>(ptr) + (alignment - 1)) & in AlignVoidPtr() 65 ~(alignment - 1)); in AlignVoidPtr() 68 bool IsAligned(uint32_t value, size_t alignment) { in IsAligned() argument [all …]
|
| /third_party/flutter/flutter/packages/flutter/lib/src/widgets/ |
| D | animated_size.dart | 20 this.alignment = Alignment.center, 27 /// The alignment of the child within the parent when the parent is not yet 30 /// The x and y values of the alignment control the horizontal and vertical 31 /// alignment, respectively. An x value of -1.0 means that the left edge of 38 /// Defaults to [Alignment.center]. 42 /// * [Alignment], a class with convenient constants typically used to 44 /// * [AlignmentDirectional], like [Alignment] for specifying alignments 46 final AlignmentGeometry alignment; 68 alignment: alignment, 80 ..alignment = alignment [all …]
|
| /third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/IR/ |
| D | DataLayout.cpp | 1 //===- DataLayout.cpp - Data size & alignment routines ---------------------==// 9 // This file defines layout properties related to datatype size/offset/alignment 63 // Keep track of maximum alignment constraint. in StructLayout() 104 assert(abi_align <= pref_align && "Preferred alignment worse than ABI!"); in get() 128 assert(ABIAlign <= PrefAlign && "Preferred alignment worse than ABI!"); in get() 287 // ABI alignment. in parseSpecifier() 290 "Missing alignment specification for pointer in datalayout string"); in parseSpecifier() 295 "Pointer ABI alignment must be a power of 2"); in parseSpecifier() 301 // Preferred alignment. in parseSpecifier() 308 "Pointer preferred alignment must be a power of 2"); in parseSpecifier() [all …]
|
| /third_party/skia/src/sksl/ |
| D | SkSLMemoryLayout.h | 47 * Returns a type's required alignment when used as a standalone variable. 49 size_t alignment(const Type& type) const { in alignment() function 60 return this->roundUpIfNeeded(this->alignment(type.componentType())); in alignment() 64 size_t alignment = this->alignment(*f.fType); in alignment() local 65 if (alignment > result) { in alignment() 66 result = alignment; in alignment() 89 int align = this->alignment(type.componentType()); in stride() 125 size_t alignment = this->alignment(*f.fType); in size() local 126 if (total % alignment != 0) { in size() 127 total += alignment - total % alignment; in size() [all …]
|
| /third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/ |
| D | ASanStackFrameLayout.cpp | 22 // We sort the stack variables by alignment (largest first) to minimize 23 // unnecessary large gaps due to alignment. 31 return a.Alignment > b.Alignment; in CompareVars() 34 // We also force minimal alignment for all vars to kMinAlignment so that vars 35 // with e.g. alignment 1 and alignment 16 do not get reordered by CompareVars. 40 // The resulting frame size is a multiple of Alignment. 42 size_t Alignment) { in VarAndRedzoneSize() argument 50 return alignTo(std::max(Res, 2 * Granularity), Alignment); in VarAndRedzoneSize() 63 Vars[i].Alignment = std::max(Vars[i].Alignment, kMinAlignment); in ComputeASanStackFrameLayout() 69 Layout.FrameAlignment = std::max(Granularity, Vars[0].Alignment); in ComputeASanStackFrameLayout() [all …]
|
| /third_party/flutter/flutter/packages/flutter/test/rendering/ |
| D | transform_test.dart | 21 alignment: Alignment.center, 24 …layout(sizer, constraints: BoxConstraints.tight(const Size(100.0, 100.0)), alignment: Alignment.to… 39 alignment: Alignment.center, 45 …layout(sizer, constraints: BoxConstraints.tight(const Size(100.0, 100.0)), alignment: Alignment.to… 60 alignment: Alignment.center, 63 …layout(sizer, constraints: BoxConstraints.tight(const Size(100.0, 100.0)), alignment: Alignment.to… 78 alignment: Alignment.center, 84 …layout(sizer, constraints: BoxConstraints.tight(const Size(100.0, 100.0)), alignment: Alignment.to… 99 alignment: Alignment.center, 102 …layout(sizer, constraints: BoxConstraints.tight(const Size(100.0, 100.0)), alignment: Alignment.to… [all …]
|
| /third_party/gn/src/util/ |
| D | aligned_alloc.h | 48 template <size_t ALIGNMENT> 51 static_assert((ALIGNMENT & (ALIGNMENT - 1)) == 0, in Alloc() 52 "ALIGNMENT must be a power of 2"); in Alloc() 54 return _aligned_malloc(size, ALIGNMENT); in Alloc() 56 if (ALIGNMENT <= sizeof(void*)) { in Alloc() 61 // Allocation size must be a multiple of ALIGNMENT in Alloc() 62 DCHECK((size % ALIGNMENT) == 0); in Alloc() 76 // |ALIGNMENT - sizeof(void*)| extra bytes are required. in Alloc() 77 void* real_block = ::malloc(size + ALIGNMENT - sizeof(void*)); in Alloc() 79 uintptr_t padding = (ALIGNMENT - addr) % ALIGNMENT; in Alloc() [all …]
|
| /third_party/ltp/tools/sparse/sparse-src/validation/ |
| D | alloc-align.c | 5 * value points to memory, where the returned pointer minimum alignment is given 7 * pointer alignment analysis. 9 * The function parameter denoting the allocated alignment is specified by one 17 * declares that my_memalign returns memory with minimum alignment given by 24 * The aligned_alloc function allocates space for an object whose alignment is 25 * specified by alignment, whose size is specified by size, and whose value is 26 * indeterminate. The value of alignment shall be a valid alignment supported 28 * of alignment. 33 void *aligned_alloc(size_t alignment, size_t size) __alloc_align(1);
|
| /third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/IR/ |
| D | DataLayout.h | 1 //===- llvm/DataLayout.h - Data size & alignment info -----------*- C++ -*-===// 9 // This file defines layout properties related to datatype size/offset/alignment 31 #include "llvm/Support/Alignment.h" 50 /// Enum used to categorize the alignment types stored by LayoutAlignElem 59 // FIXME: Currently the DataLayout string carries a "preferred alignment" 64 /// Layout alignment element. 66 /// Stores the alignment data associated with a given alignment type (integer, 72 /// Alignment type from \c AlignTypeEnum 84 /// Layout pointer alignment element. 86 /// Stores the alignment data associated with a given pointer and address space. [all …]
|