vortex_compute/take/buffer.rs
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4use vortex_buffer::Buffer;
5use vortex_dtype::UnsignedPType;
6
7use crate::take::Take;
8
9impl<T: Copy, I: UnsignedPType> Take<[I]> for &Buffer<T> {
10 type Output = Buffer<T>;
11
12 fn take(self, indices: &[I]) -> Buffer<T> {
13 self.as_slice().take(indices)
14 }
15}