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

Method validate

src/runtime/CL/functions/CLSlice.cpp:54–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54Status CLSlice::validate(const ITensorInfo *input,
55 const ITensorInfo *output,
56 const Coordinates &starts,
57 const Coordinates &ends)
58{
59 ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input);
60 ARM_COMPUTE_RETURN_ERROR_ON_DYNAMIC_SHAPE(input, output);
61
62 // Check start dimensions for being non-negative
63 ARM_COMPUTE_RETURN_ERROR_ON(
64 std::any_of(starts.cbegin(), starts.cbegin() + starts.num_dimensions(), [](int i) { return i < 0; }));
65
66 // Get absolute end coordinates
67 const int32_t slice_end_mask = arm_compute::helpers::tensor_transform::construct_slice_end_mask(ends);
68
69 return CLStridedSliceKernel::validate(input, output, starts, ends, BiStrides(), 0, slice_end_mask, 0);
70}
71} // namespace experimental
72
73struct CLSlice::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