Peano
Loading...
Searching...
No Matches
align.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SWIFT_STRUCT_ALIGNMENT   32
 The default struct alignment in SWIFT.
 
#define SWIFT_STRUCT_ALIGN   __attribute__((aligned(SWIFT_STRUCT_ALIGNMENT)))
 Defines alignment of structures.
 
#define SWIFT_CACHE_ALIGNMENT   64
 The default cache alignment in SWIFT.
 
#define SWIFT_CACHE_ALIGN   __attribute__((aligned(SWIFT_CACHE_ALIGNMENT)))
 Defines alignment of caches.
 
#define swift_align_information(type, array, alignment)   ;
 Macro to tell the compiler that a given array has the specified alignment.
 
#define swift_declare_aligned_ptr(type, array, ptr, alignment)
 Macro to create a restrict pointer to an array and tell the compiler that the given array has the specified alignment.
 
#define swift_assume_size(var, size)   ;
 Macro to tell the compiler that a given number is 0 modulo a given size.
 

Macro Definition Documentation

◆ 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
typeThe type of the array.
arrayThe array.
alignmentThe 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
varThe variable
sizeThe modulo of interest.

Definition at line 93 of file align.h.

◆ SWIFT_CACHE_ALIGN

#define SWIFT_CACHE_ALIGN   __attribute__((aligned(SWIFT_CACHE_ALIGNMENT)))

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);
Definition type.h:27

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
arrayThe array.
ptrPointer to array
typeType of array
alignmentThe alignment in bytes of the array.

Definition at line 76 of file align.h.

◆ SWIFT_STRUCT_ALIGN

struct part SWIFT_STRUCT_ALIGN   __attribute__((aligned(SWIFT_STRUCT_ALIGNMENT)))

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.