Restructing matrix

Hello, I am novice in cuda programming
I wonder if there is a way to change, like 12x12x3 matrix
to 4×36×3 matrix not moving the data to cpu.