Loading...
Searching...
No Matches
8#ifndef KRONKNET_MACROS_OPTIMIZATION_H
9 #define KRONKNET_MACROS_OPTIMIZATION_H
13 #if defined(__has_attribute)
14 #define KN_HAS_ATTRIBUTE(x) __has_attribute(x)
16 #define KN_HAS_ATTRIBUTE(x) 0
19 #if defined(__GNUC__) && (__GNUC__ >= 4)
29 #if defined(_WIN32) || defined(__CYGWIN__)
30 #if defined(KRONKNET_BUILD_DLL)
31 #define KN_API __declspec(dllexport)
32 #elif defined(KRONKNET_USE_DLL)
33 #define KN_API __declspec(dllimport)
37 #elif KN_GNUC || KN_HAS_ATTRIBUTE(visibility)
38 #define KN_API __attribute__((visibility("default")))
43 #if KN_GNUC || KN_HAS_ATTRIBUTE(unused)
44 #define KN_UNUSED __attribute__((unused))
49 #if KN_GNUC || KN_HAS_ATTRIBUTE(hot)
50 #define KN_HOT __attribute__((hot))
55 #if KN_GNUC || KN_HAS_ATTRIBUTE(cold)
56 #define KN_COLD __attribute__((cold))