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 C10_MOBILE 12 // Define enabled when building for iOS or Android devices 13 #if defined(__ANDROID__) 14 #define C10_ANDROID 1 15 #elif (defined(__APPLE__) && \ 16 (TARGET_IPHONE_SIMULATOR || TARGET_OS_SIMULATOR || TARGET_OS_IPHONE)) 17 #define C10_IOS 1 18 #endif // ANDROID / IOS 19 20 #endif // CAFFE2_UTILS_THREADPOOL_COMMON_H_ 21