ippwrapper.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * NICE-Core - efficient algebra and computer vision methods
  3. * - libimage - An image library
  4. * See file License for license information.
  5. */
  6. #ifndef _LIMUNBASICVECTOR_IPPWRAPPER_H
  7. #define _LIMUNBASICVECTOR_IPPWRAPPER_H
  8. #ifdef NICE_USELIB_IPP
  9. #include <ipps.h>
  10. #include <ippcv.h>
  11. #if NICE_USELIB_IPP >= 4
  12. #include <ippcore.h>
  13. #include <ipps.h>
  14. #include <ippm.h>
  15. #else
  16. #pragma message NICE_WARNING("Not fully supported with IPP < 4")
  17. #endif
  18. #else // NICE_USELIB_IPP
  19. #ifndef IPPWRAPPER_DEFS
  20. #define IPPWRAPPER_DEFS
  21. typedef unsigned char Ipp8u;
  22. typedef signed short Ipp16s;
  23. typedef unsigned short Ipp16u;
  24. typedef signed int Ipp32s;
  25. typedef unsigned int Ipp32u;
  26. typedef float Ipp32f;
  27. typedef double Ipp64f;
  28. typedef enum {
  29. ippStsSingularErr = -195,
  30. ippStsDataTypeErr = -12,
  31. ippStsOutOfRangeErr = -11,
  32. ippStsDivByZeroErr = -10,
  33. ippStsMemAllocErr = -9,
  34. ippStsNullPtrErr = -8,
  35. ippStsRangeErr = -7,
  36. ippStsSizeErr = -6,
  37. ippStsBadArgErr = -5,
  38. ippStsNoMemErr = -4,
  39. ippStsErr = -2,
  40. ippStsNoErr = 0,
  41. ippStsDivByZero = 6
  42. } IppStatus;
  43. #define ippStsOk ippStsNoErr
  44. typedef enum {
  45. ippCmpLess,
  46. ippCmpLessEq,
  47. ippCmpEq,
  48. ippCmpGreaterEq,
  49. ippCmpGreater
  50. } IppCmpOp;
  51. typedef enum {
  52. ippAlgHintNone,
  53. ippAlgHintFast,
  54. ippAlgHintAccurate
  55. } IppHintAlgorithm;
  56. typedef enum {
  57. ippRndZero,
  58. ippRndNear
  59. } IppRoundMode;
  60. #endif // IPPWRAPPER_DEFS
  61. typedef char Ipp8s;
  62. typedef long long Ipp64s;
  63. typedef unsigned long long Ipp64u;
  64. struct RandUniState_8u;
  65. struct RandUniState_16s;
  66. struct RandUniState_32f;
  67. struct RandGaussState_8u;
  68. struct RandGaussState_16s;
  69. struct RandGaussState_32f;
  70. typedef struct RandGaussState_8u IppsRandGaussState_8u;
  71. typedef struct RandGaussState_16s IppsRandGaussState_16s;
  72. typedef struct RandGaussState_32f IppsRandGaussState_32f;
  73. typedef struct RandUniState_8u IppsRandUniState_8u;
  74. typedef struct RandUniState_16s IppsRandUniState_16s;
  75. typedef struct RandUniState_32f IppsRandUniState_32f;
  76. typedef struct {
  77. Ipp8s re;
  78. Ipp8s im;
  79. } Ipp8sc;
  80. typedef struct {
  81. Ipp16s re;
  82. Ipp16s im;
  83. } Ipp16sc;
  84. typedef struct {
  85. Ipp32s re;
  86. Ipp32s im;
  87. } Ipp32sc;
  88. typedef struct {
  89. Ipp32f re;
  90. Ipp32f im;
  91. } Ipp32fc;
  92. typedef struct {
  93. Ipp64s re;
  94. Ipp64s im;
  95. } Ipp64sc;
  96. typedef struct {
  97. Ipp64f re;
  98. Ipp64f im;
  99. } Ipp64fc;
  100. const char *ippGetStatusString(IppStatus status);
  101. #endif // !NICE_USELIB_IPP
  102. //#ifdef __GNUC__
  103. #include <core/vector/ippwrapper.tcc>
  104. //#endif
  105. #endif