Loading Documentation/Examples/Algorithms/Segments/SegmentsExample_CSR_constructor_1.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ void SegmentsExample() * Insert data into particular segments. */ auto data_view = data.getView(); segments.forAllElements( [=] __cuda_callable__ ( int segmentIdx, int localIdx, int globalIdx, bool& compute ) mutable { segments.forAllElements( [=] __cuda_callable__ ( int segmentIdx, int localIdx, int globalIdx ) mutable { if( localIdx <= segmentIdx ) data_view[ globalIdx ] = segmentIdx; } ); Loading Documentation/Examples/Algorithms/Segments/SegmentsExample_CSR_constructor_2.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ void SegmentsExample() * Insert data into particular segments. */ auto data_view = data.getView(); segments.forAllElements( [=] __cuda_callable__ ( int segmentIdx, int localIdx, int globalIdx, bool& compute ) mutable { segments.forAllElements( [=] __cuda_callable__ ( int segmentIdx, int localIdx, int globalIdx ) mutable { if( localIdx <= segmentIdx ) data_view[ globalIdx ] = segmentIdx; } ); Loading Documentation/Examples/Algorithms/Segments/SegmentsExample_General.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ void SegmentsExample() * Insert data into particular segments. */ auto data_view = data.getView(); segments.forAllElements( [=] __cuda_callable__ ( IndexType segmentIdx, IndexType localIdx, IndexType globalIdx, bool& compute ) mutable { segments.forAllElements( [=] __cuda_callable__ ( IndexType segmentIdx, IndexType localIdx, IndexType globalIdx ) mutable { if( localIdx <= segmentIdx ) data_view[ globalIdx ] = segmentIdx; } ); Loading Documentation/Examples/Matrices/DenseMatrix/DenseMatrixExample_forAllElements.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -8,10 +8,8 @@ void forAllElementsExample() { TNL::Matrices::DenseMatrix< double, Device > matrix( 5, 5 ); auto f = [=] __cuda_callable__ ( int rowIdx, int columnIdx, int columnIdx_, double& value, bool& compute ) { if( rowIdx < columnIdx ) compute = false; else auto f = [=] __cuda_callable__ ( int rowIdx, int columnIdx, int columnIdx_, double& value ) { if( rowIdx >= columnIdx ) value = rowIdx + columnIdx; }; Loading Documentation/Examples/Matrices/DenseMatrix/DenseMatrixExample_forElements.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -8,10 +8,8 @@ void forElementsExample() { TNL::Matrices::DenseMatrix< double, Device > matrix( 5, 5 ); auto f = [=] __cuda_callable__ ( int rowIdx, int columnIdx, int columnIdx_, double& value, bool& compute ) { if( rowIdx < columnIdx ) compute = false; else auto f = [=] __cuda_callable__ ( int rowIdx, int columnIdx, int columnIdx_, double& value ) { if( rowIdx >= columnIdx ) value = rowIdx + columnIdx; }; Loading Loading
Documentation/Examples/Algorithms/Segments/SegmentsExample_CSR_constructor_1.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ void SegmentsExample() * Insert data into particular segments. */ auto data_view = data.getView(); segments.forAllElements( [=] __cuda_callable__ ( int segmentIdx, int localIdx, int globalIdx, bool& compute ) mutable { segments.forAllElements( [=] __cuda_callable__ ( int segmentIdx, int localIdx, int globalIdx ) mutable { if( localIdx <= segmentIdx ) data_view[ globalIdx ] = segmentIdx; } ); Loading
Documentation/Examples/Algorithms/Segments/SegmentsExample_CSR_constructor_2.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ void SegmentsExample() * Insert data into particular segments. */ auto data_view = data.getView(); segments.forAllElements( [=] __cuda_callable__ ( int segmentIdx, int localIdx, int globalIdx, bool& compute ) mutable { segments.forAllElements( [=] __cuda_callable__ ( int segmentIdx, int localIdx, int globalIdx ) mutable { if( localIdx <= segmentIdx ) data_view[ globalIdx ] = segmentIdx; } ); Loading
Documentation/Examples/Algorithms/Segments/SegmentsExample_General.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ void SegmentsExample() * Insert data into particular segments. */ auto data_view = data.getView(); segments.forAllElements( [=] __cuda_callable__ ( IndexType segmentIdx, IndexType localIdx, IndexType globalIdx, bool& compute ) mutable { segments.forAllElements( [=] __cuda_callable__ ( IndexType segmentIdx, IndexType localIdx, IndexType globalIdx ) mutable { if( localIdx <= segmentIdx ) data_view[ globalIdx ] = segmentIdx; } ); Loading
Documentation/Examples/Matrices/DenseMatrix/DenseMatrixExample_forAllElements.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -8,10 +8,8 @@ void forAllElementsExample() { TNL::Matrices::DenseMatrix< double, Device > matrix( 5, 5 ); auto f = [=] __cuda_callable__ ( int rowIdx, int columnIdx, int columnIdx_, double& value, bool& compute ) { if( rowIdx < columnIdx ) compute = false; else auto f = [=] __cuda_callable__ ( int rowIdx, int columnIdx, int columnIdx_, double& value ) { if( rowIdx >= columnIdx ) value = rowIdx + columnIdx; }; Loading
Documentation/Examples/Matrices/DenseMatrix/DenseMatrixExample_forElements.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -8,10 +8,8 @@ void forElementsExample() { TNL::Matrices::DenseMatrix< double, Device > matrix( 5, 5 ); auto f = [=] __cuda_callable__ ( int rowIdx, int columnIdx, int columnIdx_, double& value, bool& compute ) { if( rowIdx < columnIdx ) compute = false; else auto f = [=] __cuda_callable__ ( int rowIdx, int columnIdx, int columnIdx_, double& value ) { if( rowIdx >= columnIdx ) value = rowIdx + columnIdx; }; Loading