ippbase.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. /*
  2. // Copyright 1999 2016 Intel Corporation All Rights Reserved.
  3. //
  4. // The source code, information and material ("Material") contained herein is
  5. // owned by Intel Corporation or its suppliers or licensors, and title
  6. // to such Material remains with Intel Corporation or its suppliers or
  7. // licensors. The Material contains proprietary information of Intel
  8. // or its suppliers and licensors. The Material is protected by worldwide
  9. // copyright laws and treaty provisions. No part of the Material may be used,
  10. // copied, reproduced, modified, published, uploaded, posted, transmitted,
  11. // distributed or disclosed in any way without Intel's prior express written
  12. // permission. No license under any patent, copyright or other intellectual
  13. // property rights in the Material is granted to or conferred upon you,
  14. // either expressly, by implication, inducement, estoppel or otherwise.
  15. // Any license under such intellectual property rights must be express and
  16. // approved by Intel in writing.
  17. //
  18. // Unless otherwise agreed by Intel in writing,
  19. // you may not remove or alter this notice or any other notice embedded in
  20. // Materials by Intel or Intel's suppliers or licensors in any way.
  21. //
  22. */
  23. /*
  24. // Intel(R) Integrated Performance Primitives
  25. // Basic Types and Macro Definitions
  26. //
  27. //
  28. */
  29. #ifndef __IPPBASE_H__
  30. #define __IPPBASE_H__
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. #if defined( _WIN32 ) || defined ( _WIN64 )
  35. #define __STDCALL __stdcall
  36. #define __CDECL __cdecl
  37. #define __INT64 __int64
  38. #define __UINT64 unsigned __int64
  39. #else
  40. #define __STDCALL
  41. #define __CDECL
  42. #define __INT64 long long
  43. #define __UINT64 unsigned long long
  44. #endif
  45. #define IPP_PI ( 3.14159265358979323846 ) /* ANSI C does not support M_PI */
  46. #define IPP_2PI ( 6.28318530717958647692 ) /* 2*pi */
  47. #define IPP_PI2 ( 1.57079632679489661923 ) /* pi/2 */
  48. #define IPP_PI4 ( 0.78539816339744830961 ) /* pi/4 */
  49. #define IPP_PI180 ( 0.01745329251994329577 ) /* pi/180 */
  50. #define IPP_RPI ( 0.31830988618379067154 ) /* 1/pi */
  51. #define IPP_SQRT2 ( 1.41421356237309504880 ) /* sqrt(2) */
  52. #define IPP_SQRT3 ( 1.73205080756887729353 ) /* sqrt(3) */
  53. #define IPP_LN2 ( 0.69314718055994530942 ) /* ln(2) */
  54. #define IPP_LN3 ( 1.09861228866810969139 ) /* ln(3) */
  55. #define IPP_E ( 2.71828182845904523536 ) /* e */
  56. #define IPP_RE ( 0.36787944117144232159 ) /* 1/e */
  57. #define IPP_EPS23 ( 1.19209289e-07f )
  58. #define IPP_EPS52 ( 2.2204460492503131e-016 )
  59. #define IPP_MAX_8U ( 0xFF )
  60. #define IPP_MAX_16U ( 0xFFFF )
  61. #define IPP_MAX_32U ( 0xFFFFFFFF )
  62. #define IPP_MIN_8U ( 0 )
  63. #define IPP_MIN_16U ( 0 )
  64. #define IPP_MIN_32U ( 0 )
  65. #define IPP_MIN_8S (-128 )
  66. #define IPP_MAX_8S ( 127 )
  67. #define IPP_MIN_16S (-32768 )
  68. #define IPP_MAX_16S ( 32767 )
  69. #define IPP_MIN_32S (-2147483647 - 1 )
  70. #define IPP_MAX_32S ( 2147483647 )
  71. #define IPP_MIN_64U ( 0 )
  72. #if defined( _WIN32 ) || defined ( _WIN64 )
  73. #define IPP_MAX_64S ( 9223372036854775807i64 )
  74. #define IPP_MIN_64S (-9223372036854775807i64 - 1 )
  75. #define IPP_MAX_64U ( 0xffffffffffffffffL ) /* 18446744073709551615 */
  76. #else
  77. #define IPP_MAX_64S ( 9223372036854775807LL )
  78. #define IPP_MIN_64S (-9223372036854775807LL - 1 )
  79. #define IPP_MAX_64U ( 0xffffffffffffffffLL ) /* 18446744073709551615 */
  80. #endif
  81. #define IPP_MINABS_32F ( 1.175494351e-38f )
  82. #define IPP_MAXABS_32F ( 3.402823466e+38f )
  83. #define IPP_EPS_32F ( 1.192092890e-07f )
  84. #define IPP_MINABS_64F ( 2.2250738585072014e-308 )
  85. #define IPP_MAXABS_64F ( 1.7976931348623158e+308 )
  86. #define IPP_EPS_64F ( 2.2204460492503131e-016 )
  87. #define IPP_MAX( a, b ) ( ((a) > (b)) ? (a) : (b) )
  88. #define IPP_MIN( a, b ) ( ((a) < (b)) ? (a) : (b) )
  89. #define IPP_ABS( a ) ( ((a) < 0) ? (-(a)) : (a) )
  90. typedef struct {
  91. int major; /* e.g. 1 */
  92. int minor; /* e.g. 2 */
  93. int majorBuild; /* e.g. 3 */
  94. int build; /* e.g. 10, always >= majorBuild */
  95. char targetCpu[4]; /* corresponding to Intel(R) processor */
  96. const char* Name; /* e.g. "ippsw7" */
  97. const char* Version; /* e.g. "v1.2 Beta" */
  98. const char* BuildDate; /* e.g. "Jul 20 99" */
  99. } IppLibraryVersion;
  100. typedef unsigned char Ipp8u;
  101. typedef unsigned short Ipp16u;
  102. typedef unsigned int Ipp32u;
  103. typedef signed char Ipp8s;
  104. typedef signed short Ipp16s;
  105. typedef signed int Ipp32s;
  106. typedef float Ipp32f;
  107. typedef __INT64 Ipp64s;
  108. typedef __UINT64 Ipp64u;
  109. typedef double Ipp64f;
  110. typedef Ipp16s Ipp16f;
  111. typedef struct {
  112. Ipp8s re;
  113. Ipp8s im;
  114. } Ipp8sc;
  115. typedef struct {
  116. Ipp16s re;
  117. Ipp16s im;
  118. } Ipp16sc;
  119. typedef struct {
  120. Ipp16u re;
  121. Ipp16u im;
  122. } Ipp16uc;
  123. typedef struct {
  124. Ipp32s re;
  125. Ipp32s im;
  126. } Ipp32sc;
  127. typedef struct {
  128. Ipp32f re;
  129. Ipp32f im;
  130. } Ipp32fc;
  131. typedef struct {
  132. Ipp64s re;
  133. Ipp64s im;
  134. } Ipp64sc;
  135. typedef struct {
  136. Ipp64f re;
  137. Ipp64f im;
  138. } Ipp64fc;
  139. typedef enum {
  140. ippUndef = -1,
  141. ipp1u = 0,
  142. ipp8u = 1,
  143. ipp8uc = 2,
  144. ipp8s = 3,
  145. ipp8sc = 4,
  146. ipp16u = 5,
  147. ipp16uc = 6,
  148. ipp16s = 7,
  149. ipp16sc = 8,
  150. ipp32u = 9,
  151. ipp32uc = 10,
  152. ipp32s = 11,
  153. ipp32sc = 12,
  154. ipp32f = 13,
  155. ipp32fc = 14,
  156. ipp64u = 15,
  157. ipp64uc = 16,
  158. ipp64s = 17,
  159. ipp64sc = 18,
  160. ipp64f = 19,
  161. ipp64fc = 20
  162. } IppDataType;
  163. typedef enum {
  164. ippFalse = 0,
  165. ippTrue = 1
  166. } IppBool;
  167. #ifdef __cplusplus
  168. }
  169. #endif
  170. #endif /* __IPPBASE_H__ */