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<bool, int64_t, std::vector<int64_t>> prepare_slice(
10 const array& in,
11 std::vector<int>& start_indices,
12 std::vector<int>& strides);
13
15 const array& in,
16 const std::vector<size_t>& out_strides,
17 size_t data_offset,
18 array& out);
19
20} // namespace mlx::core
Definition array.h:20
Definition allocator.h:7
std::tuple< bool, int64_t, std::vector< int64_t > > prepare_slice(const array &in, std::vector< int > &start_indices, std::vector< int > &strides)
void shared_buffer_slice(const array &in, const std::vector< size_t > &out_strides, size_t data_offset, array &out)