| 38 | namespace |
| 39 | { |
| 40 | Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, const Multiples &multiples) |
| 41 | { |
| 42 | ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output); |
| 43 | ARM_COMPUTE_RETURN_ERROR_ON_SIZE_UNSUPPORTED(input); |
| 44 | ARM_COMPUTE_RETURN_ERROR_ON(input->data_type() == DataType::UNKNOWN); |
| 45 | ARM_COMPUTE_RETURN_ERROR_ON(multiples.size() > 4); |
| 46 | ARM_COMPUTE_RETURN_ERROR_ON(multiples.empty()); |
| 47 | ARM_COMPUTE_RETURN_ERROR_ON(std::any_of(multiples.begin(), multiples.end(), [](uint32_t e) { return e == 0; })); |
| 48 | |
| 49 | const TensorShape output_shape = misc::shape_calculator::compute_tiled_shape(input->tensor_shape(), multiples); |
| 50 | |
| 51 | // Validate output if initialized |
| 52 | if (output->total_size() != 0) |
| 53 | { |
| 54 | ARM_COMPUTE_RETURN_ERROR_ON_SIZE_UNSUPPORTED(output); |
| 55 | ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(output_shape, output->tensor_shape()); |
| 56 | ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); |
| 57 | } |
| 58 | else |
| 59 | { |
| 60 | const TensorInfo output_info(output_shape, input->num_channels(), input->data_type()); |
| 61 | ARM_COMPUTE_RETURN_ERROR_ON_SIZE_UNSUPPORTED(&output_info); |
| 62 | } |
| 63 | |
| 64 | return Status{}; |
| 65 | } |
| 66 | } // namespace |
| 67 | |
| 68 | CLTileKernel::CLTileKernel() : _input(nullptr), _output(nullptr) |
no test coverage detected