[QST]From index into a coordinate (or coordniate into a index), it has two different implementations, how should one distinguish and understand the scenarios for their use?
Implementations: 1)Function with stride: https://github.com/NVIDIA/cutlass/blob/main/include/cute/stride.hpp#L102 2)Function without stride: https://github.com/NVIDIA/cutlass/blob/main/include/cute/stride.hpp#L152
function with stride is easy to understand, but without stride, why need to compute like: i = c0 + s0 * (c1 + s1 * (c2 + s2 * ...))
How to use the last function, and also for idx2cor.
@Junkai-Wu
To calculate from a coord to an index, you need a shape and a stride. If the stride is explicitly provided, the function calculates the index using the given stride. If the stride is not provided by user, the function assume that the shape passed in the function is packed, which means shape (s0, s1, s2, s3) has stride (1, s0, s0 * s1, s1 * s2).
This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.
This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.