diff --git a/src/sparse/KokkosSparse_BlockCrsMatrix.hpp b/src/sparse/KokkosSparse_BlockCrsMatrix.hpp index b492af0c04..8c0ac22628 100644 --- a/src/sparse/KokkosSparse_BlockCrsMatrix.hpp +++ b/src/sparse/KokkosSparse_BlockCrsMatrix.hpp @@ -510,12 +510,17 @@ class BlockCrsMatrix { /// \brief Construct with a graph that will be shared. /// + /// \param[in] arg_label The sparse matrix's label. + /// \param[in] arg_graph The graph between the blocks. + /// \param[in] blockDimIn The block size. + /// /// Allocate the values array for subsequent fill. BlockCrsMatrix(const std::string& arg_label, const staticcrsgraph_type& arg_graph, const OrdinalType& blockDimIn) : graph(arg_graph), - values(arg_label, arg_graph.entries.extent(0)), + values(arg_label, + arg_graph.entries.extent(0) * blockDimIn * blockDimIn), numCols_(maximum_entry(arg_graph) + 1), blockDim_(blockDimIn) {} @@ -600,14 +605,11 @@ class BlockCrsMatrix { /// The matrix will store and use the row map, indices, and values /// directly (by view, not by deep copy). /// - /// \param label [in] The sparse matrix's label. - /// \param nrows [in] The number of rows. - /// \param ncols [in] The number of columns. - /// \param annz [in] The number of entries. - /// \param vals [in/out] The entries. - /// \param rows [in/out] The row map (containing the offsets to the - /// data in each row). - /// \param cols [in/out] The column indices. + /// \param[in] label The sparse matrix's label. + /// \param[in] ncols The number of columns. + /// \param[in] vals The entries. + /// \param[in] graph_ The graph between the blocks. + /// \param[in] blockDimIn The block size. BlockCrsMatrix(const std::string& /*label*/, const OrdinalType& ncols, const values_type& vals, const staticcrsgraph_type& graph_, const OrdinalType& blockDimIn) diff --git a/src/sparse/KokkosSparse_BsrMatrix.hpp b/src/sparse/KokkosSparse_BsrMatrix.hpp index 51002043bb..19265547fe 100644 --- a/src/sparse/KokkosSparse_BsrMatrix.hpp +++ b/src/sparse/KokkosSparse_BsrMatrix.hpp @@ -443,11 +443,16 @@ class BsrMatrix { /// \brief Construct with a graph that will be shared. /// + /// \param[in] arg_label The sparse matrix's label. + /// \param[in] arg_graph The graph between the blocks. + /// \param[in] blockDimIn The block size. + /// /// Allocate the values array for subsequent fill. BsrMatrix(const std::string& arg_label, const staticcrsgraph_type& arg_graph, const OrdinalType& blockDimIn) : graph(arg_graph), - values(arg_label, arg_graph.entries.extent(0)), + values(arg_label, + arg_graph.entries.extent(0) * blockDimIn * blockDimIn), numCols_(maximum_entry(arg_graph) + 1), blockDim_(blockDimIn) {} @@ -625,14 +630,11 @@ class BsrMatrix { /// The matrix will store and use the row map, indices, and values /// directly (by view, not by deep copy). /// - /// \param label [in] The sparse matrix's label. - /// \param nrows [in] The number of rows. - /// \param ncols [in] The number of columns. - /// \param annz [in] The number of entries. - /// \param vals [in/out] The entries. - /// \param rows [in/out] The row map (containing the offsets to the - /// data in each row). - /// \param cols [in/out] The column indices. + /// \param[in] label The sparse matrix's label. + /// \param[in] ncols The number of columns. + /// \param[in] vals The entries. + /// \param[in] graph_ The graph between the blocks. + /// \param[in] blockDimIn The block size. BsrMatrix(const std::string& /*label*/, const OrdinalType& ncols, const values_type& vals, const staticcrsgraph_type& graph_, const OrdinalType& blockDimIn)