/* * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #ifndef OPENCV_FASTCV_HAL_UTILS_HPP_INCLUDED #define OPENCV_FASTCV_HAL_UTILS_HPP_INCLUDED #include "fastcv.h" #include #define INITIALIZATION_CHECK \ { \ if (!FastCvContext::getContext().isInitialized) \ { \ return CV_HAL_ERROR_UNKNOWN; \ } \ } #define CV_HAL_RETURN(status, func) \ { \ if( status == FASTCV_SUCCESS ) \ { \ CV_LOG_DEBUG(NULL, "FastCV HAL for "<<#func<<" run successfully!"); \ return CV_HAL_ERROR_OK; \ } \ else if(status == FASTCV_EBADPARAM || status == FASTCV_EUNALIGNPARAM || \ status == FASTCV_EUNSUPPORTED || status == FASTCV_EHWQDSP || \ status == FASTCV_EHWGPU) \ { \ CV_LOG_DEBUG(NULL, "FastCV status:"<