Change the tree_next to a flexible array member
Signed-off-by: Mikhail Kurnosov <mkurnosov@gmail.com>
Этот коммит содержится в:
родитель
6547b58316
Коммит
66bc86a25b
@ -20,12 +20,13 @@
|
|||||||
#define MCA_COLL_BASE_TOPO_H_HAS_BEEN_INCLUDED
|
#define MCA_COLL_BASE_TOPO_H_HAS_BEEN_INCLUDED
|
||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#define MAXTREEFANOUT 32
|
#define MAXTREEFANOUT 32
|
||||||
|
|
||||||
#define MEMBSIZE(type, member) (sizeof(((type *)0)->member))
|
#define MEMBSIZE(type, member) (sizeof(((type *)0)->member[0]))
|
||||||
#define COLL_TREE_SIZE(fanout) \
|
#define COLL_TREE_SIZE(fanout) \
|
||||||
(sizeof(ompi_coll_tree_t) + ((fanout) - 1) * MEMBSIZE(ompi_coll_tree_t, tree_next[1]))
|
(offsetof(ompi_coll_tree_t, tree_next) + (fanout) * MEMBSIZE(ompi_coll_tree_t, tree_next))
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
@ -35,7 +36,7 @@ typedef struct ompi_coll_tree_t {
|
|||||||
int32_t tree_bmtree;
|
int32_t tree_bmtree;
|
||||||
int32_t tree_prev;
|
int32_t tree_prev;
|
||||||
int32_t tree_nextsize;
|
int32_t tree_nextsize;
|
||||||
int32_t tree_next[1];
|
int32_t tree_next[];
|
||||||
} ompi_coll_tree_t;
|
} ompi_coll_tree_t;
|
||||||
|
|
||||||
ompi_coll_tree_t*
|
ompi_coll_tree_t*
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user