1 | #pragma once |
---|---|
2 | |
3 | namespace torch { |
4 | namespace utils { |
5 | |
6 | static inline bool cuda_enabled() { |
7 | #ifdef USE_CUDA |
8 | return true; |
9 | #else |
10 | return false; |
11 | #endif |
12 | } |
13 | |
14 | } // namespace utils |
15 | } // namespace torch |
16 |
1 | #pragma once |
---|---|
2 | |
3 | namespace torch { |
4 | namespace utils { |
5 | |
6 | static inline bool cuda_enabled() { |
7 | #ifdef USE_CUDA |
8 | return true; |
9 | #else |
10 | return false; |
11 | #endif |
12 | } |
13 | |
14 | } // namespace utils |
15 | } // namespace torch |
16 |