Skip to content

Commit 241e504

Browse files
authored
Cleanup tdb_partitioned_matrix - move state to local variables and remove unused code (#408)
1 parent 9db2430 commit 241e504

File tree

4 files changed

+76
-146
lines changed

4 files changed

+76
-146
lines changed

src/include/cpos.h

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -387,53 +387,6 @@ inline constexpr auto load = _load::_fn{};
387387
inline constexpr auto num_loads = _load::_gn{};
388388
} // namespace _cpo
389389

390-
// ----------------------------------------------------------------------------
391-
// resident_offset CPO
392-
// ----------------------------------------------------------------------------
393-
namespace _resident_offset {
394-
395-
template <class T>
396-
concept _member_resident_part_offset = requires(T t) {
397-
{ t.resident_part_offset() } -> semi_integral;
398-
};
399-
400-
template <class T>
401-
concept _member_num_resident_parts = requires(T t) {
402-
{ t.num_resident_parts() } -> semi_integral;
403-
};
404-
405-
struct _gn {
406-
template <_member_num_resident_parts T>
407-
auto constexpr operator()(T&& t) const noexcept {
408-
return t.num_resident_parts();
409-
}
410-
411-
template <class T>
412-
requires(!_member_num_resident_parts<T>)
413-
auto constexpr operator()(T&& t) const noexcept {
414-
return 0;
415-
}
416-
};
417-
418-
struct _hn {
419-
template <_member_resident_part_offset T>
420-
auto constexpr operator()(T&& t) const noexcept {
421-
return t.resident_part_offset();
422-
}
423-
424-
template <class T>
425-
requires(!_member_resident_part_offset<T>)
426-
auto constexpr operator()(T&& t) const noexcept {
427-
return 0;
428-
}
429-
};
430-
} // namespace _resident_offset
431-
432-
inline namespace _cpo {
433-
inline constexpr auto num_resident_parts = _resident_offset::_gn{};
434-
inline constexpr auto resident_part_offset = _resident_offset::_hn{};
435-
} // namespace _cpo
436-
437390
// ----------------------------------------------------------------------------
438391
// num_partitions CPO
439392
// ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)