Home
last modified time | relevance | path

Searched refs:alignment (Results 1 – 25 of 41) sorted by relevance

12

/packages/modules/Virtualization/vmbase/src/
Dutil.rs31 pub const fn unchecked_align_down(addr: usize, alignment: usize) -> usize { in unchecked_align_down()
32 addr & !(alignment - 1) in unchecked_align_down()
38 pub const fn unchecked_align_up(addr: usize, alignment: usize) -> usize { in unchecked_align_up()
39 unchecked_align_down(addr + alignment - 1, alignment) in unchecked_align_up()
43 pub const fn align_up(addr: usize, alignment: usize) -> Option<usize> { in align_up()
44 if !alignment.is_power_of_two() { in align_up()
46 } else if let Some(s) = addr.checked_add(alignment - 1) { in align_up()
47 Some(unchecked_align_down(s, alignment)) in align_up()
57 const fn align_down(addr: usize, alignment: usize) -> Option<usize> { in align_down()
58 if !alignment.is_power_of_two() { in align_down()
[all …]
/packages/modules/Virtualization/authfs/src/
Dcommon.rs29 alignment: usize, field
33 pub fn new(remaining: usize, offset: u64, alignment: usize) -> Self { in new()
34 ChunkedSizeIter { remaining, offset, alignment } in new()
47 self.alignment - (self.offset % self.alignment as u64) as usize, in next()
/packages/modules/NeuralNetworks/runtime/
DCompilationBuilder.cpp279 uint32_t* alignment) const { in getPreferredMemoryAlignmentForInput()
280 CHECK(alignment != nullptr); in getPreferredMemoryAlignmentForInput()
297 *alignment = mPlan.getMemoryPreference(IOType::INPUT, index).alignment; in getPreferredMemoryAlignmentForInput()
324 uint32_t* alignment) const { in getPreferredMemoryAlignmentForOutput()
325 CHECK(alignment != nullptr); in getPreferredMemoryAlignmentForOutput()
342 *alignment = mPlan.getMemoryPreference(IOType::OUTPUT, index).alignment; in getPreferredMemoryAlignmentForOutput()
DCompilationBuilder.h71 int getPreferredMemoryAlignmentForInput(uint32_t index, uint32_t* alignment) const;
73 int getPreferredMemoryAlignmentForOutput(uint32_t index, uint32_t* alignment) const;
DExecutionPlan.cpp221 uint32_t alignment, uint32_t padding) { in addTemporary() argument
223 *totalSizeOfTemporaries = roundUp(*totalSizeOfTemporaries, alignment); in addTemporary()
321 << ", alignment = " << temp.second.alignment in vlogDump()
328 uint32_t alignment, uint32_t padding) { in declare() argument
332 << ", initialLength = " << initialLength << ", alignment = " << alignment in declare()
339 paddedLength, alignment, padding}); in declare()
390 temp.offset = addTemporary(&newSize, temp.paddedLength, temp.alignment, kNoPadding).offset; in allocate()
1314 const auto loc = addTemporary(&totalSizeOfTemporaries, size, memoryPreference.alignment, in makeController()
1410 memoryPreference.alignment, memoryPreference.padding); in makeController()
1428 size, memoryPreference.alignment, memoryPreference.padding); in makeController()
[all …]
/packages/services/Car/cpp/evs/support_library/
DFormatConvert.cpp25 template <unsigned alignment>
27 static_assert((alignment && !(alignment & (alignment - 1))), "alignment must be a power of 2"); in align()
29 unsigned mask = alignment - 1; in align()
/packages/services/Car/cpp/evs/apps/default/src/
DFormatConvert.cpp22 template <unsigned alignment>
24 static_assert((alignment && !(alignment & (alignment - 1))), "alignment must be a power of 2"); in align()
26 unsigned mask = alignment - 1; in align()
/packages/services/Car/cpp/evs/sampleDriver/aidl/src/
DbufferCopy.cpp26 template <unsigned alignment>
28 static_assert((alignment && !(alignment & (alignment - 1))), "alignment must be a power of 2"); in align()
30 unsigned mask = alignment - 1; in align()
/packages/services/Car/cpp/evs/sampleDriver/hidl/
DbufferCopy.cpp38 template <unsigned alignment>
40 static_assert((alignment && !(alignment & (alignment - 1))), "alignment must be a power of 2"); in align()
42 unsigned mask = alignment - 1; in align()
/packages/modules/NeuralNetworks/runtime/test/
DTestGenerated.cpp324 uint32_t alignment = 0, padding = 0; in validateCompilationMemoryPreferences() local
325 ASSERT_EQ(compilation.getPreferredMemoryAlignmentForInput(i, &alignment), in validateCompilationMemoryPreferences()
328 EXPECT_TRUE(isPowerOfTwo(alignment)) << "alignment: " << alignment; in validateCompilationMemoryPreferences()
333 uint32_t alignment = 0, padding = 0; in validateCompilationMemoryPreferences() local
334 ASSERT_EQ(compilation.getPreferredMemoryAlignmentForOutput(i, &alignment), in validateCompilationMemoryPreferences()
338 EXPECT_TRUE(isPowerOfTwo(alignment)) << "alignment: " << alignment; in validateCompilationMemoryPreferences()
DTestNeuralNetworksWrapper.h317 Result getPreferredMemoryAlignmentForInput(uint32_t index, uint32_t* alignment) const { in getPreferredMemoryAlignmentForInput() argument
321 mCompilation, index, alignment))); in getPreferredMemoryAlignmentForInput()
337 Result getPreferredMemoryAlignmentForOutput(uint32_t index, uint32_t* alignment) const { in getPreferredMemoryAlignmentForOutput() argument
341 mCompilation, index, alignment))); in getPreferredMemoryAlignmentForOutput()
/packages/modules/NeuralNetworks/common/types/src/
DSharedMemory.cpp88 DataLocation MutableMemoryBuilder::append(size_t length, size_t alignment, size_t padding) { in append() argument
90 mSize = roundUp(mSize, alignment); in append()
198 const Request* request, uint32_t alignment, uint32_t padding, in convertRequestFromPointerToShared() argument
227 input.location = inputBuilder.append(location.length, alignment, padding); in convertRequestFromPointerToShared()
251 output.location = outputBuilder.append(location.length, alignment, padding); in convertRequestFromPointerToShared()
DTypes.cpp67 const size_t alignment = getAlignmentForLength(length); in append() local
68 const size_t offset = roundUp(size(), alignment); in append()
/packages/modules/NeuralNetworks/tools/api/
DOperandTypes.t26 %% alignment is a function of length (not data type), and assumes that there
27 %% is a maximum alignment requirement. If a new operand type is added with a
28 %% stricter alignment requirement, then `getAlignmentForLength` may need to
DTypes.t290 // For pointer buffers, the alignment is satisfied if the address of the pointer is a multiple
291 // of the "alignment" value. For memory pools, the alignment is satisfied if the offset of the
292 // sub-region specified by DataLocation is a multiple of the "alignment" value.
293 uint32_t alignment;
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/
DMultiLineTexture.java40 Layout.Alignment alignment) { in newInstance() argument
43 maxWidth, alignment, 1, 0, true, null, 0); in newInstance()
/packages/services/BuiltInPrintService/src/com/android/bips/jni/
DLocalJobParams.java62 public int alignment = 0; field in LocalJobParams
106 + " alignment=" + alignment in toString()
/packages/modules/NeuralNetworks/common/types/include/nnapi/
DSharedMemory.h39 DataLocation append(size_t length, size_t alignment = kMinMemoryAlignment,
187 const Request* request, uint32_t alignment, uint32_t padding,
/packages/modules/NeuralNetworks/driver/cache/BlobCache/
DBlobCache.cpp220 constexpr size_t alignment = alignof(size_t) - 1; in align_sizet() local
221 return (size + alignment) & ~alignment; in align_sizet()
/packages/modules/Virtualization/pvmfw/
DREADME.md76 the `pvmfw.bin` image without respecting this alignment, it is the
78 guest address space with the right alignment.
124 | (Padding to 4KiB alignment) |
154 | (Padding to 8-byte alignment) |
158 | (Padding to 8-byte alignment) |
162 | (Padding to 8-byte alignment) |
166 | (Padding to 8-byte alignment) |
170 | (Padding to 8-byte alignment) |
/packages/modules/NeuralNetworks/runtime/include/
DNeuralNetworksWrapper.h534 Result getPreferredMemoryAlignmentForInput(uint32_t index, uint32_t* alignment) const { argument
538 mCompilation, index, alignment)));
554 Result getPreferredMemoryAlignmentForOutput(uint32_t index, uint32_t* alignment) const { argument
558 mCompilation, index, alignment)));
DNeuralNetworks.h2334 const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* alignment)
2410 const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* alignment)
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/wear/elements/layout/
DScalingLazyColumnState.kt75 alignment = if (!reverseLayout) Alignment.Top else Alignment.Bottom,
155 alignment = Alignment.Top, in rememberResponsiveColumnState()
/packages/modules/NeuralNetworks/shim_and_sl/include/
DSupportLibraryWrapper.h442 Result getPreferredMemoryAlignmentForInput(uint32_t index, uint32_t* alignment) const { in getPreferredMemoryAlignmentForInput() argument
445 mCompilation, index, alignment)); in getPreferredMemoryAlignmentForInput()
454 Result getPreferredMemoryAlignmentForOutput(uint32_t index, uint32_t* alignment) const { in getPreferredMemoryAlignmentForOutput() argument
457 mCompilation, index, alignment)); in getPreferredMemoryAlignmentForOutput()
/packages/modules/NeuralNetworks/shim_and_sl/public/
DNeuralNetworksSupportLibraryImpl.h682 const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* alignment);
692 const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* alignment);

12