 #define TB_CUDA_DEVICE  __device__
 #endif
 
+#ifndef TB_CUDA_HOST
+#define TB_CUDA_HOST  __host__
+#endif
+
 #ifndef TB_CUDA_GLOBAL
 #define TB_CUDA_GLOBAL  __global__
 #endif

// ---------------

template <typename T>
bool tbCudaGetMaxPotentialBlockSize(int * result_grid_size, int * result_block_size, T func, std::size array_count,
                                    std::size_t dynamic_shared_mem_size = 0, int block_size_limit = 0)
{
    int block_size    = 0; // The launch configurator returned block size.

           + threadIdx.x /*LOCAL_THREAD_OFFSET*/;
}

//static TB_CUDA_INLINE TB_CUDA_DEVICE int __global_index_1g_2b__()
//{
//    return (blockIdx.x * (blockDim.x * blockDim.y)) /*GLOBAL_BLOCK_OFFSET*/
//           + (threadIdx.y * blockDim.x) /*LOCAL_THREAD_Y_OFFSET*/
//           + threadIdx.x /*LOCAL_THREAD_X_OFFSET*/;
//}
//
//static TB_CUDA_INLINE TB_CUDA_DEVICE int __global_index_1g_3b__()
//{
//    return (blockIdx.x * (blockDim.x * blockDim.y * blockDim.z)) /*GLOBAL_BLOCK_OFFSET*/
//           + (threadIdx.z * (blockDim.y * blockDim.x)) /*LOCAL_THREAD_X_OFFSET*/
//           + (threadIdx.y * blockDim.x) /*LOCAL_THREAD_Y_OFFSET*/
//           + threadIdx.x /*LOCAL_THREAD_X_OFFSET*/;
//}

template <typename T>
TB_CUDA_GLOBAL void tbCudaAddKernel(T const * v1, T const * v2, T * result, unsigned size)
