Home
last modified time | relevance | path

Searched refs:AlignTo (Results 1 – 9 of 9) sorted by relevance

/system/core/fs_mgr/liblp/
Dutility_test.cpp63 std::optional<uint64_t> AlignTo(uint64_t base, uint32_t alignment) { in AlignTo() function
65 if (!AlignTo(base, alignment, &r)) { in AlignTo()
71 TEST(liblp, AlignTo) { in TEST() argument
72 EXPECT_EQ(AlignTo(37, 0), std::optional<uint64_t>(37)); in TEST()
73 EXPECT_EQ(AlignTo(1024, 1024), std::optional<uint64_t>(1024)); in TEST()
74 EXPECT_EQ(AlignTo(555, 1024), std::optional<uint64_t>(1024)); in TEST()
75 EXPECT_EQ(AlignTo(555, 1000), std::optional<uint64_t>(1000)); in TEST()
76 EXPECT_EQ(AlignTo(0, 1024), std::optional<uint64_t>(0)); in TEST()
77 EXPECT_EQ(AlignTo(54, 32), std::optional<uint64_t>(64)); in TEST()
78 EXPECT_EQ(AlignTo(32, 32), std::optional<uint64_t>(32)); in TEST()
[all …]
Dutility.h72 bool AlignTo(T base, uint32_t alignment, T* out) { in AlignTo() function
Dbuilder.cpp406 if (!AlignTo(metadata_max_size, LP_SECTOR_SIZE, &metadata_max_size)) { in Init()
443 ok = AlignTo(free_area_start, out.alignment, &free_area_start); in Init()
445 ok = AlignTo(free_area_start, logical_block_size, &free_area_start); in Init()
488 ok = AlignTo(free_area_start, super.alignment, &free_area_start); in Init()
490 ok = AlignTo(free_area_start, logical_block_size, &free_area_start); in Init()
991 if (!AlignTo(lba, block_device.alignment, out)) { in AlignSector()
994 if (!AlignTo(*out, LP_SECTOR_SIZE, out)) { in AlignSector()
1073 if (!AlignTo(requested_size, geometry_.logical_block_size, &aligned_size)) { in ResizePartition()
Dsuper_layout_builder.cpp138 if (!AlignTo(metadata_bytes.size(), kSparseAlignment, &metadata_aligned_bytes)) { in GetImageLayout()
Dbuilder_test.cpp235 ASSERT_TRUE(AlignTo(lba, device_info.alignment, &aligned_lba)); in TEST_F()
/system/tools/aidl/
Daidl_to_cpp_common.cpp570 size_t AlignTo(size_t val, size_t align) { in AlignTo() function
593 size_t tag_size = AlignTo(1, *align); in SizeOfDefinedType()
595 return AlignTo(size, *align) + tag_size; in SizeOfDefinedType()
605 res = AlignTo(res, *alignment); in SizeOfDefinedType()
615 res = AlignTo(res, *parcelable_alignment); in SizeOfDefinedType()
Daidl_to_cpp_common.h54 size_t AlignTo(size_t val, size_t align);
Dgenerate_rust.cpp954 auto padding_size = cpp::AlignTo(struct_size, 8) - struct_size; in GeneratePaddingField()
997 struct_size = cpp::AlignTo(struct_size, *alignment); in GenerateParcelBody()
1017 variable_offset = cpp::AlignTo(variable_offset, *alignment); in GenerateParcelBody()
1073 struct_size = cpp::AlignTo(struct_size, *alignment); in GenerateParcelDefault()
Dgenerate_ndk.cpp1318 variable_offset = cpp::AlignTo(variable_offset, *alignment); in GenerateParcelClassDecl()