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

Function validate_arguments

src/gpu/cl/kernels/ClCopyKernel.cpp:50–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48namespace
49{
50Status validate_arguments(const ITensorInfo *src, const ITensorInfo *dst, Window *dst_window = nullptr)
51{
52 ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(src, dst);
53 ARM_COMPUTE_RETURN_ERROR_ON_SIZE_UNSUPPORTED(src);
54
55 // Validate dst if initialized
56 if (dst->total_size() != 0)
57 {
58 ARM_COMPUTE_RETURN_ERROR_ON_SIZE_UNSUPPORTED(dst);
59 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(src, dst);
60 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_QUANTIZATION_INFO(src, dst);
61 if (dst_window == nullptr)
62 {
63 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(src->tensor_shape(), dst->tensor_shape());
64 }
65 else
66 {
67 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(src->tensor_shape(), dst_window->shape());
68 }
69 }
70 else
71 {
72 // No configured output. Since `dst` is expected to match (or be smaller
73 // than) `src`, there's nothing extra to check in this case.
74 }
75
76 return Status{};
77}
78
79} // namespace
80

Callers 2

configureMethod · 0.70
validateMethod · 0.70

Calls 2

total_sizeMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected