Merge pull request #1780 from ilya-lavrenov:ocl_m_pi

This commit is contained in:
Roman Donchenko 2013-11-11 17:00:31 +04:00 committed by OpenCV Buildbot
commit e4dee5b372
2 changed files with 14 additions and 10 deletions

View File

@ -45,16 +45,16 @@
// //
#if defined (DOUBLE_SUPPORT) #if defined (DOUBLE_SUPPORT)
#ifdef cl_khr_fp64 #ifdef cl_amd_fp64
#pragma OPENCL EXTENSION cl_khr_fp64:enable
#elif defined (cl_amd_fp64)
#pragma OPENCL EXTENSION cl_amd_fp64:enable #pragma OPENCL EXTENSION cl_amd_fp64:enable
#elif defined (cl_khr_fp64)
#pragma OPENCL EXTENSION cl_khr_fp64:enable
#endif #endif
#define CV_PI 3.1415926535897932384626433832795 #define CV_PI M_PI
#define CV_2PI 2*CV_PI #define CV_2PI (2 * CV_PI)
#else #else
#define CV_PI 3.1415926535897932384626433832795f #define CV_PI M_PI_F
#define CV_2PI 2*CV_PI #define CV_2PI (2 * CV_PI)
#endif #endif
/**************************************phase inradians**************************************/ /**************************************phase inradians**************************************/

View File

@ -44,10 +44,14 @@
//M*/ //M*/
#ifdef DOUBLE_SUPPORT #ifdef DOUBLE_SUPPORT
#pragma OPENCL EXTENSION cl_khr_fp64:enable #ifdef cl_amd_fp64
#define CV_PI 3.1415926535897932384626433832795 #pragma OPENCL EXTENSION cl_amd_fp64:enable
#elif defined (cl_khr_fp64)
#pragma OPENCL EXTENSION cl_khr_fp64:enable
#endif
#define CV_PI M_PI
#else #else
#define CV_PI 3.1415926535897932384626433832795f #define CV_PI M_PI_F
#endif #endif
///////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////