Mojo function
slice_as_view
slice_as_view[dtype: DType, start_type: DType, end_type: DType, step_type: DType](tensor: LayoutTensor[dtype, layout, origin, address_space=address_space, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], starts: LayoutTensor[start_type, layout, origin, address_space=address_space, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], ends: LayoutTensor[end_type, layout, origin, address_space=address_space, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], steps: LayoutTensor[step_type, layout, origin, address_space=address_space, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment]) -> LayoutTensor[dtype, Layout.row_major[layout.rank()](), origin, address_space=address_space]
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!