| 1075 | template <class Tensor, class LShape, class LStride, class Index, |
| 1076 | __CUTE_REQUIRES(is_tensor<remove_cvref_t<Tensor>>::value)> |
| 1077 | CUTE_HOST_DEVICE |
| 1078 | auto |
| 1079 | local_partition(Tensor && tensor, |
| 1080 | Layout<LShape,LStride> const& tile, // coord -> index |
| 1081 | Index const& index) // index to slice for |
| 1082 | { |
| 1083 | static_assert(is_integral<Index>::value); |
| 1084 | return outer_partition(static_cast<Tensor&&>(tensor), |
| 1085 | product_each(shape(tile)), |
| 1086 | tile.get_flat_coord(index)); |
| 1087 | } |
| 1088 | |
| 1089 | // Same as above, but with a projection parameter to strip out unwanted tiling modes for convenience |
| 1090 | // when using projections of the same tiler. |
no test coverage detected