Here’s the problem:
I wanna create a 2D matrix in the device memory to avoid the frequent memory exchange, However I didn’t find a proper way to do so. The reason I need a 2D structure is because there are something that 1D structure can not provide, for example:
if M is a 2D matrix, then I can use M[i] directly as a vector; this can’t happen with a 1D matrix, it WILL cost additional memory copy.
I also can’t use shared memory because it’s too small.
So, is there anyway?