diff --git a/src/TNL/Devices/Cuda.h b/src/TNL/Devices/Cuda.h
index 7831014155e9a730c1be101c47cb2602cd8d3179..80108bf53074429493d6a7cb85441b3561360db7 100644
--- a/src/TNL/Devices/Cuda.h
+++ b/src/TNL/Devices/Cuda.h
@@ -75,10 +75,10 @@ class Cuda
 
    /****
     * This functions helps to count number of CUDA grids depending on the 
-    * number of the CUDA blocks and maximum grid size.
+    * number of the CUDA threads and maximum grid size.
     * It is obsolete and it will be replaced by setupThreads.
     */
-   static inline int getNumberOfGrids( const int blocks,
+   static inline int getNumberOfGrids( const int threads,
                                        const int gridSize = getMaxGridSize() );
    
 #ifdef HAVE_CUDA   
diff --git a/src/TNL/Devices/Cuda_impl.h b/src/TNL/Devices/Cuda_impl.h
index 234f45b720fcfa9502b6f4c5c14debfb48ecca64..a40375c39c85bcfb2e99decb90bdfe7f56e20ba0 100644
--- a/src/TNL/Devices/Cuda_impl.h
+++ b/src/TNL/Devices/Cuda_impl.h
@@ -111,10 +111,10 @@ inline int Cuda::getNumberOfBlocks( const int threads,
    return roundUpDivision( threads, blockSize );
 }
 
-inline int Cuda::getNumberOfGrids( const int blocks,
+inline int Cuda::getNumberOfGrids( const int threads,
                                    const int gridSize )
 {
-   return roundUpDivision( blocks, gridSize );
+   return roundUpDivision( threads, gridSize );
 }
 
 #ifdef HAVE_CUDA