| 53 | } |
| 54 | |
| 55 | Status NESlice::validate(const ITensorInfo *input, |
| 56 | const ITensorInfo *output, |
| 57 | const Coordinates &starts, |
| 58 | const Coordinates &ends) |
| 59 | { |
| 60 | ARM_COMPUTE_TRACE_EVENT(ARM_COMPUTE_PROF_CAT_CPU, ARM_COMPUTE_PROF_LVL_CPU, "NESlice::validate"); |
| 61 | ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input); |
| 62 | ARM_COMPUTE_RETURN_ERROR_ON_DYNAMIC_SHAPE(input, output); |
| 63 | |
| 64 | // Check start dimensions for being non-negative |
| 65 | ARM_COMPUTE_RETURN_ERROR_ON( |
| 66 | std::any_of(starts.cbegin(), starts.cbegin() + starts.num_dimensions(), [](int i) { return i < 0; })); |
| 67 | |
| 68 | // Get absolute end coordinates |
| 69 | const int32_t slice_end_mask = arm_compute::helpers::tensor_transform::construct_slice_end_mask(ends); |
| 70 | |
| 71 | return NEStridedSliceKernel::validate(input, output, starts, ends, BiStrides(), 0, slice_end_mask, 0); |
| 72 | } |
| 73 | } // namespace experimental |
| 74 | |
| 75 | struct NESlice::Impl |
nothing calls this directly
no test coverage detected