Commit e619d412 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing the matrix reader for the MTX files.

parent ac981f1b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -143,12 +143,12 @@ if( WITH_CUDA STREQUAL "yes" )
           endif()            
        endif( NOT WITH_CUSPARSE STREQUAL "no" )
   
    else( CUDA_FOUND )
      AddCompilerFlag( "-std=c++11" )         
    #else( CUDA_FOUND )
    #  AddCompilerFlag( "-std=c++11" )         
    endif( CUDA_FOUND )
else( WITH_CUDA STREQUAL "yes" )
#else( WITH_CUDA STREQUAL "yes" )
   #AddCompilerFlag( "-std=gnu++0x -ftree-vectorizer-verbose=1" )       
   AddCompilerFlag( "-std=c++11" )       
   #AddCompilerFlag( "-std=c++11" )       
endif( WITH_CUDA STREQUAL "yes" )
AddCompilerFlag( "-std=c++11" )       

+4 −4
Original line number Diff line number Diff line
@@ -293,17 +293,17 @@ bool tnlMatrixReader< Matrix >::computeCompressedRowsLengthsFromMtxFile( std::is
      if( verbose )
         cout << " Counting the matrix elements ... " << numberOfElements / 1000 << " thousands      \r" << flush;
      rowLengths[ row - 1 ]++;
      if( rowLengths[ row - 1 ] >= columns )
      if( rowLengths[ row - 1 ] > columns )
      {
         cerr << "There are more elements than the matrix columns at the row " << row << "." << endl;
         cerr << "There are more elements ( " << rowLengths[ row - 1 ] << " ) than the matrix columns ( " << columns << " ) at the row " << row << "." << endl;
         return false;
      }
      if( symmetricMatrix && row != column )
      {
         rowLengths[ column - 1 ]++;
         if( rowLengths[ column - 1 ] >= columns )
         if( rowLengths[ column - 1 ] > columns )
         {
            cerr << "There are more elements than the matrix columns at the row " << column << " ." << endl;
            cerr << "There are more elements ( " << rowLengths[ row - 1 ] << " ) than the matrix columns ( " << columns << " ) at the row " << column << " ." << endl;
            return false;
         }
      }
+1 −2
Original line number Diff line number Diff line
@@ -7,8 +7,7 @@ CXX_STD_FLAGS="-std=c++11"
for option in "$@"
do
    case $option in
        --cuda                  ) CUDA_FLAGS="-DHAVE_CUDA -DHAVE_NOT_CXX11 `tnl-cuda-arch`"
                                  CXX_STD_FLAGS="" ;;
        --cuda                  ) CUDA_FLAGS="-DHAVE_CUDA `tnl-cuda-arch`" ;;
        --debug                 ) DEBUG_FLAGS="-g -O0"
    esac
done