31class ALIEN_EXPORT DistStructInfo
38 DistStructInfo(
const DistStructInfo& src) { copy(src); }
40 DistStructInfo& operator=(
const DistStructInfo& src)
46 void compute(Integer nproc, ConstArrayView<Integer> offset, Integer my_rank,
47 IMessagePassingMng* parallel_mng,
const CSRStructInfo& profile,
48 ITraceMng* trace = NULL);
50 void compute(Integer nproc, ConstArrayView<Integer> offset, Integer my_rank,
51 IMessagePassingMng* parallel_mng,
const CSRStructInfo& profile,
54 Integer domainId(Integer nproc, ConstArrayView<Integer> offset, Integer
id)
56 for (Integer ip = 0; ip < nproc; ++ip) {
57 if (
id < offset[ip + 1])
63 bool isInterfaceRow(Arccore::Integer row_id)
const
65 return m_interface_row_set.find(row_id) != m_interface_row_set.end();
68 void copy(
const DistStructInfo& distStructInfo);
70 void computeUpperDiagOffset(
const CSRStructInfo& profile)
const
72 auto nrows = profile.getNRows();
73 auto row_offset = profile.getRowOffset();
74 m_upper_diag_offset.resize(nrows);
75 for (
int irow = 0; irow < nrows; ++irow) {
76 int index = row_offset[irow];
77 for (
int k = row_offset[irow]; k < row_offset[irow] + m_local_row_size[irow]; ++k) {
83 m_upper_diag_offset[irow] = index;
87 ConstArrayView<Integer> getUpperDiagOffset(
const CSRStructInfo& profile)
const
89 if (m_upper_diag_offset.size() == 0)
90 computeUpperDiagOffset(profile);
91 return m_upper_diag_offset.constView();
96 getUpperDiagOffset(profile);
97 return m_upper_diag_offset.data();
100 void computeBlock2DSizesAndOffsets(Integer
const* kcol, Integer
const* dcol, Integer
const* bcol)
const;
103 Arccore::UniqueArray<Arccore::Integer> m_local_row_size;
104 Arccore::Integer m_ghost_nrow = 0;
105 Arccore::Integer m_interface_nrow = 0;
106 Arccore::Integer m_first_upper_ghost_index = 0;
107 Arccore::UniqueArray<Arccore::Integer> m_interface_rows;
108 std::unordered_set<int> m_interface_row_set;
109 Arccore::UniqueArray<Arccore::Integer> m_cols;
111 Arccore::UniqueArray<Arccore::Integer> m_upper_diag_offset;
116 Arccore::UniqueArray<Arccore::Integer> m_block_sizes;
117 Arccore::UniqueArray<Arccore::Integer> m_block_offsets;
119 Arccore::UniqueArray<Arccore::Integer> m_block2d_sizes;
121 Arccore::UniqueArray<Arccore::Integer> m_block2d_offsets;