Check cuda device properties to determine optimum number of threads/blocks to use.