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

Refactoring of Grid 1D traverser.

parent cb834c84
No related branches found
No related tags found
1 merge request!20Traversers optimizations
......@@ -199,7 +199,31 @@ processEntities(
}
else
{
dim3 cudaBlockSize( 256 );
dim3 blockSize( 256 ), blocksCount, gridsCount;
Devices::Cuda::setupThreads(
blockSize,
blocksCount,
gridsCount,
end.x() - begin.x() + 1 );
dim3 gridIdx;
for( gridIdx.x = 0; gridIdx.x < gridsCount.x; gridIdx.x++ )
{
dim3 gridSize;
Devices::Cuda::setupGrid(
blocksCount,
gridsCount,
gridIdx,
gridSize );
GridTraverser1D< Real, Index, GridEntity, UserData, EntitiesProcessor >
<<< blocksCount, blockSize, 0, s >>>
( &gridPointer.template getData< Devices::Cuda >(),
userData,
begin,
end,
gridIdx.x );
}
/*dim3 cudaBlockSize( 256 );
dim3 cudaBlocks;
cudaBlocks.x = Devices::Cuda::getNumberOfBlocks( end.x() - begin.x() + 1, cudaBlockSize.x );
const IndexType cudaXGrids = Devices::Cuda::getNumberOfGrids( cudaBlocks.x );
......
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