Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of gr-peach-opencv-project-sd-card by
ocl_defs.hpp
00001 // This file is part of OpenCV project. 00002 // It is subject to the license terms in the LICENSE file found in the top-level directory 00003 // of this distribution and at http://opencv.org/license.html. 00004 00005 // Copyright (C) 2014, Advanced Micro Devices, Inc., all rights reserved. 00006 // Third party copyrights are property of their respective owners. 00007 00008 #include "opencv2/core/utility.hpp" 00009 //#define CV_OPENCL_RUN_ASSERT 00010 00011 #ifdef HAVE_OPENCL 00012 00013 #ifdef CV_OPENCL_RUN_VERBOSE 00014 #define CV_OCL_RUN_(condition, func, ...) \ 00015 { \ 00016 if (cv::ocl::useOpenCL() && (condition) && func) \ 00017 { \ 00018 printf("%s: OpenCL implementation is running\n", CV_Func); \ 00019 fflush(stdout); \ 00020 CV_IMPL_ADD(CV_IMPL_OCL); \ 00021 return __VA_ARGS__; \ 00022 } \ 00023 else \ 00024 { \ 00025 printf("%s: Plain implementation is running\n", CV_Func); \ 00026 fflush(stdout); \ 00027 } \ 00028 } 00029 #elif defined CV_OPENCL_RUN_ASSERT 00030 #define CV_OCL_RUN_(condition, func, ...) \ 00031 { \ 00032 if (cv::ocl::useOpenCL() && (condition)) \ 00033 { \ 00034 if(func) \ 00035 { \ 00036 CV_IMPL_ADD(CV_IMPL_OCL); \ 00037 } \ 00038 else \ 00039 { \ 00040 CV_Error(cv::Error::StsAssert, #func); \ 00041 } \ 00042 return __VA_ARGS__; \ 00043 } \ 00044 } 00045 #else 00046 #define CV_OCL_RUN_(condition, func, ...) \ 00047 if (cv::ocl::useOpenCL() && (condition) && func) \ 00048 { \ 00049 CV_IMPL_ADD(CV_IMPL_OCL); \ 00050 return __VA_ARGS__; \ 00051 } 00052 #endif 00053 00054 #else 00055 #define CV_OCL_RUN_(condition, func, ...) 00056 #endif 00057 00058 #define CV_OCL_RUN(condition, func) CV_OCL_RUN_(condition, func) 00059
Generated on Tue Jul 12 2022 14:47:30 by
1.7.2
