| 42 | } |
| 43 | |
| 44 | Status ClScatter::validate(const ITensorInfo *src, |
| 45 | const ITensorInfo *updates, |
| 46 | const ITensorInfo *indices, |
| 47 | const ITensorInfo *dst, |
| 48 | const ScatterInfo &info) |
| 49 | { |
| 50 | ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(updates, indices, dst); |
| 51 | if (src != nullptr) |
| 52 | { |
| 53 | // Check dst/src are same shape and datatype. |
| 54 | ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(src->tensor_shape(), dst->tensor_shape()); |
| 55 | ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(src, updates, dst); |
| 56 | ARM_COMPUTE_RETURN_ON_ERROR(kernels::ClCopyKernel::validate(src, dst)); // Validate Copy kernel |
| 57 | } |
| 58 | if (src != dst) |
| 59 | { |
| 60 | ARM_COMPUTE_RETURN_ON_ERROR(kernels::ClFillKernel::validate(dst, PixelValue(0.0f))); // Validate Fill kernel. |
| 61 | } |
| 62 | |
| 63 | return kernels::ClScatterKernel::validate(updates, indices, dst, info); |
| 64 | } |
| 65 | |
| 66 | void ClScatter::configure(const CLCompileContext &compile_context, |
| 67 | const ITensorInfo *src, |
nothing calls this directly
no test coverage detected