Commit 239f6a75 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Traversers benchmark is using asynchronous parallel for.

parent cd43ce96
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ class GridTraversersBenchmark< 1, Device, Real, Index >
         {
            data[ i ] += (Real) 1.0;
         };
         ParallelFor< Device >::exec( ( Index ) 0, size, f, v.getData() );
         ParallelFor< Device, AsynchronousMode >::exec( ( Index ) 0, size, f, v.getData() );
      }

      void addOneUsingParallelForAndGridEntity()
@@ -110,7 +110,7 @@ class GridTraversersBenchmark< 1, Device, Real, Index >
            entity.refresh();
            data[ entity.getIndex() ] += (Real) 1.0;
         };
         ParallelFor< Device >::exec( ( Index ) 0, size, f, v.getData() );
         ParallelFor< Device, AsynchronousMode >::exec( ( Index ) 0, size, f, v.getData() );
      }

      void addOneUsingParallelForAndMeshFunction()
@@ -125,7 +125,7 @@ class GridTraversersBenchmark< 1, Device, Real, Index >
            ( *_u )( entity ) += (Real) 1.0;
            //WriteOneEntitiesProcessorType::processEntity( *currentGrid, userData, entity );
         };
         ParallelFor< Device >::exec( ( Index ) 0, size, f );
         ParallelFor< Device, AsynchronousMode >::exec( ( Index ) 0, size, f );
      }

      void addOneUsingTraverser()
+18 −15
Original line number Diff line number Diff line
@@ -100,7 +100,8 @@ class GridTraversersBenchmark< 2, Device, Real, Index >
            data[ j * _size + i ] += (Real) 1.0;
         };
         
         ParallelFor2D< Device >::exec( ( Index ) 0,
         ParallelFor2D< Device, AsynchronousMode >::exec(
            ( Index ) 0,
            ( Index ) 0,
            this->size,
            this->size,
@@ -119,7 +120,8 @@ class GridTraversersBenchmark< 2, Device, Real, Index >
            data[ entity.getIndex() ] += (Real) 1.0;
         };
         
         ParallelFor2D< Device >::exec( ( Index ) 0,
         ParallelFor2D< Device, AsynchronousMode >::exec(
            ( Index ) 0,
            ( Index ) 0,
            this->size,
            this->size,
@@ -139,7 +141,8 @@ class GridTraversersBenchmark< 2, Device, Real, Index >
            ( *_u )( entity ) += (Real) 1.0;
         };
         
         ParallelFor2D< Device >::exec( ( Index ) 0,
         ParallelFor2D< Device, AsynchronousMode >::exec(
            ( Index ) 0,
            ( Index ) 0,
            this->size,
            this->size,
+24 −21
Original line number Diff line number Diff line
@@ -109,7 +109,8 @@ class GridTraversersBenchmark< 3, Device, Real, Index >
            data[ ( k * _size + j ) * _size + i ] += (Real) 1.0;
         };
         
         ParallelFor3D< Device >::exec( ( Index ) 0,
         ParallelFor3D< Device, AsynchronousMode >::exec(
            ( Index ) 0,
            ( Index ) 0,
            ( Index ) 0,
            this->size,
@@ -131,7 +132,8 @@ class GridTraversersBenchmark< 3, Device, Real, Index >
            data[ entity.getIndex() ] += (Real) 1.0;
         };

         ParallelFor3D< Device >::exec( ( Index ) 0,
         ParallelFor3D< Device, AsynchronousMode >::exec(
            ( Index ) 0,
            ( Index ) 0,
            ( Index ) 0,
            this->size,
@@ -154,7 +156,8 @@ class GridTraversersBenchmark< 3, Device, Real, Index >
            ( *_u )( entity ) += (Real) 1.0;
         };

         ParallelFor3D< Device >::exec( ( Index ) 0,
         ParallelFor3D< Device, AsynchronousMode >::exec(
            ( Index ) 0,
            ( Index ) 0,
            ( Index ) 0,
            this->size,