TDLS
0.2.0
Tiny Device-callable Linear Solvers
Loading...
Searching...
No Matches
include
tdls
core
macros.hpp
Go to the documentation of this file.
1
#ifndef TDLS_CORE_MACROS_HPP
2
#define TDLS_CORE_MACROS_HPP
3
4
5
25
26
27
38
39
#ifndef TDLS_HOST_DEVICE
40
#if defined(__HIPCC__) || defined(__HIP__)
41
#define TDLS_HOST_DEVICE __attribute__((host)) __attribute__((device))
42
#elif defined(__CUDACC__) || defined(__CUDA__)
43
#define TDLS_HOST_DEVICE __host__ __device__
44
#else
45
#define TDLS_HOST_DEVICE
46
#endif
47
#endif
48
49
50
60
61
#ifndef TDLS_FORCEINLINE
62
#if defined(__HIPCC__) || defined(__HIP__)
63
#define TDLS_FORCEINLINE inline __attribute__((always_inline))
64
#elif defined(__CUDACC__) || defined(__CUDA__)
65
#define TDLS_FORCEINLINE __forceinline__
66
#else
67
#define TDLS_FORCEINLINE inline
68
#endif
69
#endif
70
71
72
75
76
#ifndef TDLS_RESTRICT
77
#if defined(_MSC_VER) && !defined(__clang__)
78
#define TDLS_RESTRICT __restrict
79
#else
80
#define TDLS_RESTRICT __restrict__
81
#endif
82
#endif
83
84
85
95
96
#ifndef TDLS_UNROLL_FORCE
97
#if defined(__CUDACC__) || defined(__CUDA__) || defined(__HIPCC__) || defined(__HIP__) || \
98
defined(__NVCOMPILER) || defined(__clang__)
99
#define TDLS_UNROLL_FORCE _Pragma("unroll")
100
#elif defined(__GNUC__)
101
#define TDLS_UNROLL_FORCE _Pragma("GCC unroll 64")
102
#else
103
#define TDLS_UNROLL_FORCE
104
#endif
105
#endif
106
107
108
109
#endif
// TDLS_CORE_MACROS_HPP
Generated by
1.12.0