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

Fixing ParallelFor example.

parent 8c10f04f
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;
/****
* Set all elements of the vector v to the constant c.
......@@ -16,9 +15,9 @@ void initVector( Vector< double, Device >& v,
{
auto view = v.getConstView();
auto init = [=] __cuda_callable__ ( int i, const double c ) mutable {
view[ i ] = c; }
view[ i ] = c; };
ParallelFor< Device >::exec( 0, v.getSize(), init, c );
Algorithms::ParallelFor< Device >::exec( 0, v.getSize(), init, 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