xref: /aosp_15_r20/external/pytorch/aten/src/ATen/native/sparse/Macros.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 #if defined(__CUDACC__) || defined(__HIPCC__)
4 #define GPUCC
5 #define FUNCAPI __host__ __device__
6 #define INLINE __forceinline__
7 #else
8 #define FUNCAPI
9 #define INLINE inline
10 #endif
11 
12 #if defined(_WIN32) || defined(_WIN64)
13 // Temporarily disable __restrict on Windows,
14 // as it turns out not all MSVC versions are aware of it.
15 // #define RESTRICT __restrict
16 #define RESTRICT
17 #else
18 #define RESTRICT __restrict__
19 #endif
20