Commit 2ba8a2a3953a92b5eba50fc45a4ec5d52c2e1239
1 parent
b99b23d0
fixed swapping of numBlocks and threadsPerBlock
caused some oversized formatting issues
Showing
1 changed file
with
2 additions
and
2 deletions
openbr/plugins/cuda/cudacvtfloat.cu
| @@ -41,12 +41,12 @@ namespace br { namespace cuda { namespace cvtfloat { | @@ -41,12 +41,12 @@ namespace br { namespace cuda { namespace cvtfloat { | ||
| 41 | CUDA_SAFE_MALLOC(dst, rows*cols*sizeof(float), &err); | 41 | CUDA_SAFE_MALLOC(dst, rows*cols*sizeof(float), &err); |
| 42 | 42 | ||
| 43 | dim3 threadsPerBlock(8, 8); | 43 | dim3 threadsPerBlock(8, 8); |
| 44 | - dim3 blocks( | 44 | + dim3 numBlocks( |
| 45 | cols / threadsPerBlock.x + 1, | 45 | cols / threadsPerBlock.x + 1, |
| 46 | rows / threadsPerBlock.y + 1 | 46 | rows / threadsPerBlock.y + 1 |
| 47 | ); | 47 | ); |
| 48 | 48 | ||
| 49 | - kernel<<<threadsPerBlock, blocks>>>((const unsigned char*)src, (float*)(*dst), rows, cols); | 49 | + kernel<<<numBlocks, threadsPerBlock>>>((const unsigned char*)src, (float*)(*dst), rows, cols); |
| 50 | CUDA_KERNEL_ERR_CHK(&err); | 50 | CUDA_KERNEL_ERR_CHK(&err); |
| 51 | 51 | ||
| 52 | // free the src memory since it is now in a newly allocated dst | 52 | // free the src memory since it is now in a newly allocated dst |