2024-06-04 09:24:26 -07:00
|
|
|
// Copyright © 2024 Apple Inc.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "mlx/array.h"
|
|
|
|
|
|
|
|
|
|
namespace mlx::core {
|
|
|
|
|
|
2024-12-09 11:09:02 -08:00
|
|
|
std::tuple<int64_t, Strides> prepare_slice(
|
2024-06-04 09:24:26 -07:00
|
|
|
const array& in,
|
2024-12-09 11:09:02 -08:00
|
|
|
const Shape& start_indices,
|
|
|
|
|
const Shape& strides);
|
2024-06-04 09:24:26 -07:00
|
|
|
|
2025-02-05 19:50:08 -08:00
|
|
|
void slice(
|
2024-06-04 09:24:26 -07:00
|
|
|
const array& in,
|
2025-02-05 19:50:08 -08:00
|
|
|
array& out,
|
|
|
|
|
const Shape& start_indices,
|
|
|
|
|
const Shape& strides);
|
2024-06-04 09:24:26 -07:00
|
|
|
|
|
|
|
|
} // namespace mlx::core
|