MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / validate

Method validate

src/runtime/NEON/functions/NESlice.cpp:55–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55Status 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
75struct NESlice::Impl

Callers

nothing calls this directly

Calls 4

construct_slice_end_maskFunction · 0.85
validateFunction · 0.50
cbeginMethod · 0.45
num_dimensionsMethod · 0.45

Tested by

no test coverage detected