add kernel guard macro 

When we use CUDA, we could rewrite codes like:

int i = blockIdx.x * blockDim.x + threadIdx.x;
if (i < n) {
   // do something to array[i] 
}

to:

CUDA_KERNEL_GUARD(i, n) {
    // do something to array[i]
}

If we disable CUDA, and reuse the codes, we could just define CUDA_KERNEL_GUARD to 

for (int i = 0; i < n; ++i)

Then the CUDA codes could easily transfer to CPU.