1
1

Change the type of the fields to size-defined types (like u_int32_t or int32t).

This commit was SVN r1094.
Этот коммит содержится в:
George Bosilca 2004-04-27 18:10:18 +00:00
родитель 4e1709241a
Коммит 2b34654b62

Просмотреть файл

@ -24,7 +24,7 @@
/* if there are more basic datatypes than the number of bytes in the int type /* if there are more basic datatypes than the number of bytes in the int type
* the bdt_used field of the data description struct should be changed to long. * the bdt_used field of the data description struct should be changed to long.
*/ */
#define DT_MAX_PREDEFINED 0x25 #define DT_MAX_PREDEFINED 0x2A
#define DT_INCREASE_STACK 32 #define DT_INCREASE_STACK 32
@ -32,16 +32,16 @@
* by a set of basic elements. * by a set of basic elements.
*/ */
typedef struct __dt_elem_desc { typedef struct __dt_elem_desc {
unsigned short flags; /**< flags for the record */ u_int16_t flags; /**< flags for the record */
unsigned short type; /**< the basic data type id */ u_int16_t type; /**< the basic data type id */
unsigned int count; /**< number of elements */ u_int32_t count; /**< number of elements */
long disp; /**< displacement of the first element */ long disp; /**< displacement of the first element */
unsigned int extent; /**< extent of each element */ u_int32_t extent; /**< extent of each element */
} dt_elem_desc_t; } dt_elem_desc_t;
typedef struct __dt_struct_desc { typedef struct __dt_struct_desc {
int length; /* the maximum number of elements in the description array */ int32_t length; /* the maximum number of elements in the description array */
int used; /* the number of used elements in the description array */ int32_t used; /* the number of used elements in the description array */
dt_elem_desc_t* desc; dt_elem_desc_t* desc;
} dt_type_desc_t; } dt_type_desc_t;
@ -49,17 +49,17 @@ typedef struct __dt_struct_desc {
*/ */
typedef struct lam_datatype_t { typedef struct lam_datatype_t {
lam_object_t super; /**< basic superclass */ lam_object_t super; /**< basic superclass */
unsigned int size; /**< total size in bytes of the memory used by the data if u_int32_t size; /**< total size in bytes of the memory used by the data if
* the data is put on a contiguous buffer */ * the data is put on a contiguous buffer */
long true_lb; long true_lb;
long true_ub; /**< the true ub of the data without user defined lb and ub */ long true_ub; /**< the true ub of the data without user defined lb and ub */
unsigned int align; /**< data should be aligned to */ u_int32_t align; /**< data should be aligned to */
long lb; /**< lower bound in memory */ long lb; /**< lower bound in memory */
long ub; /**< upper bound in memory */ long ub; /**< upper bound in memory */
unsigned short flags; /**< the flags */ u_int16_t flags; /**< the flags */
unsigned short id; /**< data id, normally the index in the data array. */ u_int16_t id; /**< data id, normally the index in the data array. */
unsigned int nbElems; /**< total number of elements inside the datatype */ u_int32_t nbElems; /**< total number of elements inside the datatype */
unsigned long long bdt_used; /**< which basic datatypes are used in the data description */ u_int64_t bdt_used; /**< which basic datatypes are used in the data description */
/* Attribute fields */ /* Attribute fields */
lam_hash_table_t *d_keyhash; lam_hash_table_t *d_keyhash;
@ -72,7 +72,7 @@ typedef struct lam_datatype_t {
/* basic elements count used to compute the size of the datatype for /* basic elements count used to compute the size of the datatype for
* remote nodes */ * remote nodes */
unsigned int btypes[DT_MAX_PREDEFINED]; u_int32_t btypes[DT_MAX_PREDEFINED];
} dt_desc_t, lam_datatype_t; } dt_desc_t, lam_datatype_t;
OBJ_CLASS_DECLARATION( lam_datatype_t ); OBJ_CLASS_DECLARATION( lam_datatype_t );
@ -150,13 +150,13 @@ struct lam_convertor_t {
dt_stack_t* pStack; dt_stack_t* pStack;
/* the convertor functions pointer */ /* the convertor functions pointer */
/* the local stack for the actual conversion */ /* the local stack for the actual conversion */
int converted; /* the number of already converted elements */ int32_t converted; /* the number of already converted elements */
int bConverted; /* the size of already converted elements in bytes */ int32_t bConverted; /* the size of already converted elements in bytes */
unsigned int flags; u_int32_t flags;
unsigned int count; u_int32_t count;
unsigned int stack_pos; u_int32_t stack_pos;
char* pBaseBuf; char* pBaseBuf;
unsigned int available_space; u_int32_t available_space;
void* freebuf; void* freebuf;
convertor_advance_fct_t fAdvance; convertor_advance_fct_t fAdvance;
conversion_fct_t* pFunctions; conversion_fct_t* pFunctions;