Skip to content
Snippets Groups Projects
Commit 9967b10b authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Modifying namespaces in ParallelFor tutorial examples.

parent 52f727e0
No related branches found
No related tags found
1 merge request!44Tutorials
......@@ -5,7 +5,6 @@
using namespace TNL;
using namespace TNL::Containers;
using namespace TNL::Algorithms;
template< typename Device >
void meshFunctionSum( const int xSize,
......@@ -29,7 +28,7 @@ void meshFunctionSum( const int xSize,
const int idx = j * xSize + i;
result_view[ idx ] = v1_view[ idx ] + v2_view[ idx ] + c; };
ParallelFor2D< Device >::exec( 0, 0, xSize, ySize, sum, xSize, c );
Algorithms::ParallelFor2D< Device >::exec( 0, 0, xSize, ySize, sum, xSize, c );
}
int main( int argc, char* argv[] )
......
......@@ -5,7 +5,6 @@
using namespace TNL;
using namespace TNL::Containers;
using namespace TNL::Algorithms;
template< typename Device >
void meshFunctionSum( const int xSize,
......@@ -30,7 +29,7 @@ void meshFunctionSum( const int xSize,
const int idx = ( k * ySize + j ) * xSize + i;
result_view[ idx ] = v1_view[ idx ] + v2_view[ idx ] + c; };
ParallelFor3D< Device >::exec( 0, 0, 0, xSize, ySize,zSize, sum, xSize, ySize, c );
Algorithms::ParallelFor3D< Device >::exec( 0, 0, 0, xSize, ySize,zSize, sum, xSize, ySize, c );
}
int main( int argc, char* argv[] )
......
......@@ -5,7 +5,6 @@
using namespace TNL;
using namespace TNL::Containers;
using namespace TNL::Algorithms;
template< typename Device >
void vectorSum( const Vector< double, Device >& v1,
......@@ -26,7 +25,7 @@ void vectorSum( const Vector< double, Device >& v1,
auto sum = [=] __cuda_callable__ ( int i, const double c ) mutable {
result_view[ i ] = v1_view[ i ] + v2_view[ i ] + c; };
ParallelFor< Device >::exec( 0, v1.getSize(), sum, c );
Algorithms::ParallelFor< Device >::exec( 0, v1.getSize(), sum, c );
}
int main( int argc, char* argv[] )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment