Loading src/core/vectors/tnlSharedVector.h +7 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,13 @@ class tnlSharedVector : public tnlSharedArray< Real, Device, Index > tnlString getTypeVirtual() const; void addElement( const IndexType i, const RealType& value ); void addElement( const IndexType i, const RealType& value, const RealType& thisElementMultiplicator ); tnlSharedVector< Real, Device, Index >& operator = ( const tnlSharedVector< Real, Device, Index >& array ); template< typename Vector > Loading src/core/vectors/tnlVector.h +7 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,13 @@ class tnlVector : public tnlArray< Real, Device, Index > tnlString getTypeVirtual() const; void addElement( const IndexType i, const RealType& value ); void addElement( const IndexType i, const RealType& value, const RealType& thisElementMultiplicator ); tnlVector< Real, Device, Index >& operator = ( const tnlVector< Real, Device, Index >& array ); template< typename Vector > Loading src/core/vectors/tnlVectorOperations.h +23 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,17 @@ class tnlVectorOperations< tnlHost > { public: template< typename Vector > static void addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value ); template< typename Vector > static void addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value, const typename Vector::RealType& thisElementMultiplicator ); template< typename Vector > static typename Vector::RealType getVectorMax( const Vector& v ); Loading Loading @@ -125,6 +136,17 @@ class tnlVectorOperations< tnlCuda > { public: template< typename Vector > static void addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value ); template< typename Vector > static void addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value, const typename Vector::RealType& thisElementMultiplicator ); template< typename Vector > static typename Vector::RealType getVectorMax( const Vector& v ); Loading src/implementation/core/vectors/tnlSharedVector_impl.h +19 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,25 @@ tnlString tnlSharedVector< Real, Device, Index > :: getTypeVirtual() const return this->getType(); }; template< typename Real, typename Device, typename Index > void tnlSharedVector< Real, Device, Index >::addElement( const IndexType i, const RealType& value ) { tnlVectorOperations< Device >::addElement( *this, i, value ); } template< typename Real, typename Device, typename Index > void tnlSharedVector< Real, Device, Index >::addElement( const IndexType i, const RealType& value, const RealType& thisElementMultiplicator ) { tnlVectorOperations< Device >::addElement( *this, i, value, thisElementMultiplicator ); } template< typename Real, typename Device, typename Index > Loading src/implementation/core/vectors/tnlVectorOperationsCuda_impl.h +17 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,23 @@ #ifndef TNLVECTOROPERATIONSCUDA_IMPL_H_ #define TNLVECTOROPERATIONSCUDA_IMPL_H_ template< typename Vector > void tnlVectorOperations< tnlCuda >::addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value ) { v[ i ] += value; } template< typename Vector > void tnlVectorOperations< tnlCuda >::addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value, const typename Vector::RealType& thisElementMultiplicator ) { v[ i ] = thisElementMultiplicator * v[ i ] + value; } template< typename Vector > typename Vector :: RealType tnlVectorOperations< tnlCuda > :: getVectorMax( const Vector& v ) { Loading Loading
src/core/vectors/tnlSharedVector.h +7 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,13 @@ class tnlSharedVector : public tnlSharedArray< Real, Device, Index > tnlString getTypeVirtual() const; void addElement( const IndexType i, const RealType& value ); void addElement( const IndexType i, const RealType& value, const RealType& thisElementMultiplicator ); tnlSharedVector< Real, Device, Index >& operator = ( const tnlSharedVector< Real, Device, Index >& array ); template< typename Vector > Loading
src/core/vectors/tnlVector.h +7 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,13 @@ class tnlVector : public tnlArray< Real, Device, Index > tnlString getTypeVirtual() const; void addElement( const IndexType i, const RealType& value ); void addElement( const IndexType i, const RealType& value, const RealType& thisElementMultiplicator ); tnlVector< Real, Device, Index >& operator = ( const tnlVector< Real, Device, Index >& array ); template< typename Vector > Loading
src/core/vectors/tnlVectorOperations.h +23 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,17 @@ class tnlVectorOperations< tnlHost > { public: template< typename Vector > static void addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value ); template< typename Vector > static void addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value, const typename Vector::RealType& thisElementMultiplicator ); template< typename Vector > static typename Vector::RealType getVectorMax( const Vector& v ); Loading Loading @@ -125,6 +136,17 @@ class tnlVectorOperations< tnlCuda > { public: template< typename Vector > static void addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value ); template< typename Vector > static void addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value, const typename Vector::RealType& thisElementMultiplicator ); template< typename Vector > static typename Vector::RealType getVectorMax( const Vector& v ); Loading
src/implementation/core/vectors/tnlSharedVector_impl.h +19 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,25 @@ tnlString tnlSharedVector< Real, Device, Index > :: getTypeVirtual() const return this->getType(); }; template< typename Real, typename Device, typename Index > void tnlSharedVector< Real, Device, Index >::addElement( const IndexType i, const RealType& value ) { tnlVectorOperations< Device >::addElement( *this, i, value ); } template< typename Real, typename Device, typename Index > void tnlSharedVector< Real, Device, Index >::addElement( const IndexType i, const RealType& value, const RealType& thisElementMultiplicator ) { tnlVectorOperations< Device >::addElement( *this, i, value, thisElementMultiplicator ); } template< typename Real, typename Device, typename Index > Loading
src/implementation/core/vectors/tnlVectorOperationsCuda_impl.h +17 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,23 @@ #ifndef TNLVECTOROPERATIONSCUDA_IMPL_H_ #define TNLVECTOROPERATIONSCUDA_IMPL_H_ template< typename Vector > void tnlVectorOperations< tnlCuda >::addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value ) { v[ i ] += value; } template< typename Vector > void tnlVectorOperations< tnlCuda >::addElement( Vector& v, const typename Vector::IndexType i, const typename Vector::RealType& value, const typename Vector::RealType& thisElementMultiplicator ) { v[ i ] = thisElementMultiplicator * v[ i ] + value; } template< typename Vector > typename Vector :: RealType tnlVectorOperations< tnlCuda > :: getVectorMax( const Vector& v ) { Loading