single dynamic variable declaration for CUDA and OpenCL