Check if an internal context is valid * * @param[in] ctx Internal context to check * * @return A status code */
| 138 | * @return A status code |
| 139 | */ |
| 140 | inline StatusCode validate_internal_context(const IContext *ctx) |
| 141 | { |
| 142 | if (ctx == nullptr || !ctx->is_valid()) |
| 143 | { |
| 144 | ARM_COMPUTE_LOG_ERROR_ACL("Invalid context object"); |
| 145 | return StatusCode::InvalidArgument; |
| 146 | } |
| 147 | return StatusCode::Success; |
| 148 | } |
| 149 | } // namespace detail |
| 150 | } // namespace arm_compute |
| 151 | #endif /* SRC_COMMON_ICONTEXT_H */ |
no test coverage detected