Loading Documentation/Examples/Matrices/TridiagonalMatrix/TridiagonalMatrixExample_setElement.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -44,9 +44,6 @@ int main( int argc, char* argv[] ) setElements< TNL::Devices::Host >(); #ifdef HAVE_CUDA // It seems that nvcc 10.1 does not handle lambda functions properly. // It is hard to make nvcc to compile this example and it does not work // properly. We will try it with later version of CUDA. std::cout << "Set elements on CUDA device:" << std::endl; setElements< TNL::Devices::Cuda >(); #endif Loading Documentation/Examples/Matrices/TridiagonalMatrix/TridiagonalMatrixViewExample_getRow.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -16,10 +16,6 @@ void getRowExample() auto view = matrix.getView(); auto f = [=] __cuda_callable__ ( int rowIdx ) mutable { //auto row = matrix->getRow( rowIdx ); // For some reason the previous line of code is not accepted by nvcc 10.1 // so we replace it with the following two lines. //auto ref = matrix.modifyData(); auto row = view.getRow( rowIdx ); if( rowIdx > 0 ) Loading @@ -42,9 +38,6 @@ int main( int argc, char* argv[] ) getRowExample< TNL::Devices::Host >(); #ifdef HAVE_CUDA // It seems that nvcc 10.1 does not handle lambda functions properly. // It is hard to make nvcc to compile this example and it does not work // properly. We will try it with later version of CUDA. std::cout << "Getting matrix rows on CUDA device: " << std::endl; getRowExample< TNL::Devices::Cuda >(); #endif Loading Documentation/Examples/Matrices/TridiagonalMatrix/TridiagonalMatrixViewExample_setElement.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -37,9 +37,6 @@ int main( int argc, char* argv[] ) setElements< TNL::Devices::Host >(); #ifdef HAVE_CUDA // It seems that nvcc 10.1 does not handle lambda functions properly. // It is hard to make nvcc to compile this example and it does not work // properly. We will try it with later version of CUDA. std::cout << "Set elements on CUDA device:" << std::endl; setElements< TNL::Devices::Cuda >(); #endif Loading src/TNL/Matrices/TridiagonalMatrix.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -600,7 +600,7 @@ operator=( const TridiagonalMatrix< Real_, Device_, Index_, Organization_, RealA if( std::is_same< Device, Device_ >::value ) { const auto matrix_view = matrix.getView(); auto f = [=] __cuda_callable__ ( const IndexType& rowIdx, const IndexType& localIdx, const IndexType& column, Real& value ) mutable { auto f = [=] __cuda_callable__ ( const IndexType& rowIdx, const IndexType& localIdx, const IndexType& column, Real& value, bool& compute ) mutable { value = matrix_view.getValues()[ matrix_view.getIndexer().getGlobalIndex( rowIdx, localIdx ) ]; }; this->forAllRows( f ); Loading @@ -610,7 +610,7 @@ operator=( const TridiagonalMatrix< Real_, Device_, Index_, Organization_, RealA TridiagonalMatrix< Real, Device, Index, Organization_ > auxMatrix; auxMatrix = matrix; const auto matrix_view = auxMatrix.getView(); auto f = [=] __cuda_callable__ ( const IndexType& rowIdx, const IndexType& localIdx, const IndexType& column, Real& value ) mutable { auto f = [=] __cuda_callable__ ( const IndexType& rowIdx, const IndexType& localIdx, const IndexType& column, Real& value, bool& compute ) mutable { value = matrix_view.getValues()[ matrix_view.getIndexer().getGlobalIndex( rowIdx, localIdx ) ]; }; this->forAllRows( f ); Loading src/TNL/Matrices/TridiagonalMatrixView.h +3 −0 Original line number Diff line number Diff line Loading @@ -275,6 +275,7 @@ class TridiagonalMatrixView : public MatrixView< Real, Device, Index > * \par Output * \include TridiagonalMatrixViewExample_setElement.out */ __cuda_callable__ void setElement( const IndexType row, const IndexType column, const RealType& value ); Loading Loading @@ -302,6 +303,7 @@ class TridiagonalMatrixView : public MatrixView< Real, Device, Index > * \include TridiagonalMatrixViewExample_addElement.out * */ __cuda_callable__ void addElement( const IndexType row, const IndexType column, const RealType& value, Loading @@ -328,6 +330,7 @@ class TridiagonalMatrixView : public MatrixView< Real, Device, Index > * \include TridiagonalMatrixViewExample_getElement.out * */ __cuda_callable__ RealType getElement( const IndexType row, const IndexType column ) const; Loading Loading
Documentation/Examples/Matrices/TridiagonalMatrix/TridiagonalMatrixExample_setElement.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -44,9 +44,6 @@ int main( int argc, char* argv[] ) setElements< TNL::Devices::Host >(); #ifdef HAVE_CUDA // It seems that nvcc 10.1 does not handle lambda functions properly. // It is hard to make nvcc to compile this example and it does not work // properly. We will try it with later version of CUDA. std::cout << "Set elements on CUDA device:" << std::endl; setElements< TNL::Devices::Cuda >(); #endif Loading
Documentation/Examples/Matrices/TridiagonalMatrix/TridiagonalMatrixViewExample_getRow.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -16,10 +16,6 @@ void getRowExample() auto view = matrix.getView(); auto f = [=] __cuda_callable__ ( int rowIdx ) mutable { //auto row = matrix->getRow( rowIdx ); // For some reason the previous line of code is not accepted by nvcc 10.1 // so we replace it with the following two lines. //auto ref = matrix.modifyData(); auto row = view.getRow( rowIdx ); if( rowIdx > 0 ) Loading @@ -42,9 +38,6 @@ int main( int argc, char* argv[] ) getRowExample< TNL::Devices::Host >(); #ifdef HAVE_CUDA // It seems that nvcc 10.1 does not handle lambda functions properly. // It is hard to make nvcc to compile this example and it does not work // properly. We will try it with later version of CUDA. std::cout << "Getting matrix rows on CUDA device: " << std::endl; getRowExample< TNL::Devices::Cuda >(); #endif Loading
Documentation/Examples/Matrices/TridiagonalMatrix/TridiagonalMatrixViewExample_setElement.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -37,9 +37,6 @@ int main( int argc, char* argv[] ) setElements< TNL::Devices::Host >(); #ifdef HAVE_CUDA // It seems that nvcc 10.1 does not handle lambda functions properly. // It is hard to make nvcc to compile this example and it does not work // properly. We will try it with later version of CUDA. std::cout << "Set elements on CUDA device:" << std::endl; setElements< TNL::Devices::Cuda >(); #endif Loading
src/TNL/Matrices/TridiagonalMatrix.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -600,7 +600,7 @@ operator=( const TridiagonalMatrix< Real_, Device_, Index_, Organization_, RealA if( std::is_same< Device, Device_ >::value ) { const auto matrix_view = matrix.getView(); auto f = [=] __cuda_callable__ ( const IndexType& rowIdx, const IndexType& localIdx, const IndexType& column, Real& value ) mutable { auto f = [=] __cuda_callable__ ( const IndexType& rowIdx, const IndexType& localIdx, const IndexType& column, Real& value, bool& compute ) mutable { value = matrix_view.getValues()[ matrix_view.getIndexer().getGlobalIndex( rowIdx, localIdx ) ]; }; this->forAllRows( f ); Loading @@ -610,7 +610,7 @@ operator=( const TridiagonalMatrix< Real_, Device_, Index_, Organization_, RealA TridiagonalMatrix< Real, Device, Index, Organization_ > auxMatrix; auxMatrix = matrix; const auto matrix_view = auxMatrix.getView(); auto f = [=] __cuda_callable__ ( const IndexType& rowIdx, const IndexType& localIdx, const IndexType& column, Real& value ) mutable { auto f = [=] __cuda_callable__ ( const IndexType& rowIdx, const IndexType& localIdx, const IndexType& column, Real& value, bool& compute ) mutable { value = matrix_view.getValues()[ matrix_view.getIndexer().getGlobalIndex( rowIdx, localIdx ) ]; }; this->forAllRows( f ); Loading
src/TNL/Matrices/TridiagonalMatrixView.h +3 −0 Original line number Diff line number Diff line Loading @@ -275,6 +275,7 @@ class TridiagonalMatrixView : public MatrixView< Real, Device, Index > * \par Output * \include TridiagonalMatrixViewExample_setElement.out */ __cuda_callable__ void setElement( const IndexType row, const IndexType column, const RealType& value ); Loading Loading @@ -302,6 +303,7 @@ class TridiagonalMatrixView : public MatrixView< Real, Device, Index > * \include TridiagonalMatrixViewExample_addElement.out * */ __cuda_callable__ void addElement( const IndexType row, const IndexType column, const RealType& value, Loading @@ -328,6 +330,7 @@ class TridiagonalMatrixView : public MatrixView< Real, Device, Index > * \include TridiagonalMatrixViewExample_getElement.out * */ __cuda_callable__ RealType getElement( const IndexType row, const IndexType column ) const; Loading