Skip to content
Snippets Groups Projects
Commit 92539874 authored by Jakub Klinkovský's avatar Jakub Klinkovský Committed by Tomáš Oberhuber
Browse files

Updating DistributedMatrix for segments

parent de38db4a
No related branches found
No related tags found
1 merge request!58To/matrices
......@@ -108,15 +108,10 @@ public:
IndexType getRowLength( IndexType row ) const;
bool setElement( IndexType row,
void setElement( IndexType row,
IndexType column,
RealType value );
__cuda_callable__
bool setElementFast( IndexType row,
IndexType column,
RealType value );
RealType getElement( IndexType row,
IndexType column ) const;
......@@ -124,17 +119,6 @@ public:
RealType getElementFast( IndexType row,
IndexType column ) const;
// __cuda_callable__
// bool setRowFast( IndexType row,
// const IndexType* columnIndexes,
// const RealType* values,
// IndexType elements );
// __cuda_callable__
// void getRowFast( IndexType row,
// IndexType* columns,
// RealType* values ) const;
__cuda_callable__
MatrixRow getRow( IndexType row );
......
......@@ -172,7 +172,8 @@ getCompressedRowLengths( CompressedRowLengthsVector& rowLengths ) const
{
if( getCommunicationGroup() != CommunicatorType::NullGroup ) {
rowLengths.setDistribution( getLocalRowRange(), getRows(), getCommunicationGroup() );
localMatrix.getCompressedRowLengths( rowLengths.getLocalView() );
auto localRowLengths = rowLengths.getView();
localMatrix.getCompressedRowLengths( localRowLengths );
}
}
......@@ -188,27 +189,14 @@ getRowLength( IndexType row ) const
template< typename Matrix,
typename Communicator >
bool
void
DistributedMatrix< Matrix, Communicator >::
setElement( IndexType row,
IndexType column,
RealType value )
{
const IndexType localRow = localRowRange.getLocalIndex( row );
return localMatrix.setElement( localRow, column, value );
}
template< typename Matrix,
typename Communicator >
__cuda_callable__
bool
DistributedMatrix< Matrix, Communicator >::
setElementFast( IndexType row,
IndexType column,
RealType value )
{
const IndexType localRow = localRowRange.getLocalIndex( row );
return localMatrix.setElementFast( localRow, column, value );
localMatrix.setElement( localRow, column, value );
}
template< typename Matrix,
......@@ -234,33 +222,6 @@ getElementFast( IndexType row,
return localMatrix.getElementFast( localRow, column );
}
//template< typename Matrix,
// typename Communicator >
//__cuda_callable__
//bool
//DistributedMatrix< Matrix, Communicator >::
//setRowFast( IndexType row,
// const IndexType* columnIndexes,
// const RealType* values,
// IndexType elements )
//{
// const IndexType localRow = localRowRange.getLocalIndex( row );
// return localMatrix.setRowFast( localRow, columnIndexes, values, elements );
//}
//template< typename Matrix,
// typename Communicator >
//__cuda_callable__
//void
//DistributedMatrix< Matrix, Communicator >::
//getRowFast( IndexType row,
// IndexType* columns,
// RealType* values ) const
//{
// const IndexType localRow = localRowRange.getLocalIndex( row );
// return localMatrix.getRowFast( localRow, columns, values );
//}
template< typename Matrix,
typename Communicator >
__cuda_callable__
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment