Check if an internal tensor is valid * * @param[in] tensor Internal tensor to check * * @return A status code */
| 126 | * @return A status code |
| 127 | */ |
| 128 | inline StatusCode validate_internal_tensor(const ITensorV2 *tensor) |
| 129 | { |
| 130 | if (tensor == nullptr || !tensor->is_valid()) |
| 131 | { |
| 132 | ARM_COMPUTE_LOG_ERROR_ACL("[ITensorV2]: Invalid tensor object"); |
| 133 | return StatusCode::InvalidArgument; |
| 134 | } |
| 135 | return StatusCode::Success; |
| 136 | } |
| 137 | } // namespace detail |
| 138 | } // namespace arm_compute |
| 139 | #endif /* SRC_COMMON_ITENSOR_H_ */ |
no test coverage detected