Commit 2ecaba3e authored by Marcel Koch's avatar Marcel Koch
Browse files

use const partition

parent 10e03d0c
......@@ -14,7 +14,7 @@ namespace hyteg {
template < typename ValueType, typename IndexType >
auto build_send_buffer( const gko::matrix_data< ValueType, IndexType >& data,
std::shared_ptr< gko::distributed::Partition<> > partition,
std::shared_ptr< const gko::distributed::Partition<> > partition,
std::shared_ptr< gko::mpi::communicator > comm )
{
using nonzero = gko::matrix_data_entry< ValueType, IndexType >;
......@@ -51,7 +51,7 @@ template < typename ValueType, typename IndexType >
auto build_send_pattern(
const std::vector< std::pair< gko::distributed::comm_index_type, gko::matrix_data_entry< ValueType, IndexType > > >&
send_buffer,
std::shared_ptr< gko::distributed::Partition<> > partition )
std::shared_ptr< const gko::distributed::Partition<> > partition )
{
using comm_index_type = gko::distributed::comm_index_type;
auto num_parts = partition->get_num_parts();
......@@ -68,7 +68,7 @@ auto build_send_pattern(
}
auto build_receive_pattern( const std::vector< gko::distributed::comm_index_type >& send_sizes,
std::shared_ptr< gko::distributed::Partition<> > partition,
std::shared_ptr< const gko::distributed::Partition<> > partition,
std::shared_ptr< gko::mpi::communicator > comm )
{
using comm_index_type = gko::distributed::comm_index_type;
......@@ -106,7 +106,7 @@ auto split_nonzero_entries(
template < typename ValueType, typename IndexType >
void communicate_overlap( gko::matrix_assembly_data< ValueType, IndexType >& data,
std::shared_ptr< gko::distributed::Partition<> > partition,
std::shared_ptr< const gko::distributed::Partition<> > partition,
std::shared_ptr< gko::mpi::communicator > comm )
{
auto ordered_data = data.get_ordered_data();
......@@ -149,7 +149,7 @@ class GinkgoSparseMatrixProxy : public SparseMatrixProxy
public:
explicit GinkgoSparseMatrixProxy( mtx* matrix,
const gko::dim< 2 > global_size,
std::shared_ptr< gko::distributed::Partition<> > part )
std::shared_ptr< const gko::distributed::Partition<> > part )
: matrix_( matrix )
, global_size_( global_size )
, assembler_( global_size )
......@@ -207,7 +207,7 @@ class GinkgoSparseMatrixProxy : public SparseMatrixProxy
private:
gko::dim< 2 > global_size_;
std::shared_ptr< gko::distributed::Partition<> > part_;
std::shared_ptr< const gko::distributed::Partition<> > part_;
mtx* matrix_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment