mkl_df_defines.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. /* file: mkl_df_defines.h */
  2. /*******************************************************************************
  3. * Copyright 2006-2022 Intel Corporation.
  4. *
  5. * This software and the related documents are Intel copyrighted materials, and
  6. * your use of them is governed by the express license under which they were
  7. * provided to you (License). Unless the License provides otherwise, you may not
  8. * use, modify, copy, publish, distribute, disclose or transmit this software or
  9. * the related documents without Intel's prior written permission.
  10. *
  11. * This software and the related documents are provided as is, with no express
  12. * or implied warranties, other than those that are expressly stated in the
  13. * License.
  14. *******************************************************************************/
  15. /*
  16. //++
  17. // User-level macro definitions
  18. //--
  19. */
  20. #ifndef __MKL_DF_DEFINES_H__
  21. #define __MKL_DF_DEFINES_H__
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif /* __cplusplus */
  25. #define DF_STATUS_OK 0
  26. /*
  27. // Common errors (-1..-999)
  28. */
  29. #define DF_ERROR_CPU_NOT_SUPPORTED -1
  30. /*
  31. //++
  32. // DATA FITTING ERROR/WARNING CODES
  33. //--
  34. */
  35. /*
  36. // Errors (-1000..-1999)
  37. */
  38. #define DF_ERROR_NULL_TASK_DESCRIPTOR -1000
  39. #define DF_ERROR_MEM_FAILURE -1001
  40. #define DF_ERROR_METHOD_NOT_SUPPORTED -1002
  41. #define DF_ERROR_COMP_TYPE_NOT_SUPPORTED -1003
  42. #define DF_ERROR_NULL_PTR -1037
  43. #define DF_ERROR_BAD_NX -1004
  44. #define DF_ERROR_BAD_X -1005
  45. #define DF_ERROR_BAD_X_HINT -1006
  46. #define DF_ERROR_BAD_NY -1007
  47. #define DF_ERROR_BAD_Y -1008
  48. #define DF_ERROR_BAD_Y_HINT -1009
  49. #define DF_ERROR_BAD_SPLINE_ORDER -1010
  50. #define DF_ERROR_BAD_SPLINE_TYPE -1011
  51. #define DF_ERROR_BAD_IC_TYPE -1012
  52. #define DF_ERROR_BAD_IC -1013
  53. #define DF_ERROR_BAD_BC_TYPE -1014
  54. #define DF_ERROR_BAD_BC -1015
  55. #define DF_ERROR_BAD_PP_COEFF -1016
  56. #define DF_ERROR_BAD_PP_COEFF_HINT -1017
  57. #define DF_ERROR_BAD_PERIODIC_VAL -1018
  58. #define DF_ERROR_BAD_DATA_ATTR -1019
  59. #define DF_ERROR_BAD_DATA_IDX -1020
  60. #define DF_ERROR_BAD_NSITE -1021
  61. #define DF_ERROR_BAD_SITE -1022
  62. #define DF_ERROR_BAD_SITE_HINT -1023
  63. #define DF_ERROR_BAD_NDORDER -1024
  64. #define DF_ERROR_BAD_DORDER -1025
  65. #define DF_ERROR_BAD_DATA_HINT -1026
  66. #define DF_ERROR_BAD_INTERP -1027
  67. #define DF_ERROR_BAD_INTERP_HINT -1028
  68. #define DF_ERROR_BAD_CELL_IDX -1029
  69. #define DF_ERROR_BAD_NLIM -1030
  70. #define DF_ERROR_BAD_LLIM -1031
  71. #define DF_ERROR_BAD_RLIM -1032
  72. #define DF_ERROR_BAD_INTEGR -1033
  73. #define DF_ERROR_BAD_INTEGR_HINT -1034
  74. #define DF_ERROR_BAD_LOOKUP_INTERP_SITE -1035
  75. #define DF_ERROR_BAD_CHECK_FLAG -1036
  76. /*
  77. // Internal errors caused by internal routines of the functions
  78. */
  79. #define VSL_DF_ERROR_INTERNAL_C1 -1500
  80. #define VSL_DF_ERROR_INTERNAL_C2 -1501
  81. /*
  82. // User-defined callback status
  83. */
  84. #define DF_STATUS_EXACT_RESULT 1000
  85. /*
  86. //++
  87. // MACROS USED IN DATAFITTING EDITORS AND COMPUTE ROUTINES
  88. //--
  89. */
  90. /*
  91. // Attributes of parameters that can be modified in Data Fitting task
  92. */
  93. #define DF_X 1
  94. #define DF_Y 2
  95. #define DF_IC 3
  96. #define DF_BC 4
  97. #define DF_PP_SCOEFF 5
  98. #define DF_NX 14
  99. #define DF_XHINT 15
  100. #define DF_NY 16
  101. #define DF_YHINT 17
  102. #define DF_SPLINE_ORDER 18
  103. #define DF_SPLINE_TYPE 19
  104. #define DF_IC_TYPE 20
  105. #define DF_BC_TYPE 21
  106. #define DF_PP_COEFF_HINT 22
  107. #define DF_CHECK_FLAG 23
  108. /*
  109. //++
  110. // SPLINE ORDERS SUPPORTED IN DATA FITTING ROUTINES
  111. //--
  112. */
  113. #define DF_PP_STD 0
  114. #define DF_PP_LINEAR 2
  115. #define DF_PP_QUADRATIC 3
  116. #define DF_PP_CUBIC 4
  117. /*
  118. //++
  119. // SPLINE TYPES SUPPORTED IN DATA FITTING ROUTINES
  120. //--
  121. */
  122. #define DF_PP_DEFAULT 0
  123. #define DF_PP_SUBBOTIN 1
  124. #define DF_PP_NATURAL 2
  125. #define DF_PP_HERMITE 3
  126. #define DF_PP_BESSEL 4
  127. #define DF_PP_AKIMA 5
  128. #define DF_LOOKUP_INTERPOLANT 6
  129. #define DF_CR_STEPWISE_CONST_INTERPOLANT 7
  130. #define DF_CL_STEPWISE_CONST_INTERPOLANT 8
  131. #define DF_PP_HYMAN 9
  132. /*
  133. //++
  134. // TYPES OF BOUNDARY CONDITIONS USED IN SPLINE CONSTRUCTION
  135. //--
  136. */
  137. #define DF_NO_BC 0
  138. #define DF_BC_NOT_A_KNOT 1
  139. #define DF_BC_FREE_END 2
  140. #define DF_BC_1ST_LEFT_DER 4
  141. #define DF_BC_1ST_RIGHT_DER 8
  142. #define DF_BC_2ND_LEFT_DER 16
  143. #define DF_BC_2ND_RIGHT_DER 32
  144. #define DF_BC_PERIODIC 64
  145. #define DF_BC_Q_VAL 128
  146. /*
  147. //++
  148. // TYPES OF INTERNAL CONDITIONS USED IN SPLINE CONSTRUCTION
  149. //--
  150. */
  151. #define DF_NO_IC 0
  152. #define DF_IC_1ST_DER 1
  153. #define DF_IC_2ND_DER 2
  154. #define DF_IC_Q_KNOT 8
  155. /*
  156. //++
  157. // TYPES OF SUPPORTED HINTS
  158. //--
  159. */
  160. #define DF_NO_HINT 0x00000000
  161. #define DF_NON_UNIFORM_PARTITION 0x00000001
  162. #define DF_QUASI_UNIFORM_PARTITION 0x00000002
  163. #define DF_UNIFORM_PARTITION 0x00000004
  164. #define DF_MATRIX_STORAGE_ROWS 0x00000010
  165. #define DF_MATRIX_STORAGE_COLS 0x00000020
  166. #define DF_SORTED_DATA 0x00000040
  167. #define DF_1ST_COORDINATE 0x00000080
  168. #define DF_MATRIX_STORAGE_FUNCS_SITES_DERS DF_MATRIX_STORAGE_ROWS
  169. #define DF_MATRIX_STORAGE_FUNCS_DERS_SITES DF_MATRIX_STORAGE_COLS
  170. #define DF_MATRIX_STORAGE_SITES_FUNCS_DERS 0x00000100
  171. #define DF_MATRIX_STORAGE_SITES_DERS_FUNCS 0x00000200
  172. /*
  173. //++
  174. // TYPES OF APRIORI INFORMATION
  175. // ABOUT DATA STRUCTURE
  176. //--
  177. */
  178. #define DF_NO_APRIORI_INFO 0x00000000
  179. #define DF_APRIORI_MOST_LIKELY_CELL 0x00000001
  180. /*
  181. //++
  182. // ESTIMATES TO BE COMPUTED WITH DATA FITTING COMPUTE ROUTINE
  183. //--
  184. */
  185. #define DF_INTERP 0x00000001
  186. #define DF_CELL 0x00000002
  187. #define DF_INTERP_USER_CELL 0x00000004
  188. /*
  189. //++
  190. // METHODS TO BE USED FOR EVALUATION OF THE SPLINE RELATED ESTIMATES
  191. //--
  192. */
  193. #define DF_METHOD_STD 0
  194. #define DF_METHOD_PP 1
  195. /*
  196. //++
  197. // POSSIBLE VALUES FOR DF_CHECK_FLAG
  198. //--
  199. */
  200. #define DF_ENABLE_CHECK_FLAG 0x00000000
  201. #define DF_DISABLE_CHECK_FLAG 0x00000001
  202. /*
  203. //++
  204. // SPLINE FORMATS SUPPORTED IN SPLINE CONSTRUCTION ROUTINE
  205. //--
  206. */
  207. #define DF_PP_SPLINE 0
  208. /*
  209. //++
  210. // VALUES OF FLAG INDICATING WHICH, LEFT OR RIGHT, INTEGRATION LIMITS
  211. // ARE PASSED BY INTEGRATION ROUTINE INTO SEARCH CALLBACK
  212. //--
  213. */
  214. #define DF_INTEGR_SEARCH_CB_LLIM_FLAG 0
  215. #define DF_INTEGR_SEARCH_CB_RLIM_FLAG 1
  216. #ifdef __cplusplus
  217. }
  218. #endif /* __cplusplus */
  219. #endif /* __MKL_DF_DEFINES_H__ */