Tensor stride calculation

I have a newbie question about tensor stride calculation. I am having problem using the stride values returned by vxMapTensorPatch().

I see that in ownInitTensor() the stride values are calculated as

         tensor->stride[i] = tensor->stride[i - 1] * tensor->dimensions[i - 1];

but in vxMapTensorPatch() the stride values are calculated as

         stride[i] = stride[i - 1] * (view_end[i] - view_start[i]);               

this causes the stride values returned by vxMapTensorPatch() to be different from that in tensor->stride[]. Why is the calculation in vxMapTensorPatch() not as follows

         stride[i] = stride[i - 1] * (view_end[i-1] - view_start[i-1]);               

Shouldn’t the stride calculation be the same in both places?

thx

dvorotnev (Dmity Vorotnev) · GitHub also spotted this issue and fixed it. see link below.

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