Face Engine SDK  5.34.0
A face detection, recognition and tracking engine.
Def.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #if defined(__clang__) || defined(__GNUC__)
10 #define FSDK_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
11 #elif defined(_MSC_VER)
12 #define FSDK_DEPRECATED(msg) __declspec(deprecated(msg))
13 #else
14 #define FSDK_DEPRECATED(msg)
15 #endif
16 
17 #if defined(WIN32) || defined(_WIN32)
18 #if defined(SDK_DLL_EXPORTS)
19 #define FSDK_API __declspec(dllexport)
20 #else
21 #define FSDK_API __declspec(dllimport)
22 #endif
23 #else
24 #if __GNUC__ >= 4
25 #define FSDK_API __attribute__((visibility("default")))
26 #else
27 #define FSDK_API
28 #endif
29 #endif
30 
31 #if defined(WIN32) || defined(_WIN32)
32 #if defined(FSDK_UTILS_DLL_EXPORTS)
33 #define FSDK_UTILS_API __declspec(dllexport)
34 #else
35 #define FSDK_UTILS_API __declspec(dllimport)
36 #endif
37 #else
38 #if __GNUC__ >= 4
39 #define FSDK_UTILS_API __attribute__((visibility("default")))
40 #else
41 #define FSDK_UTILS_API
42 #endif
43 #endif
44 
45 #if __APPLE__
46 #include <TargetConditionals.h>
47 #if TARGET_CPU_ARM || TARGET_CPU_ARM64
48 #define IOS
49 #endif
50 #endif // __APPLE__
51 
56 // Aling value up to align so that value % align == 0.
57 #define ALIGN_UP(value, align) (((value) & (align - 1)) ? (((value) + (align - 1)) & ~(align - 1)) : (value))
58 
59 #if defined(_MSC_VER)
60 #define ALIGNED(x) __declspec(align(x))
61 #define RESTRICT __restrict
62 #define FORCE_INLINE __forceinline
63 #else
64 #define ALIGNED(x) __attribute__((aligned(x)))
65 #define RESTRICT __restrict__
66 #define FORCE_INLINE inline __attribute__((always_inline))
67 #endif
68 
70 #define DECLARE_SMARTPTR(X) \
71  struct X; \
72  using X##Ptr = fsdk::Ref<X>
73 
75 #define STRINGIFY2(x) #x
76 
78 #define STRINGIFY(x) STRINGIFY2(x)
79  // end of CoreGroup