Skip to content
Snippets Groups Projects
Commit 5b6b5102 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Added assignment operator with for different kernels to Legacy CSR matrix.

parent 4fad1910
No related branches found
No related tags found
1 merge request!89To/matrices adaptive csr
......@@ -262,6 +262,9 @@ public:
// copy assignment
CSR& operator=( const CSR& matrix );
template< CSRKernel KernelType2 >
CSR& operator=( const CSR< RealType, DeviceType, IndexType, KernelType2 >& matrix );
// cross-device copy assignment
template< typename Real2, typename Device2, typename Index2, CSRKernel KernelType2,
typename = typename Enabler< Device2 >::type >
......
......@@ -686,6 +686,23 @@ CSR< Real, Device, Index, KernelType >::operator=( const CSR& matrix )
return *this;
}
template< typename Real,
typename Device,
typename Index,
CSRKernel KernelType >
template< CSRKernel KernelType2 >
CSR< Real, Device, Index, KernelType >&
CSR< Real, Device, Index, KernelType >::
operator=( const CSR< Real, Device, Index, KernelType2 >& matrix )
{
this->setLike( matrix );
this->values = matrix.values;
this->columnIndexes = matrix.columnIndexes;
this->rowPointers = matrix.rowPointers;
this->blocks = matrix.blocks;
return *this;
}
// cross-device copy assignment
template< typename Real,
typename Device,
......
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