27class BaseBEllPackStructInfo
30 BaseBEllPackStructInfo(std::size_t nrows,
36 virtual ~BaseBEllPackStructInfo() {}
38 std::size_t getNRows()
const {
return m_nrows; }
40 std::size_t getNnz()
const {
return m_nnz; }
42 Arccore::Int64 timestamp()
const {
return m_timestamp; }
44 void setTimestamp(Arccore::Int64 value) { m_timestamp = value; }
48 std::size_t m_nrows = 0 ;
49 std::size_t m_nnz = 0 ;
50 Arccore::Int64 m_timestamp = -1;
56class ALIEN_EXPORT BEllPackStructInfo
57:
public BaseBEllPackStructInfo
61 using index_type = IndexT;
62 using IndexType = IndexT;
64 static const int ellpack_size = EllPackSize ;
68 static std::size_t nbBlocks(std::size_t nrows)
70 return (nrows + ellpack_size - 1) / ellpack_size;
73 static std::size_t roundUp(std::size_t nrows)
75 return nbBlocks(nrows) * ellpack_size;
78 static void computeBlockRowOffset(std::vector<int>& block_row_offset,
82 BEllPackStructInfo(std::size_t nrows,
85 int const* h_block_row_offset,
86 int const* h_local_row_size);
88 virtual ~BEllPackStructInfo() ;
90 const BaseBEllPackStructInfo& base()
const
95 InternalType
const* internal()
const
100 std::size_t getBlockNnz()
const {
return m_block_nnz; }
102 Arccore::ConstArrayView<Integer> getRowOffset()
const
104 return Arccore::ConstArrayView<Integer>((Integer)m_nrows + 1, kcol());
107 IndexType
const* kcol()
const;
109 IndexType
const* cols()
const;
111 IndexType
const* dcol()
const;
113 int const* localRowSize()
const
115 return m_h_local_row_size;
118 void computeUpperDiagOffset()
const
122 Integer computeBandeSize()
const
127 Integer computeUpperBandeSize()
const
132 Integer computeLowerBandeSize()
const
137 Integer computeMaxRowSize()
const
140 return m_max_row_size;
143 Integer getMaxRowSize()
const
145 if (m_max_row_size == -1)
147 return m_max_row_size;
153 std::size_t m_block_nrows = 0 ;
154 std::size_t m_block_nnz = 0 ;
155 mutable Integer m_max_row_size = -1 ;
157 InternalType* m_internal =
nullptr;
158 int const* m_h_local_row_size = nullptr ;