Skip to content
Snippets Groups Projects
Commit a65bdf13 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixes in ArrayView and VectorView

parent 5984c90e
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ public:
// "Templated copy-constructor" accepting any cv-qualification of Value
template< typename Value_ >
__cuda_callable__
ArrayView( ArrayView< Value_, Device, Index >& array )
ArrayView( const ArrayView< Value_, Device, Index >& array )
: data(array.getData()), size(array.getSize()) {}
// default move-constructor
......
......@@ -109,7 +109,7 @@ public:
//! Computes scalar dot product
template< typename Vector >
NonConstReal scalarProduct( const Vector& v );
NonConstReal scalarProduct( const Vector& v ) const;
//! Computes this = thisMultiplicator * this + alpha * x.
template< typename Vector >
......
......@@ -243,7 +243,7 @@ template< typename Real,
template< typename Vector >
typename VectorView< Real, Device, Index >::NonConstReal
VectorView< Real, Device, Index >::
scalarProduct( const Vector& v )
scalarProduct( const Vector& v ) const
{
return Algorithms::VectorOperations< Device >::template getScalarProduct< VectorView, Vector, NonConstReal >( *this, v );
}
......
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