Commit 6a7f9be5 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed scalar types in multiplication and division vector operators

parent 7f3e64bd
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -55,9 +55,11 @@ class Vector
   template< typename VectorT >
   Vector& operator += ( const VectorT& vector );

   Vector& operator *= ( const RealType& c );
   template< typename Scalar >
   Vector& operator *= ( const Scalar c );

   Vector& operator /= ( const RealType& c );
   template< typename Scalar >
   Vector& operator /= ( const Scalar c );

   Real max() const;

+4 −2
Original line number Diff line number Diff line
@@ -80,9 +80,11 @@ public:
   template< typename Vector >
   VectorView& operator+=( const Vector& vector );

   VectorView& operator*=( RealType c );
   template< typename Scalar >
   VectorView& operator*=( Scalar c );

   VectorView& operator/=( RealType c );
   template< typename Scalar >
   VectorView& operator/=( Scalar c );

   NonConstReal max() const;

+4 −2
Original line number Diff line number Diff line
@@ -78,9 +78,10 @@ operator+=( const Vector& vector )
template< typename Real,
          typename Device,
          typename Index >
   template< typename Scalar >
VectorView< Real, Device, Index >&
VectorView< Real, Device, Index >::
operator*=( RealType c )
operator*=( Scalar c )
{
   Algorithms::VectorOperations< Device >::vectorScalarMultiplication( *this, c );
   return *this;
@@ -89,9 +90,10 @@ operator*=( RealType c )
template< typename Real,
          typename Device,
          typename Index >
   template< typename Scalar >
VectorView< Real, Device, Index >&
VectorView< Real, Device, Index >::
operator/=( RealType c )
operator/=( Scalar c )
{
   Algorithms::VectorOperations< Device >::vectorScalarMultiplication( *this, 1.0 / c );
   return *this;
+4 −2
Original line number Diff line number Diff line
@@ -110,9 +110,10 @@ operator += ( const VectorT& vector )
template< typename Real,
          typename Device,
          typename Index >
   template< typename Scalar >
Vector< Real, Device, Index >&
Vector< Real, Device, Index >::
operator *= ( const RealType& c )
operator *= ( const Scalar c )
{
   Algorithms::VectorOperations< Device >::vectorScalarMultiplication( *this, c );
   return *this;
@@ -121,9 +122,10 @@ operator *= ( const RealType& c )
template< typename Real,
          typename Device,
          typename Index >
   template< typename Scalar >
Vector< Real, Device, Index >&
Vector< Real, Device, Index >::
operator /= ( const RealType& c )
operator /= ( const Scalar c )
{
   Algorithms::VectorOperations< Device >::vectorScalarMultiplication( *this, 1.0 / c );
   return *this;
+4 −2
Original line number Diff line number Diff line
@@ -69,9 +69,11 @@ public:
   template< typename Vector >
   DistributedVector& operator+=( const Vector& vector );

   DistributedVector& operator*=( RealType c );
   template< typename Scalar >
   DistributedVector& operator*=( Scalar c );

   DistributedVector& operator/=( RealType c );
   template< typename Scalar >
   DistributedVector& operator/=( Scalar c );

   Real max() const;

Loading