Go to the source code of this file.
◆ swift_align_information
#define swift_align_information |
( |
| type, |
|
|
| array, |
|
|
| alignment ) ; |
Macro to tell the compiler that a given array has the specified alignment.
Note that this turns into a no-op but gives information to the compiler. For GCC versions older than 4.6 this is ignored as the builtin does not exist.
- Parameters
-
type | The type of the array. |
array | The array. |
alignment | The alignment in bytes of the array. |
Definition at line 61 of file align.h.
◆ swift_assume_size
#define swift_assume_size |
( |
| var, |
|
|
| size ) ; |
Macro to tell the compiler that a given number is 0 modulo a given size.
Note that this turns into a no-op but gives information to the compiler. GCC does not have the equivalent built-in so defaults to nothing.
- Parameters
-
var | The variable |
size | The modulo of interest. |
Definition at line 93 of file align.h.
◆ SWIFT_CACHE_ALIGN
Defines alignment of caches.
Definition at line 40 of file align.h.
◆ SWIFT_CACHE_ALIGNMENT
#define SWIFT_CACHE_ALIGNMENT 64 |
The default cache alignment in SWIFT.
Definition at line 35 of file align.h.
◆ swift_declare_aligned_ptr
#define swift_declare_aligned_ptr |
( |
| type, |
|
|
| array, |
|
|
| ptr, |
|
|
| alignment ) |
Value: type *restrict array =
ptr; \
swift_align_information(type, array, alignment);
Macro to create a restrict pointer to an array and tell the compiler that the given array has the specified alignment.
Note that this turns into a no-op but gives information to the compiler.
- Parameters
-
array | The array. |
ptr | Pointer to array |
type | Type of array |
alignment | The alignment in bytes of the array. |
Definition at line 76 of file align.h.
◆ SWIFT_STRUCT_ALIGN
Defines alignment of structures.
Definition at line 30 of file align.h.
◆ SWIFT_STRUCT_ALIGNMENT
#define SWIFT_STRUCT_ALIGNMENT 32 |
The default struct alignment in SWIFT.
Definition at line 25 of file align.h.