- gras_set_add(gras_datadesc_set_local,
- (gras_set_elm_t)res,&gras_ddt_freev);
- GRAS_OUT;
+ xbt_set_add(gras_datadesc_set_local,
+ (xbt_set_elm_t)res,&gras_ddt_freev);
+ XBT_OUT;
- GRAS_IN1("(%s)",name);
- if (gras_set_get_by_name(gras_datadesc_set_local,
- name,(gras_set_elm_t*)&type) == no_error) {
- GRAS_OUT;
+ XBT_IN1("(%s)",name);
+ if (xbt_set_get_by_name(gras_datadesc_set_local,
+ name,(xbt_set_elm_t*)&type) == no_error) {
+ XBT_OUT;
- GRAS_IN;
- return gras_set_get_by_id(gras_datadesc_set_local,
- code,(gras_set_elm_t*)type);
+ XBT_IN;
+ return xbt_set_get_by_id(gras_datadesc_set_local,
+ code,(xbt_set_elm_t*)type);
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
return res;
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
return res;
/* size is not a power of 2 */
/* alignment= next power of 2 after size */
res->alignment[arch] = (res->size[arch] & ~(mask >> 1)) << 1;
/* size is not a power of 2 */
/* alignment= next power of 2 after size */
res->alignment[arch] = (res->size[arch] & ~(mask >> 1)) << 1;
"scalar type too large");
res->aligned_size[arch] = aligned(res->size[arch], res->alignment[arch]);
"scalar type too large");
res->aligned_size[arch] = aligned(res->size[arch], res->alignment[arch]);
res->category_code = e_gras_datadesc_type_cat_scalar;
res->category.scalar_data.encoding = encoding;
res->category.scalar_data.type = type;
res->category_code = e_gras_datadesc_type_cat_scalar;
res->category.scalar_data.encoding = encoding;
res->category.scalar_data.type = type;
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
return res;
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
return res;
- GRAS_IN3("(%s %s.%s;)",field_type->name,struct_type->name,name);
+ XBT_IN3("(%s %s.%s;)",field_type->name,struct_type->name,name);
if (struct_type->category.struct_data.closed) {
VERB1("Ignoring request to add field to struct %s (closed. Redefinition?)",
struct_type->name);
return;
}
if (struct_type->category.struct_data.closed) {
VERB1("Ignoring request to add field to struct %s (closed. Redefinition?)",
struct_type->name);
return;
}
DEBUG3("Push a %s into %s at offset %ld.",
field_type->name, struct_type->name,field->offset[GRAS_THISARCH]);
DEBUG3("Push a %s into %s at offset %ld.",
field_type->name, struct_type->name,field->offset[GRAS_THISARCH]);
struct_type->size[GRAS_THISARCH],
struct_type->alignment[GRAS_THISARCH],
struct_type->aligned_size[GRAS_THISARCH]);
struct_type->size[GRAS_THISARCH],
struct_type->alignment[GRAS_THISARCH],
struct_type->aligned_size[GRAS_THISARCH]);
gras_datadesc_union(const char *name,
gras_datadesc_type_cb_int_t selector) {
gras_datadesc_union(const char *name,
gras_datadesc_type_cb_int_t selector) {
"Attempt to creat an union without field_count function");
res = gras_datadesc_by_name(name);
if (res) {
/* FIXME: Check that field redefinition matches */
"Attempt to creat an union without field_count function");
res = gras_datadesc_by_name(name);
if (res) {
/* FIXME: Check that field redefinition matches */
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
return res;
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
return res;
- GRAS_IN3("(%s %s.%s;)",field_type->name,union_type->name,name);
- gras_assert1(field_type->size != 0,
+ XBT_IN3("(%s %s.%s;)",field_type->name,union_type->name,name);
+ xbt_assert1(field_type->size != 0,
field->name = (char*)strdup(name);
field->type = field_type;
/* All offset are left to 0 in an union */
field->name = (char*)strdup(name);
field->type = field_type;
/* All offset are left to 0 in an union */
for (arch=0; arch<gras_arch_count; arch ++) {
union_type->size[arch] = max(union_type->size[arch],
for (arch=0; arch<gras_arch_count; arch ++) {
union_type->size[arch] = max(union_type->size[arch],
gras_datadesc_ref(const char *name,
gras_datadesc_type_t referenced_type) {
gras_datadesc_ref(const char *name,
gras_datadesc_type_t referenced_type) {
"Redefinition of %s does not match",name);
VERB1("Discarding redefinition of %s",name);
return res;
"Redefinition of %s does not match",name);
VERB1("Discarding redefinition of %s",name);
return res;
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
return res;
}
res = gras_ddt_new(name);
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
return res;
}
res = gras_ddt_new(name);
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
for (arch=0; arch<gras_arch_count; arch ++) {
res->size[arch] = fixed_size * element_type->aligned_size[arch];
res->alignment[arch] = element_type->alignment[arch];
for (arch=0; arch<gras_arch_count; arch ++) {
res->size[arch] = fixed_size * element_type->aligned_size[arch];
res->alignment[arch] = element_type->alignment[arch];
"'%s' is a dynamic array without size discriminant",
name);
res = gras_datadesc_by_name(name);
if (res) {
"'%s' is a dynamic array without size discriminant",
name);
res = gras_datadesc_by_name(name);
if (res) {
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
"Redefinition of type %s does not match", name);
VERB1("Discarding redefinition of %s",name);
sprintf(name,"%s[]*",element_type->name);
res = gras_datadesc_ref(name,res);
sprintf(name,"%s[]*",element_type->name);
res = gras_datadesc_ref(name,res);
gras_datadesc_import_nws(const char *name,
const DataDescriptor *desc,
unsigned long howmany,
gras_datadesc_import_nws(const char *name,
const DataDescriptor *desc,
unsigned long howmany,
gras_dd_find_field(gras_datadesc_type_t type,
const char *field_name) {
gras_datadesc_type_t sub_type=NULL;
gras_dd_find_field(gras_datadesc_type_t type,
const char *field_name) {
gras_datadesc_type_t sub_type=NULL;
field_array = type->category.struct_data.fields;
} else {
ERROR2("%s (%p) is not a struct nor an union. There is no field.", type->name,(void*)type);
field_array = type->category.struct_data.fields;
} else {
ERROR2("%s (%p) is not a struct nor an union. There is no field.", type->name,(void*)type);
if (!strcmp(field_name,field->name)) {
return field->type;
}
}
ERROR2("No field nammed %s in %s",field_name,type->name);
if (!strcmp(field_name,field->name)) {
return field->type;
}
}
ERROR2("No field nammed %s in %s",field_name,type->name);
} else {
ERROR1("Field %s is not an int, unsigned int, long int neither unsigned long int",
sub_type->name);
} else {
ERROR1("Field %s is not an int, unsigned int, long int neither unsigned long int",
sub_type->name);