Commit aff9ac0b authored by Jakub Klinkovský's avatar Jakub Klinkovský Committed by Tomáš Oberhuber
Browse files

Lambda function for sequentialForAllRows does not have to be __cuda_callable__...

Lambda function for sequentialForAllRows does not have to be __cuda_callable__ and can capture by-reference
parent 346f2abe
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -151,8 +151,7 @@ writeMtx( std::ostream& str,
   str << "%%" << std::setw( 9 ) << " ROWS " << std::setw( 9 ) << " COLUMNS " << std::setw( 12 ) << " ELEMENTS " << std::endl;
   str << std::setw( 9 ) << matrix.getRows() << " " << std::setw( 9 ) << matrix.getColumns() << " " << std::setw( 12 ) << matrix.getNonzeroElementsCount() << std::endl;
   std::ostream* str_ptr = &str;
   auto cout_ptr = &std::cout;
   auto f = [=] __cuda_callable__ ( const typename Matrix::ConstRowViewType& row ) mutable {
   auto f = [&] ( const typename Matrix::ConstRowViewType& row ) mutable {
      auto rowIdx = row.getRowIndex();
      for( IndexType localIdx = 0; localIdx < row.getSize(); localIdx++ )
      {
@@ -162,7 +161,7 @@ writeMtx( std::ostream& str,
         {
            *str_ptr << std::setw( 9 ) << rowIdx + 1 << std::setw( 9 ) << columnIdx + 1 << std::setw( 12 ) << value << std::endl;
            if( verbose )
               *cout_ptr << "Drawing the row " << rowIdx << "      \r" << std::flush;
               std::cout << "Drawing the row " << rowIdx << "      \r" << std::flush;
         }
      }
   };