Loading src/matrix/tnlAdaptiveRgCSRMatrix.h +10 −6 Original line number Diff line number Diff line Loading @@ -38,6 +38,11 @@ struct tnlARGCSRGroupProperties int idxFirstValue; }; inline tnlString GetParameterType( const tnlARGCSRGroupProperties& a ) { return tnlString( "tnlARGCSRGroupProperties" ); } //! Matrix storing the non-zero elements in the Row-grouped CSR (Compressed Sparse Row) format /*! */ Loading Loading @@ -226,7 +231,6 @@ bool tnlAdaptiveRgCSRMatrix< Real, Device, Index > :: setSize( Index new_size ) this -> size = new_size; if( ! blockInfo.setSize(this->size) || ! threads.setSize(this->size) ) return false; blockInfo.setValue( 0 ); threads.setValue( 0 ); last_nonzero_element = 0; return true; Loading Loading @@ -347,7 +351,7 @@ bool tnlAdaptiveRgCSRMatrix< Real, Device, Index > :: copyFrom( const tnlCSRMatr dbgCout( "Inserting data " ); if( Device == tnlHost ) { uint counters[128]; /* uint counters[128]; uint NZperRow[128]; uint index, baseRow; for(uint i=0; i<numberOfGroups; i++) { Loading Loading @@ -377,7 +381,7 @@ bool tnlAdaptiveRgCSRMatrix< Real, Device, Index > :: copyFrom( const tnlCSRMatr } } } } }*/ } if( Device == tnlCuda ) { Loading Loading @@ -439,7 +443,7 @@ void tnlAdaptiveRgCSRMatrix< Real, Device, Index > :: vectorProduct( const tnlLo if( Device == tnlHost ) { int idx[TB_SIZE]; /* int idx[TB_SIZE]; Real psum[TB_SIZE]; //partial sums for each thread int limits[MAX_ROWS + 1]; //indices of first threads for each row + index of first unused thread Real results[MAX_ROWS]; Loading Loading @@ -472,7 +476,7 @@ void tnlAdaptiveRgCSRMatrix< Real, Device, Index > :: vectorProduct( const tnlLo out[mat.blockInfo[group].idxFirstRow + thread] = results[thread]; } } }*/ } if( Device == tnlCuda ) { Loading src/matrix/tnlMatrix.h +10 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ class tnlMatrix : public tnlObject //! Allocates the arrays for the non-zero elements virtual bool setNonzeroElements( int n ) = 0; virtual Index getNonzeroElementsInRow( const Index& row ) const = 0; virtual Index getNonzeroElementsInRow( const Index& row ) const; //! Returns the number of the nonzero elements. virtual Index getNonzeroElements() const = 0; Loading Loading @@ -153,6 +153,15 @@ Index tnlMatrix< Real, Device, Index > :: getArtificialZeroElements() const return 0; }; template< typename Real, tnlDevice Device, typename Index > Index tnlMatrix< Real, Device, Index > :: getNonzeroElementsInRow( const Index& row ) const { tnlAssert( false, "not implemented yet" ); /* * TODO: this method should be abstract */ } template< typename Real, tnlDevice Device, typename Index > bool tnlMatrix< Real, Device, Index > :: setRowsReordering( const tnlLongVector< Index, Device, Index >& reorderingPermutation ) { Loading tests/Makefile.am +12 −12 Original line number Diff line number Diff line Loading @@ -14,16 +14,16 @@ matrix_solvers_benchmark_sources = matrix-solvers-benchmark.h tnl_benchmarks_sources = tnl-benchmarks.h #if BUILD_CUDA matrix_formats_test_sources += matrix-formats-test-cuda.cu sparse_matrix_benchmark_sources += sparse-matrix-benchmark-cuda.cu \ cusp-test.h matrix_solvers_benchmark_sources += matrix-solvers-benchmark-cuda.cu tnl_benchmarks_sources += tnl-benchmarks-cuda.cu #matrix_formats_test_sources += matrix-formats-test-cuda.cu #sparse_matrix_benchmark_sources += sparse-matrix-benchmark-cuda.cu \ # cusp-test.h #matrix_solvers_benchmark_sources += matrix-solvers-benchmark-cuda.cu #tnl_benchmarks_sources += tnl-benchmarks-cuda.cu #else #matrix_formats_test_sources += matrix-formats-test.cpp #sparse_matrix_benchmark_sources += sparse-matrix-benchmark.cpp #matrix_solvers_benchmark_sources += matrix-solvers-benchmark.cpp #tnl_benchmarks_sources += tnl-benchmarks.cpp matrix_formats_test_sources += matrix-formats-test.cpp sparse_matrix_benchmark_sources += sparse-matrix-benchmark.cpp matrix_solvers_benchmark_sources += matrix-solvers-benchmark.cpp tnl_benchmarks_sources += tnl-benchmarks.cpp #endif matrix_formats_test_SOURCES = $(matrix_formats_test_sources) Loading Loading @@ -74,9 +74,9 @@ matrix_solvers_benchmark_dbg_LDADD = ../src/libtnl-0.1.la \ endif #if BUILD_CUDA matrix_formats_test_CXXFLAGS = -DHAVE_CUDA sparse_matrix_benchmark_CXXFLAGS += -DHAVE_CUDA tnl_benchmarks_CXXFLAGS = -DHAVE_CUDA #matrix_formats_test_CXXFLAGS = -DHAVE_CUDA #sparse_matrix_benchmark_CXXFLAGS += -DHAVE_CUDA #tnl_benchmarks_CXXFLAGS = -DHAVE_CUDA #endif Loading tests/Makefile.in +87 −143 File changed.Preview size limit exceeded, changes collapsed. Show changes tests/florida-matrix-market +1 −1 Original line number Diff line number Diff line Loading @@ -1450,6 +1450,6 @@ http://www.cise.ufl.edu/research/sparse/MM/Zitney/rdist3a.tar.gz" #FLORIDA_MM_MATRICES="http://www.cise.ufl.edu/research/sparse/MM/Oberwolfach/piston.tar.gz" #FLORIDA_MM_MATRICES="http://www.cise.ufl.edu/research/sparse/MM/TSOPF/TSOPF_RS_b2383_c1.tar.gz" #FLORIDA_MM_MATRICES="http://www.cise.ufl.edu/research/sparse/MM/Oberwolfach/piston.tar.gz" #FLORIDA_MM_MATRICES="" FLORIDA_MM_MATRICES="" Loading
src/matrix/tnlAdaptiveRgCSRMatrix.h +10 −6 Original line number Diff line number Diff line Loading @@ -38,6 +38,11 @@ struct tnlARGCSRGroupProperties int idxFirstValue; }; inline tnlString GetParameterType( const tnlARGCSRGroupProperties& a ) { return tnlString( "tnlARGCSRGroupProperties" ); } //! Matrix storing the non-zero elements in the Row-grouped CSR (Compressed Sparse Row) format /*! */ Loading Loading @@ -226,7 +231,6 @@ bool tnlAdaptiveRgCSRMatrix< Real, Device, Index > :: setSize( Index new_size ) this -> size = new_size; if( ! blockInfo.setSize(this->size) || ! threads.setSize(this->size) ) return false; blockInfo.setValue( 0 ); threads.setValue( 0 ); last_nonzero_element = 0; return true; Loading Loading @@ -347,7 +351,7 @@ bool tnlAdaptiveRgCSRMatrix< Real, Device, Index > :: copyFrom( const tnlCSRMatr dbgCout( "Inserting data " ); if( Device == tnlHost ) { uint counters[128]; /* uint counters[128]; uint NZperRow[128]; uint index, baseRow; for(uint i=0; i<numberOfGroups; i++) { Loading Loading @@ -377,7 +381,7 @@ bool tnlAdaptiveRgCSRMatrix< Real, Device, Index > :: copyFrom( const tnlCSRMatr } } } } }*/ } if( Device == tnlCuda ) { Loading Loading @@ -439,7 +443,7 @@ void tnlAdaptiveRgCSRMatrix< Real, Device, Index > :: vectorProduct( const tnlLo if( Device == tnlHost ) { int idx[TB_SIZE]; /* int idx[TB_SIZE]; Real psum[TB_SIZE]; //partial sums for each thread int limits[MAX_ROWS + 1]; //indices of first threads for each row + index of first unused thread Real results[MAX_ROWS]; Loading Loading @@ -472,7 +476,7 @@ void tnlAdaptiveRgCSRMatrix< Real, Device, Index > :: vectorProduct( const tnlLo out[mat.blockInfo[group].idxFirstRow + thread] = results[thread]; } } }*/ } if( Device == tnlCuda ) { Loading
src/matrix/tnlMatrix.h +10 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ class tnlMatrix : public tnlObject //! Allocates the arrays for the non-zero elements virtual bool setNonzeroElements( int n ) = 0; virtual Index getNonzeroElementsInRow( const Index& row ) const = 0; virtual Index getNonzeroElementsInRow( const Index& row ) const; //! Returns the number of the nonzero elements. virtual Index getNonzeroElements() const = 0; Loading Loading @@ -153,6 +153,15 @@ Index tnlMatrix< Real, Device, Index > :: getArtificialZeroElements() const return 0; }; template< typename Real, tnlDevice Device, typename Index > Index tnlMatrix< Real, Device, Index > :: getNonzeroElementsInRow( const Index& row ) const { tnlAssert( false, "not implemented yet" ); /* * TODO: this method should be abstract */ } template< typename Real, tnlDevice Device, typename Index > bool tnlMatrix< Real, Device, Index > :: setRowsReordering( const tnlLongVector< Index, Device, Index >& reorderingPermutation ) { Loading
tests/Makefile.am +12 −12 Original line number Diff line number Diff line Loading @@ -14,16 +14,16 @@ matrix_solvers_benchmark_sources = matrix-solvers-benchmark.h tnl_benchmarks_sources = tnl-benchmarks.h #if BUILD_CUDA matrix_formats_test_sources += matrix-formats-test-cuda.cu sparse_matrix_benchmark_sources += sparse-matrix-benchmark-cuda.cu \ cusp-test.h matrix_solvers_benchmark_sources += matrix-solvers-benchmark-cuda.cu tnl_benchmarks_sources += tnl-benchmarks-cuda.cu #matrix_formats_test_sources += matrix-formats-test-cuda.cu #sparse_matrix_benchmark_sources += sparse-matrix-benchmark-cuda.cu \ # cusp-test.h #matrix_solvers_benchmark_sources += matrix-solvers-benchmark-cuda.cu #tnl_benchmarks_sources += tnl-benchmarks-cuda.cu #else #matrix_formats_test_sources += matrix-formats-test.cpp #sparse_matrix_benchmark_sources += sparse-matrix-benchmark.cpp #matrix_solvers_benchmark_sources += matrix-solvers-benchmark.cpp #tnl_benchmarks_sources += tnl-benchmarks.cpp matrix_formats_test_sources += matrix-formats-test.cpp sparse_matrix_benchmark_sources += sparse-matrix-benchmark.cpp matrix_solvers_benchmark_sources += matrix-solvers-benchmark.cpp tnl_benchmarks_sources += tnl-benchmarks.cpp #endif matrix_formats_test_SOURCES = $(matrix_formats_test_sources) Loading Loading @@ -74,9 +74,9 @@ matrix_solvers_benchmark_dbg_LDADD = ../src/libtnl-0.1.la \ endif #if BUILD_CUDA matrix_formats_test_CXXFLAGS = -DHAVE_CUDA sparse_matrix_benchmark_CXXFLAGS += -DHAVE_CUDA tnl_benchmarks_CXXFLAGS = -DHAVE_CUDA #matrix_formats_test_CXXFLAGS = -DHAVE_CUDA #sparse_matrix_benchmark_CXXFLAGS += -DHAVE_CUDA #tnl_benchmarks_CXXFLAGS = -DHAVE_CUDA #endif Loading
tests/florida-matrix-market +1 −1 Original line number Diff line number Diff line Loading @@ -1450,6 +1450,6 @@ http://www.cise.ufl.edu/research/sparse/MM/Zitney/rdist3a.tar.gz" #FLORIDA_MM_MATRICES="http://www.cise.ufl.edu/research/sparse/MM/Oberwolfach/piston.tar.gz" #FLORIDA_MM_MATRICES="http://www.cise.ufl.edu/research/sparse/MM/TSOPF/TSOPF_RS_b2383_c1.tar.gz" #FLORIDA_MM_MATRICES="http://www.cise.ufl.edu/research/sparse/MM/Oberwolfach/piston.tar.gz" #FLORIDA_MM_MATRICES="" FLORIDA_MM_MATRICES=""