MNN  1.0
宏定义
MNNDefine.h 文件参考
#include <assert.h>
#include <stdio.h>

浏览源代码.

宏定义

#define MNN_PRINT(format, ...)   printf(format, ##__VA_ARGS__)
 
#define MNN_ERROR(format, ...)   printf(format, ##__VA_ARGS__)
 
#define MNN_ASSERT(x)
 
#define FUNC_PRINT(x)   MNN_PRINT(#x "=%d in %s, %d \n", x, __func__, __LINE__);
 
#define FUNC_PRINT_ALL(x, type)   MNN_PRINT(#x "=" #type " %" #type " in %s, %d \n", x, __func__, __LINE__);
 
#define MNN_PUBLIC   __attribute__((visibility("default")))
 

宏定义说明

◆ FUNC_PRINT

#define FUNC_PRINT (   x)    MNN_PRINT(#x "=%d in %s, %d \n", x, __func__, __LINE__);

◆ FUNC_PRINT_ALL

#define FUNC_PRINT_ALL (   x,
  type 
)    MNN_PRINT(#x "=" #type " %" #type " in %s, %d \n", x, __func__, __LINE__);

◆ MNN_ASSERT

#define MNN_ASSERT (   x)
值:
{ \
int res = (x); \
if (!res) { \
MNN_ERROR("Error for %s, %d\n", __FILE__, __LINE__); \
} \
}

◆ MNN_ERROR

#define MNN_ERROR (   format,
  ... 
)    printf(format, ##__VA_ARGS__)

◆ MNN_PRINT

#define MNN_PRINT (   format,
  ... 
)    printf(format, ##__VA_ARGS__)

◆ MNN_PUBLIC

#define MNN_PUBLIC   __attribute__((visibility("default")))