ATLAS Offline Software
Loading...
Searching...
No Matches
Restrict.h
Go to the documentation of this file.
1#ifndef TRKVKALVRTCORE_RESTRICT_H
2#define TRKVKALVRTCORE_RESTRICT_H
3
4/*
5 * Portable non-aliasing qualifier for pointer parameters.
6 *
7 * C99: restrict
8 * GCC/Clang: __restrict__
9 * MSVC: __restrict
10 * Intel classic: __restrict
11 * Fallback: empty
12 */
13
14#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus)
15# define VKAL_RESTRICT restrict
16
17#elif defined(__clang__)
18# define VKAL_RESTRICT __restrict__
19
20#elif defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER)
21# define VKAL_RESTRICT __restrict
22
23#elif defined(__GNUC__)
24# define VKAL_RESTRICT __restrict__
25
26#elif defined(_MSC_VER)
27# define VKAL_RESTRICT __restrict
28
29#else
30# define VKAL_RESTRICT
31#endif
32
33#endif /* TRKVKALVRTCORE_RESTRICT_H */