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
17/* DO NOT EDIT, AUTO-GENERATED */
18
19#ifndef MKLDNN_DEBUG_H
20#define MKLDNN_DEBUG_H
21
22#ifndef DOXYGEN_SHOULD_SKIP_THIS
23
24/* All symbols shall be internal unless marked as MKLDNN_API */
25#if defined _WIN32 || defined __CYGWIN__
26# define MKLDNN_HELPER_DLL_IMPORT __declspec(dllimport)
27# define MKLDNN_HELPER_DLL_EXPORT __declspec(dllexport)
28#else
29# if __GNUC__ >= 4
30# define MKLDNN_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
31# define MKLDNN_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
32# else
33# define MKLDNN_HELPER_DLL_IMPORT
34# define MKLDNN_HELPER_DLL_EXPORT
35# endif
36#endif
37
38#ifdef MKLDNN_DLL
39# ifdef MKLDNN_DLL_EXPORTS
40# define MKLDNN_API MKLDNN_HELPER_DLL_EXPORT
41# else
42# define MKLDNN_API MKLDNN_HELPER_DLL_IMPORT
43# endif
44#else
45# define MKLDNN_API
46#endif
47
48#if defined (__GNUC__)
49# define MKLDNN_DEPRECATED __attribute__((deprecated))
50#elif defined(_MSC_VER)
51# define MKLDNN_DEPRECATED __declspec(deprecated)
52#else
53# define MKLDNN_DEPRECATED
54#endif
55
56#include "mkldnn_types.h"
57#endif /* DOXYGEN_SHOULD_SKIP_THIS */
58
59#ifdef __cplusplus
60extern "C" {
61#endif
62
63const char MKLDNN_API *mkldnn_status2str(mkldnn_status_t v);
64const char MKLDNN_API *mkldnn_dt2str(mkldnn_data_type_t v);
65const char MKLDNN_API *mkldnn_fmt_kind2str(mkldnn_format_kind_t v);
66const char MKLDNN_API *mkldnn_fmt_tag2str(mkldnn_format_tag_t v);
67const char MKLDNN_API *mkldnn_prop_kind2str(mkldnn_prop_kind_t v);
68const char MKLDNN_API *mkldnn_prim_kind2str(mkldnn_primitive_kind_t v);
69const char MKLDNN_API *mkldnn_alg_kind2str(mkldnn_alg_kind_t v);
70const char MKLDNN_API *mkldnn_rnn_direction2str(mkldnn_rnn_direction_t v);
71
72/** Forms a format string for a given memory descriptor.
73 *
74 * The format is defined as: 'dt:[p|o|0]:fmt_kind:fmt:extra'.
75 * Here:
76 * - dt -- data type
77 * - p -- indicates there is non-trivial padding
78 * - o -- indicates there is non-trivial padding offset
79 * - 0 -- indicates there is non-trivial offset0
80 * - fmt_kind -- format kind (blocked, wino, etc...)
81 * - fmt -- extended format string (format_kind specific)
82 * - extra -- shows extra fields (underspecified)
83 */
84int MKLDNN_API mkldnn_md2fmt_str(char *fmt_str, size_t fmt_str_len,
85 const mkldnn_memory_desc_t *md);
86
87/** Forms a dimension string for a given memory descriptor.
88 *
89 * The format is defined as: 'dim0xdim1x...xdimN
90 */
91int MKLDNN_API mkldnn_md2dim_str(char *dim_str, size_t dim_str_len,
92 const mkldnn_memory_desc_t *md);
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif
99