Commit 576b50fa authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Improving SequentialFor example.

parent d29c25a7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -10,10 +10,11 @@ using namespace TNL::Containers;
template< typename Device >
void printVector()
{
   const int size( 36 );
   const int size( 60 );
   TNL::Containers::Vector< float, Device > v( size, 1.0 );
   auto view = v.getView();
   auto print = [=] __cuda_callable__  ( int i ) mutable {
      if( i % 5 == 0 )
         printf( "v[ %d ] = %f \n", i, view[ i ] );  // we use printf because of compatibility with GPU kernels
   };
   std::cout << "Printing vector using parallel for: " << std::endl;