Caffe2 - C++ API
A deep learning, cross platform ML framework
asan.h
1 
17 #pragma once
18 
19 // Detect address sanitizer as some stuff doesn't work with it
20 
21 #undef CAFFE2_ASAN_ENABLED
22 
23 // for clang
24 #if defined(__has_feature)
25 #if ((__has_feature(address_sanitizer)))
26 #define CAFFE2_ASAN_ENABLED 1
27 #endif
28 #endif
29 
30 // for gcc
31 #if defined(__SANITIZE_ADDRESS__)
32 #if __SANITIZE_ADDRESS__
33 #if !defined(CAFFE2_ASAN_ENABLED)
34 #define CAFFE2_ASAN_ENABLED 1
35 #endif
36 #endif
37 #endif
38 
39 #if !defined(CAFFE2_ASAN_ENABLED)
40 #define CAFFE2_ASAN_ENABLED 0
41 #endif