Caffe2 - C++ API
A deep learning, cross platform ML framework
ThreadPoolCommon.h
1 #ifndef CAFFE2_UTILS_THREADPOOL_COMMON_H_
2 #define CAFFE2_UTILS_THREADPOOL_COMMON_H_
3 
4 #ifdef __APPLE__
5 #include <TargetConditionals.h>
6 #endif
7 
8 // caffe2 depends upon NNPACK, which depends upon this threadpool, so
9 // unfortunately we can't reference core/common.h here
10 
11 // This is copied from core/common.h's definition of CAFFE2_MOBILE
12 // Define enabled when building for iOS or Android devices
13 #if defined(__ANDROID__)
14 #define CAFFE2_ANDROID 1
15 #elif (defined(__APPLE__) && \
16  (TARGET_IPHONE_SIMULATOR || TARGET_OS_SIMULATOR || TARGET_OS_IPHONE))
17 #define CAFFE2_IOS 1
18 #elif (defined(__APPLE__) && TARGET_OS_MAC)
19 #define CAFFE2_IOS 1
20 #else
21 #endif // ANDROID / IOS / MACOS
22 
23 #endif // CAFFE2_UTILS_THREADPOOL_COMMON_H_