Lines Matching full:rank

11 template <int rank> class Test_CFI_CDESC_T {
23 if (rank > 0) { in Check()
25 } else { // C++ implementation over-allocates for rank=0 by 24bytes. in Check()
35 static constexpr int rank_{rank};
36 CFI_CDESC_T(rank) dvStorage_;
39 template <int rank> static void TestCdescMacroForAllRanksSmallerThan() { in TestCdescMacroForAllRanksSmallerThan()
40 static_assert(rank > 0, "rank<0!"); in TestCdescMacroForAllRanksSmallerThan()
41 Test_CFI_CDESC_T<rank> obj; in TestCdescMacroForAllRanksSmallerThan()
43 TestCdescMacroForAllRanksSmallerThan<rank - 1>(); in TestCdescMacroForAllRanksSmallerThan()
52 static void AddNoiseToCdesc(CFI_cdesc_t *dv, CFI_rank_t rank) { in AddNoiseToCdesc() argument
54 dv->rank = 16; in AddNoiseToCdesc()
61 for (int i{0}; i < rank; i++) { in AddNoiseToCdesc()
70 CFI_type_t ty, std::size_t eLen, CFI_rank_t rank, in DumpTestWorld() argument
76 << " rank: " << static_cast<int>(rank) << " extent: "; in DumpTestWorld()
84 CFI_rank_t rank, const CFI_index_t extents[]) { in check_CFI_establish() argument
86 DumpTestWorld(base_addr, attribute, type, elem_len, rank, extent); in check_CFI_establish()
90 CFI_establish(dv, base_addr, attribute, type, elem_len, rank, extents)}; in check_CFI_establish()
96 MATCH(rank, res->rank()); in check_CFI_establish()
102 for (int i{0}; i < rank; ++i) { in check_CFI_establish()
111 for (int i{0}; i < rank; ++i) { in check_CFI_establish()
130 if (rank > CFI_MAX_RANK) { in check_CFI_establish()
146 if (rank > 0 && base_addr != nullptr && extents == nullptr) { in check_CFI_establish()
181 for (CFI_rank_t rank : rankCases) { in run_CFI_establish_tests() local
186 dv, base_addr, attribute, type, elem_len, rank, extent); in run_CFI_establish_tests()
193 // If base_addr is null, extents shall be ignored even if rank !=0 in run_CFI_establish_tests()
215 for (int i{0}; i < dv->rank; ++i) { in EstablishLowerBounds()
271 for (int i{0}; i < dv->rank; ++i) { in run_CFI_address_tests()
294 const CFI_rank_t rank{dv->rank}; in check_CFI_allocate() local
301 DumpTestWorld(base_addr, attribute, type, elem_len, rank, nullptr); in check_CFI_allocate()
308 for (int i{0}; i < rank; ++i) { in check_CFI_allocate()
325 MATCH(true, rank == dv->rank); in check_CFI_allocate()
332 if (rank > CFI_MAX_RANK) { in check_CFI_allocate()
352 if (rank > 0 && (lower_bounds == nullptr || upper_bounds == nullptr)) { in check_CFI_allocate()
398 for (CFI_rank_t rank : rankCases) { in run_CFI_allocate_tests() local
401 dv->rank = rank; in run_CFI_allocate_tests()
417 constexpr CFI_rank_t rank{3}; in run_CFI_section_tests() local
428 CFI_CDESC_T(rank) sourceStorage; in run_CFI_section_tests()
430 CFI_index_t extent[rank] = {m, n, o}; in run_CFI_section_tests()
432 CFI_type_long_long, 0, rank, extent)}; in run_CFI_section_tests()
435 CFI_index_t lb[rank] = {2, 5, 4}; in run_CFI_section_tests()
436 CFI_index_t ub[rank] = {4, 5, 6}; in run_CFI_section_tests()
437 CFI_index_t strides[rank] = {2, 0, 2}; in run_CFI_section_tests()
438 constexpr CFI_rank_t resultRank{rank - 1}; in run_CFI_section_tests()
515 const CFI_rank_t rank{2}; in run_CFI_select_part_tests() local
529 CFI_CDESC_T(rank) resStorage, srcStorage; in run_CFI_select_part_tests()
535 sizeof(int), rank, nullptr)}; in run_CFI_select_part_tests()
538 CFI_type_struct, sizeof(Galaxy), rank, universeSize); in run_CFI_select_part_tests()
570 result, nullptr, CFI_attribute_other, CFI_type_char, 2, rank, nullptr); in run_CFI_select_part_tests()
603 constexpr CFI_rank_t rank{3}; in run_CFI_setpointer_tests() local
604 CFI_CDESC_T(rank) resStorage, srcStorage; in run_CFI_setpointer_tests()
607 CFI_index_t lower_bounds[rank]; in run_CFI_setpointer_tests()
608 CFI_index_t extents[rank]; in run_CFI_setpointer_tests()
609 for (int i{0}; i < rank; ++i) { in run_CFI_setpointer_tests()
620 result, nullptr, CFI_attribute_pointer, type, elem_len, rank, nullptr)}; in run_CFI_setpointer_tests()
623 elem_len, rank, extents); in run_CFI_setpointer_tests()
634 MATCH(rank, result->rank); in run_CFI_setpointer_tests()
639 for (int j{0}; j < rank; ++j) { in run_CFI_setpointer_tests()
648 constexpr CFI_rank_t rank{2}; in run_CFI_is_contiguous_tests() local
649 CFI_index_t extents[rank] = {4, 4}; in run_CFI_is_contiguous_tests()
650 CFI_CDESC_T(rank) dv_storage; in run_CFI_is_contiguous_tests()
656 /*elem_len=*/0, rank, extents)}; in run_CFI_is_contiguous_tests()
662 CFI_CDESC_T(rank) sectionDescriptorStorage; in run_CFI_is_contiguous_tests()
666 /*elem_len=*/0, rank, extents); in run_CFI_is_contiguous_tests()
670 CFI_index_t lb[rank] = {0, 0}; in run_CFI_is_contiguous_tests()
671 CFI_index_t ub[rank] = {3, 3}; in run_CFI_is_contiguous_tests()
672 CFI_index_t strides[rank] = {2, -2}; in run_CFI_is_contiguous_tests()
753 CFI_index_t c_extents[rank] = {1, 4}; in run_CFI_is_contiguous_tests()
754 CFI_CDESC_T(rank) c_dv_storage; in run_CFI_is_contiguous_tests()
757 /*elem_len=*/0, rank, c_extents); in run_CFI_is_contiguous_tests()