Try to use cub for easy texture memory access.