cuda code for allocating and working with 2d array of cv mats