Cutensor image cutouts?

I have a 2D image described as a cutensor and want to cut out a (smaller) subimage. Can it be done by creating a new tensor descriptor with stride = the original image, while having an extent of the subimage, and then by moving the pointer to the array storing the original image? I need to use multiple subimages from an original image, so I could simply declare a number of such tensors, without having to copy the data.

Is there any problem with aliasing the storage of multiple tensor descriptors where they are only used as input to subsequent calculations?

Yes, you can do that, and no, there is no problem with overlap as long as they are all just read.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.