Open main menu

CDOT Wiki β

Changes

Sirius

21 bytes removed, 09:39, 9 April 2018
Vehicle detection and tracking (Rosario A. Cali)
<syntaxhighlight lang="cpp>
int iDevice;
cudaDeviceProp prop; cudaGetDevice(&iDevice); cudaGetDeviceProperties(&prop, iDevice); int resident_threads = prop.maxThreadsPerMultiProcessor; int resident_blocks = 8; if (prop.major >= 3 && prop.major < 5) { resident_blocks = 16;
}
else if (prop.major >= 5 && prop.major <= 6) { resident_blocks = 32; }//determine threads/block
dim3 blockDims(resident_threads/resident_blocks,1,1);
//Calculate grid size to cover the whole image dim3 gridDims(pixels/blockDims.x);
</syntaxhighlight>
81
edits