24.02
|
Go to the documentation of this file.
36 namespace experimental
49 auto k = std::make_unique<NEStridedSliceKernel>();
50 k->configure(
input, output, starts, ends,
BiStrides(), 0, slice_end_mask, 0);
51 _kernel = std::move(k);
75 ITensor *
dst{
nullptr};
76 std::unique_ptr<experimental::NESlice> op{
nullptr};
98 _impl->op = std::make_unique<experimental::NESlice>();
99 _impl->op->configure(
input->info(), output->
info(), starts, ends);
107 _impl->op->run(
pack);
SimpleTensor< float > src
Coordinates BiStrides
Bidirectional strides.
void run() override
Run the kernels contained in the function.
Basic function to perform tensor slicing.
NESlice & operator=(const NESlice &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const Coordinates &starts, const Coordinates &ends, const BiStrides &strides, int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
Static function to check if given info will lead to a valid configuration of NEStridedSliceKernel.
Interface for CPU tensor.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.
void configure(const ITensorInfo *input, ITensorInfo *output, const Coordinates &starts, const Coordinates &ends)
Configure kernel.
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const Coordinates &starts, const Coordinates &ends)
Static function to check if given info will lead to a valid configuration of NESlice.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const Coordinates &starts, const Coordinates &ends)
Static function to check if given info will lead to a valid configuration of NESlice.
std::array< T, num_max_dimensions >::const_iterator cbegin() const
Returns a read-only (constant) iterator that points to the first element in the dimension array.
Copyright (c) 2017-2024 Arm Limited.
NESlice()
Default Constructor.
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
Store the tensor's metadata.
~NESlice()
Default Destructor.
#define ARM_COMPUTE_LOG_PARAMS(...)
unsigned int num_dimensions() const
Returns the effective dimensionality of the tensor.
void configure(const ITensor *input, ITensor *output, const Coordinates &starts, const Coordinates &ends)
Configure kernel.