MLX
 
Loading...
Searching...
No Matches
slicing.h
Go to the documentation of this file.
1// Copyright © 2024 Apple Inc.
2
3#pragma once
4
5#include "mlx/array.h"
6
7namespace mlx::core {
8
9std::tuple<int64_t, Strides> prepare_slice(
10 const array& in,
11 const Shape& start_indices,
12 const Shape& strides);
13
15 const array& in,
16 const Strides& out_strides,
17 size_t data_offset,
18 size_t data_size,
19 array& out);
20
21} // namespace mlx::core
Definition array.h:24
Definition allocator.h:7
void shared_buffer_slice(const array &in, const Strides &out_strides, size_t data_offset, size_t data_size, array &out)
std::vector< ShapeElem > Shape
Definition array.h:21
std::vector< int64_t > Strides
Definition array.h:22
std::tuple< int64_t, Strides > prepare_slice(const array &in, const Shape &start_indices, const Shape &strides)