Commit 5043ac64 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber Committed by Tomáš Oberhuber
Browse files

Restoring dense matrix unit tests.

parent 7cb2f2d4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -55,8 +55,7 @@ ADD_TEST( SparseMatrixCopyTest ${EXECUTABLE_OUTPUT_PATH}/SparseMatrixCopyTest${C
ADD_TEST( SparseMatrixTest ${EXECUTABLE_OUTPUT_PATH}/SparseMatrixTest${CMAKE_EXECUTABLE_SUFFIX} )
# TODO: Uncomment the following when AdEllpack works
#ADD_TEST( SparseMatrixTest_AdEllpack ${EXECUTABLE_OUTPUT_PATH}/SparseMatrixTest_AdEllpack${CMAKE_EXECUTABLE_SUFFIX} )
# TODO: DenseMatrixTest is not finished
#ADD_TEST( DenseMatrixTest ${EXECUTABLE_OUTPUT_PATH}/DenseMatrixTest${CMAKE_EXECUTABLE_SUFFIX} )
ADD_TEST( DenseMatrixTest ${EXECUTABLE_OUTPUT_PATH}/DenseMatrixTest${CMAKE_EXECUTABLE_SUFFIX} )

####
# Segments tests
+2 −1
Original line number Diff line number Diff line
@@ -585,6 +585,7 @@ void test_SetRow()
      for( IndexType j = 0; j < cols; j++ )
         m->setElement( i, j, value++ );

   // TODO: replace this with dense matrix view
   Matrix* m_ptr = &m.template modifyData< DeviceType >();
   auto f = [=] __cuda_callable__ ( IndexType rowIdx ) mutable {
      RealType values[ 3 ][ 5 ] {
@@ -597,7 +598,7 @@ void test_SetRow()
         { 2, 3, 4, 5, 6 } };
      auto row = m_ptr->getRow( rowIdx );
      for( IndexType i = 0; i < 5; i++ )
         row.setElement( columnIndexes[ rowIdx ][ i ], values[ rowIdx ][ i ] );
      /   row.setElement( rowIdx, i ); //columnIndexes[ rowIdx ][ i ], values[ rowIdx ][ i ] );
   };
   TNL::Pointers::synchronizeSmartPointersOnDevice< DeviceType >();
   TNL::Algorithms::ParallelFor< DeviceType >::exec( 0, 3, f );