MLX
 
Loading...
Searching...
No Matches
copy.h
Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
2
3#pragma once
4
5#include <optional>
6
7#include "mlx/array.h"
10
11namespace mlx::core {
12
13void copy(const array& src, array& dst, CopyType ctype, Stream stream);
14void copy_inplace(const array& src, array& dst, CopyType ctype, Stream stream);
15
17 const array& src,
18 array& dst,
19 const Shape& data_shape,
20 const Strides& i_strides,
21 const Strides& o_strides,
22 int64_t i_offset,
23 int64_t o_offset,
24 CopyType ctype,
25 Stream stream,
26 const std::optional<array>& dynamic_i_offset = std::nullopt,
27 const std::optional<array>& dynamic_o_offset = std::nullopt);
28
29} // namespace mlx::core
Definition array.h:24
Definition allocator.h:7
void copy(const array &src, array &dst, CopyType ctype, Stream stream)
std::vector< ShapeElem > Shape
Definition array.h:21
std::vector< int64_t > Strides
Definition array.h:22
void copy_inplace(const array &src, array &dst, CopyType ctype, Stream stream)
CopyType
Definition copy.h:9
Definition stream.h:9