|
5 | 5 | * Copyright (c) 2004-2005 The University of Tennessee and The University
|
6 | 6 | * of Tennessee Research Foundation. All rights
|
7 | 7 | * reserved.
|
8 |
| - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, |
| 8 | + * Copyright (c) 2004-2020 High Performance Computing Center Stuttgart, |
9 | 9 | * University of Stuttgart. All rights reserved.
|
10 | 10 | * Copyright (c) 2004-2005 The Regents of the University of California.
|
11 | 11 | * All rights reserved.
|
|
22 | 22 | #ifndef OPAL_ALIGN_H
|
23 | 23 | #define OPAL_ALIGN_H
|
24 | 24 |
|
25 |
| -#define OPAL_DOWN_ALIGN(x, a, t) ((x) & ~(((t)(a) -1))) |
26 |
| -#define OPAL_DOWN_ALIGN_PTR(x, a, t) ((t) OPAL_DOWN_ALIGN((uintptr_t) x, a, uintptr_t)) |
27 |
| -#define OPAL_ALIGN(x, a, t) (((x) + ((t)(a) -1)) & ~(((t)(a) -1))) |
28 |
| -#define OPAL_ALIGN_PTR(x, a, t) ((t) OPAL_ALIGN((uintptr_t) x, a, uintptr_t)) |
29 |
| -#define OPAL_ALIGN_PAD_AMOUNT(x, s) ((~((uintptr_t)(x)) + 1) & ((uintptr_t)(s) -1)) |
| 25 | +#define OPAL_DOWN_ALIGN(x,a,t) ((x) & ~(((t)(a)-1))) |
| 26 | +#define OPAL_DOWN_ALIGN_PTR(x,a,t) ((t)OPAL_DOWN_ALIGN((uintptr_t)x, a, uintptr_t)) |
| 27 | +#define OPAL_ALIGN(x,a,t) (((x)+((t)(a)-1)) & ~(((t)(a)-1))) |
| 28 | +#define OPAL_ALIGN_PTR(x,a,t) ((t)OPAL_ALIGN((uintptr_t)x, a, uintptr_t)) |
| 29 | +#define OPAL_ALIGN_PAD_AMOUNT(x,s) ((~((uintptr_t)(x))+1) & ((uintptr_t)(s)+(!(uintptr_t)(s))-1)) |
30 | 30 |
|
31 | 31 | #if __STDC_VERSION__ >= 201101L
|
32 | 32 | # include <stddef.h>
|
|
0 commit comments