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

Avoided getting device properties CUDA threads setup - it is extremely slow.

parent 25ddaaba
No related branches found
No related tags found
No related merge requests found
......@@ -31,10 +31,11 @@ void Cuda::setupThreads( const dim3& blockSize,
* TODO: Fix the following:
* I do not known how to get max grid size in kernels :(
*
/* Also, this is very slow.
int currentDevice( 0 );
cudaGetDevice( currentDevice );
cudaDeviceProp properties;
cudaGetDeviceProperties( &properties, currentDevice );
cudaGetDeviceProperties( &properties, currentDevice );*/
gridsCount.x = blocksCount.x / properties.maxGridSize[ 0 ] + ( blocksCount.x % properties.maxGridSize[ 0 ] != 0 );
gridsCount.y = blocksCount.y / properties.maxGridSize[ 1 ] + ( blocksCount.y % properties.maxGridSize[ 1 ] != 0 );
gridsCount.z = blocksCount.z / properties.maxGridSize[ 2 ] + ( blocksCount.z % properties.maxGridSize[ 2 ] != 0 );
......@@ -49,10 +50,11 @@ void Cuda::setupGrid( const dim3& blocksCount,
const dim3& gridIdx,
dim3& gridSize )
{
/* TODO: this is extremely slow!!!!
int currentDevice( 0 );
cudaGetDevice( &currentDevice );
cudaDeviceProp properties;
cudaGetDeviceProperties( &properties, currentDevice );
cudaGetDeviceProperties( &properties, currentDevice );*/
/****
* TODO: fix the following
......
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