 #endif
 }
 
-#ifndef tCudaRawVerbose
-#define tCudaRawVerbose(condition, ...) \
-    if (condition) { \
-        ::sprintf(stdout, __VA_ARGS__)\
-    }
+#ifndef tbCudaRawVerbose
+#define tbCudaRawVerbose(condition, ...) \
+    if (condition) { printf(__VA_ARGS__); }
 #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.

tbBOOL tbCudaAdd(T const * v1, T const * v2, T * result, unsigned size, StreamType stream)
{
    int grid_size(0), block_size(0);
    if (tbCudaGetMaxPotentialBlockSize(&grid_size, &block_size, tbCudaAddKernel<T>, size) == false) {
        return TB_FALSE;
    }
    assert(grid_size > 0);
    assert(block_size > 0);

    tbCudaAddKernel<T><<<grid_size, block_size, 0, stream>>>(v1, v2, result, size);
    return TB_TRUE;
}

