#define aligned(v, a) (((v) + (a - 1)) & ~(a - 1))
extern gras_set_t *gras_datadesc_set_local;
-
+void gras_ddt_freev(void *ddt);
/*******************************************
* Descriptions of all known architectures *
*******************************************/
-#define gras_arch_count 3
+#define gras_arch_count 4
typedef enum {
gras_ddt_scalar_char = 0,
gras_ddt_scalar_short = 1,
int sizeof_scalars[9]; /* char,short,int,long,long_long,
pdata,pfunc,
float,double */
+
+ int struct_boundary;
} gras_arch_desc_t;
extern const gras_arch_desc_t gras_arches[gras_arch_count];
*/
typedef struct s_gras_dd_cat_field {
- char *name;
- long int offset[gras_arch_count]; /* only for struct */
- int code;
+ char *name;
+ long int offset[gras_arch_count];
+ int code;
gras_datadesc_type_cb_void_t pre;
gras_datadesc_type_cb_void_t post;
*/
typedef struct s_gras_dd_cat_struct {
gras_dynar_t *fields; /* elm type = gras_dd_cat_field_t */
+ int closed; /* gras_datadesc_declare_struct_close() was called */
} gras_dd_cat_struct_t;
/**
typedef struct s_gras_dd_cat_union {
gras_datadesc_type_cb_int_t selector;
gras_dynar_t *fields; /* elm type = gras_dd_cat_field_t */
+ int closed; /* gras_datadesc_declare_union_close() was called */
} gras_dd_cat_union_t;
/**
/* callback used to return the dynamic length */
gras_datadesc_type_cb_int_t dynamic_size;
+
} gras_dd_cat_array_t;
/**
/* payload */
long int size[gras_arch_count];
- long int alignment[gras_arch_count];
+ long int alignment[gras_arch_count];
long int aligned_size[gras_arch_count];
enum e_gras_datadesc_type_category category_code;
* Convertions *
***************/
gras_error_t
-gras_dd_convert_elm(gras_datadesc_type_t *type,
+gras_dd_convert_elm(gras_datadesc_type_t *type, int count,
int r_arch,
void *src, void *dst);