mkldnn_debug.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*******************************************************************************
  2. * Copyright 2018-2019 Intel Corporation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. *******************************************************************************/
  16. /* DO NOT EDIT, AUTO-GENERATED */
  17. #ifndef MKLDNN_DEBUG_H
  18. #define MKLDNN_DEBUG_H
  19. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  20. /* All symbols shall be internal unless marked as MKLDNN_API */
  21. #if defined _WIN32 || defined __CYGWIN__
  22. # define MKLDNN_HELPER_DLL_IMPORT __declspec(dllimport)
  23. # define MKLDNN_HELPER_DLL_EXPORT __declspec(dllexport)
  24. #else
  25. # if __GNUC__ >= 4
  26. # define MKLDNN_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
  27. # define MKLDNN_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
  28. # else
  29. # define MKLDNN_HELPER_DLL_IMPORT
  30. # define MKLDNN_HELPER_DLL_EXPORT
  31. # endif
  32. #endif
  33. #ifdef MKLDNN_DLL
  34. # ifdef MKLDNN_DLL_EXPORTS
  35. # define MKLDNN_API MKLDNN_HELPER_DLL_EXPORT
  36. # else
  37. # define MKLDNN_API MKLDNN_HELPER_DLL_IMPORT
  38. # endif
  39. #else
  40. # define MKLDNN_API
  41. #endif
  42. #if defined (__GNUC__)
  43. # define MKLDNN_DEPRECATED __attribute__((deprecated))
  44. #elif defined(_MSC_VER)
  45. # define MKLDNN_DEPRECATED __declspec(deprecated)
  46. #else
  47. # define MKLDNN_DEPRECATED
  48. #endif
  49. #include "mkldnn_types.h"
  50. #endif /* DOXYGEN_SHOULD_SKIP_THIS */
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54. const char MKLDNN_API *mkldnn_status2str(mkldnn_status_t v);
  55. const char MKLDNN_API *mkldnn_dt2str(mkldnn_data_type_t v);
  56. const char MKLDNN_API *mkldnn_fmt_kind2str(mkldnn_format_kind_t v);
  57. const char MKLDNN_API *mkldnn_fmt_tag2str(mkldnn_format_tag_t v);
  58. const char MKLDNN_API *mkldnn_prop_kind2str(mkldnn_prop_kind_t v);
  59. const char MKLDNN_API *mkldnn_prim_kind2str(mkldnn_primitive_kind_t v);
  60. const char MKLDNN_API *mkldnn_alg_kind2str(mkldnn_alg_kind_t v);
  61. const char MKLDNN_API *mkldnn_rnn_direction2str(mkldnn_rnn_direction_t v);
  62. /** Forms a format string for a given memory descriptor.
  63. *
  64. * The format is defined as: 'dt:[p|o|0]:fmt_kind:fmt:extra'.
  65. * Here:
  66. * - dt -- data type
  67. * - p -- indicates there is non-trivial padding
  68. * - o -- indicates there is non-trivial padding offset
  69. * - 0 -- indicates there is non-trivial offset0
  70. * - fmt_kind -- format kind (blocked, wino, etc...)
  71. * - fmt -- extended format string (format_kind specific)
  72. * - extra -- shows extra fields (underspecified)
  73. */
  74. int MKLDNN_API mkldnn_md2fmt_str(char *fmt_str, size_t fmt_str_len,
  75. const mkldnn_memory_desc_t *md);
  76. /** Forms a dimension string for a given memory descriptor.
  77. *
  78. * The format is defined as: 'dim0xdim1x...xdimN
  79. */
  80. int MKLDNN_API mkldnn_md2dim_str(char *dim_str, size_t dim_str_len,
  81. const mkldnn_memory_desc_t *md);
  82. #ifdef __cplusplus
  83. }
  84. #endif
  85. #endif