diff --git a/src/TNL/Matrices/SparseMatrixView.hpp b/src/TNL/Matrices/SparseMatrixView.hpp index 8007ebd26904d0e271683654129462801274fafd..1a55a22c43a292eb419b96bb0be2a3d3164618d7 100644 --- a/src/TNL/Matrices/SparseMatrixView.hpp +++ b/src/TNL/Matrices/SparseMatrixView.hpp @@ -424,7 +424,10 @@ vectorProduct( const InVector& inVector, auto keeper = [=] __cuda_callable__ ( IndexType row, const ComputeRealType& value ) mutable { if( isSymmetric() ) - outVectorView[ row ] += matrixMultiplicator * value; + { + typename OutVector::RealType aux = matrixMultiplicator * value; + Algorithms::AtomicOperations< DeviceType >::add( outVectorView[ row ], aux ); + } else { if( outVectorMultiplicator == 0.0 )