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

Fixed ParalleFor example.

parent 9967b10b
No related branches found
No related tags found
1 merge request!44Tutorials
......@@ -16,7 +16,7 @@ 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 );
}
......
for( int i = 0; i < Size; i++ )
{
a[ i ] = b[ i ] + c; sum += a[ i ];
};
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