diff --git a/Documentation/Examples/Algorithms/ParallelForExample.cpp b/Documentation/Examples/Algorithms/ParallelForExample.cpp index 46d23f58a8c32a9fbabb3df63766b64361cf8f1e..87ea0d0cfbc41c194b9a3b86ac30f483d468546a 100644 --- a/Documentation/Examples/Algorithms/ParallelForExample.cpp +++ b/Documentation/Examples/Algorithms/ParallelForExample.cpp @@ -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 ); } diff --git a/Documentation/Tutorials/ForLoops/StaticForExample-3.cpp b/Documentation/Tutorials/ForLoops/StaticForExample-3.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7ee4afd72c42e2bf0fd8db28bd3f5e7c3c47cc0f --- /dev/null +++ b/Documentation/Tutorials/ForLoops/StaticForExample-3.cpp @@ -0,0 +1,4 @@ +for( int i = 0; i < Size; i++ ) +{ + a[ i ] = b[ i ] + c; sum += a[ i ]; +};