mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
[svn-r2262] * 2000-05-18
** src/H5Tconv.c ** src/H5Tpkg.h ** src/H5Tpublic.h The H5T_conv_struct_opt() function had a design flaw -- it didn't keep information about the stride to use to step through the temporary/background-value buffer and thus nested invocations would clobber each other's temp buffers. This was fixed by splitting the `stride' argument into `buf_stride' and `bkg_stride' arguments for all the conversion functions. THIS IS AN API CHANGE, but users will get a compiler warning when they pass their conversion function pointer to H5Tregister(). ** src/H5T.c ** src/H5Tprivate.h Added a bkg_stride argument to the H5T_convert() definition in order to fix a bug related to the optimized compound datatype conversion function. ** src/H5T.c ** src/H5A.c ** src/H5D.c ** src/H5Ofill.c ** src/H5P.c Added bkg_stride=0 argument to the H5T_convert() calls. ** test/dtypes.c Added a test for the H5T_conv_struct_opt() bug fixed above. ** src/H5FL.c The H5FL_term() function should return non-zero even when it couldn't free all the free lists do to their being used by some other package. When that other package terminates it will return non-zero, causing H5FL_term() to be called again. This fixes some of the `infinite loop closing library' messages. ** tools/pdb2hdf Uses print_version() instead of doing that itself. ** src/H5Ppublic.h Renamed H5Pget_gc_reference() declaration to make it match the definition. ** src/H5FDlog.c Added API tracing macros. Removed `const' qualifier from a `char*' member of a struct which was allocated on the heap. ** src/H5TB.c Added curly braces to a couple deeply-nested `if' statements to make them clearer and to shut up the increadibly stupid and just plain incorrect gcc warning about ambiguous `else'. ** test/titerate.c Removed incomplete initialization in favor of memset() for one auto variable to stop compiler warnings. ** tools/Depencencies Regenerated to remove references to h5dumputil.c
This commit is contained in:
parent
356495d126
commit
bc520e88b4
@ -665,7 +665,8 @@ H5A_write(H5A_t *attr, const H5T_t *mem_type, void *buf)
|
||||
}
|
||||
|
||||
/* Perform data type conversion */
|
||||
if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, tconv_buf, bkg_buf, H5P_DEFAULT)<0) {
|
||||
if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, 0, tconv_buf, bkg_buf,
|
||||
H5P_DEFAULT)<0) {
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL,
|
||||
"data type conversion failed");
|
||||
}
|
||||
@ -830,7 +831,8 @@ H5A_read(H5A_t *attr, const H5T_t *mem_type, void *buf)
|
||||
}
|
||||
|
||||
/* Perform data type conversion. */
|
||||
if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, tconv_buf, bkg_buf, H5P_DEFAULT)<0) {
|
||||
if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, 0, tconv_buf, bkg_buf,
|
||||
H5P_DEFAULT)<0) {
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL,
|
||||
"data type conversion failed");
|
||||
}
|
||||
|
@ -1778,7 +1778,7 @@ printf("%s: check 2.0, src_type_size=%d, dst_type_size=%d, target_size=%d, min_e
|
||||
/*
|
||||
* Perform data type conversion.
|
||||
*/
|
||||
if (H5T_convert(tpath, src_id, dst_id, smine_nelmts, 0, tconv_buf,
|
||||
if (H5T_convert(tpath, src_id, dst_id, smine_nelmts, 0, 0, tconv_buf,
|
||||
bkg_buf, dxpl_id)<0) {
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
|
||||
"data type conversion failed");
|
||||
@ -2185,7 +2185,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
|
||||
/*
|
||||
* Perform data type conversion.
|
||||
*/
|
||||
if (H5T_convert(tpath, src_id, dst_id, smine_nelmts, 0, tconv_buf,
|
||||
if (H5T_convert(tpath, src_id, dst_id, smine_nelmts, 0, 0, tconv_buf,
|
||||
bkg_buf, dxpl_id)<0) {
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
|
||||
"data type conversion failed");
|
||||
|
@ -36,7 +36,7 @@ static hid_t H5FD_QAK_g = 0;
|
||||
|
||||
/* Driver-specific file access properties */
|
||||
typedef struct H5FD_log_fapl_t {
|
||||
const char *logfile; /* Log file name */
|
||||
char *logfile; /* Allocated log file name */
|
||||
intn verbosity; /* Verbosity of logging information */
|
||||
} H5FD_log_fapl_t;
|
||||
|
||||
@ -247,7 +247,7 @@ H5FD_log_init(void)
|
||||
* Thursday, February 19, 1998
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
* We copy the LOGFILE value into our own access properties.
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
@ -257,12 +257,12 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, int verbosity)
|
||||
herr_t ret_value=FAIL;
|
||||
|
||||
FUNC_ENTER(H5FD_set_fapl_log, FAIL);
|
||||
H5TRACE1("e","i",fapl_id);
|
||||
H5TRACE3("e","isIs",fapl_id,logfile,verbosity);
|
||||
|
||||
if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id))
|
||||
HRETURN_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a fapl");
|
||||
|
||||
fa.logfile=logfile;
|
||||
fa.logfile = H5MM_strdup(logfile);
|
||||
fa.verbosity=verbosity;
|
||||
ret_value= H5Pset_driver(fapl_id, H5FD_QAK, &fa);
|
||||
|
||||
@ -333,7 +333,7 @@ H5FD_log_fapl_copy(const void *_old_fa)
|
||||
if(old_fa->logfile!=NULL)
|
||||
if (NULL==(new_fa->logfile=HDstrdup(old_fa->logfile)))
|
||||
HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
|
||||
"unable to allocate log file name");
|
||||
"unable to allocate log file name");
|
||||
|
||||
FUNC_LEAVE(new_fa);
|
||||
} /* end H5FD_log_fapl_copy() */
|
||||
@ -363,8 +363,7 @@ H5FD_log_fapl_free(void *_fa)
|
||||
FUNC_ENTER(H5FD_log_fapl_free, FAIL);
|
||||
|
||||
/* Free the fapl information */
|
||||
if(fa->logfile)
|
||||
H5MM_xfree((void *)fa->logfile);
|
||||
H5MM_xfree(fa->logfile);
|
||||
H5MM_xfree(fa);
|
||||
|
||||
FUNC_LEAVE(SUCCEED);
|
||||
|
61
src/H5FL.c
61
src/H5FL.c
@ -322,43 +322,54 @@ H5FL_gc(void)
|
||||
Can't report errors...
|
||||
EXAMPLES
|
||||
REVISION LOG
|
||||
Robb Matzke, 2000-04-25
|
||||
If a list cannot be freed because something is using it then return
|
||||
zero (failure to free a list doesn't affect any other part of the
|
||||
library). If some other layer frees something during its termination
|
||||
it will return non-zero, which will cause this function to get called
|
||||
again to reclaim this layer's memory.
|
||||
--------------------------------------------------------------------------*/
|
||||
static intn
|
||||
H5FL_term(void)
|
||||
{
|
||||
H5FL_gc_list_t *left; /* pointer to garbage collection lists with work left */
|
||||
H5FL_gc_list_t *tmp; /* Temporary pointer to a garbage collection node */
|
||||
|
||||
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
|
||||
left=NULL;
|
||||
while(H5FL_gc_head!=NULL) {
|
||||
tmp=H5FL_gc_head->next;
|
||||
|
||||
if (interface_initialize_g) {
|
||||
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
|
||||
left=NULL;
|
||||
while(H5FL_gc_head!=NULL) {
|
||||
tmp=H5FL_gc_head->next;
|
||||
|
||||
#ifdef H5FL_DEBUG
|
||||
printf("H5FL_term: head->name=%s, head->allocated=%d\n", H5FL_gc_head->list->name,(int)H5FL_gc_head->list->allocated);
|
||||
printf("H5FL_term: head->name=%s, head->allocated=%d\n", H5FL_gc_head->list->name,(int)H5FL_gc_head->list->allocated);
|
||||
#endif /* H5FL_DEBUG */
|
||||
/* Check if the list has allocations outstanding */
|
||||
if(H5FL_gc_head->list->allocated>0) {
|
||||
/* Add free list to the list of nodes with allocations open still */
|
||||
H5FL_gc_head->next=left;
|
||||
left=H5FL_gc_head;
|
||||
} /* end if */
|
||||
/* No allocations left open for list, get rid of it */
|
||||
else {
|
||||
/* Reset the "initialized" flag, in case we restart this list somehow (I don't know how..) */
|
||||
H5FL_gc_head->list->init=0;
|
||||
/* Check if the list has allocations outstanding */
|
||||
if(H5FL_gc_head->list->allocated>0) {
|
||||
/* Add free list to the list of nodes with allocations open still */
|
||||
H5FL_gc_head->next=left;
|
||||
left=H5FL_gc_head;
|
||||
} /* end if */
|
||||
/* No allocations left open for list, get rid of it */
|
||||
else {
|
||||
/* Reset the "initialized" flag, in case we restart this list somehow (I don't know how..) */
|
||||
H5FL_gc_head->list->init=0;
|
||||
|
||||
/* Free the node from the garbage collection list */
|
||||
H5MM_xfree(H5FL_gc_head);
|
||||
} /* end else */
|
||||
/* Free the node from the garbage collection list */
|
||||
H5MM_xfree(H5FL_gc_head);
|
||||
} /* end else */
|
||||
|
||||
H5FL_gc_head=tmp;
|
||||
} /* end while */
|
||||
H5FL_gc_head=tmp;
|
||||
} /* end while */
|
||||
|
||||
/* Point to the list of nodes left with allocations open, if any */
|
||||
H5FL_gc_head=left;
|
||||
|
||||
return (H5FL_gc_head!=NULL ? 1 : 0);
|
||||
/* Point to the list of nodes left with allocations open, if any */
|
||||
H5FL_gc_head=left;
|
||||
if (!left) interface_initialize_g = 0; /*this layer has reached its initial state*/
|
||||
}
|
||||
|
||||
/* Terminating this layer never affects other layers; rather, other layers affect
|
||||
* the termination of this layer. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -361,7 +361,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type)
|
||||
}
|
||||
|
||||
/* Do the conversion */
|
||||
if (H5T_convert(tpath, src_id, dst_id, 1, 0, buf, bkg, H5P_DEFAULT)<0) {
|
||||
if (H5T_convert(tpath, src_id, dst_id, 1, 0, 0, buf, bkg, H5P_DEFAULT)<0) {
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
|
||||
"data type conversion failed");
|
||||
}
|
||||
|
@ -2520,7 +2520,8 @@ H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value/*out*/)
|
||||
HDmemcpy(buf, plist->fill.buf, H5T_get_size(plist->fill.type));
|
||||
|
||||
/* Do the conversion */
|
||||
if (H5T_convert(tpath, src_id, type_id, 1, 0, buf, bkg, H5P_DEFAULT)<0) {
|
||||
if (H5T_convert(tpath, src_id, type_id, 1, 0, 0, buf, bkg,
|
||||
H5P_DEFAULT)<0) {
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
|
||||
"data type conversion failed");
|
||||
}
|
||||
|
@ -118,13 +118,16 @@ __DLL__ herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id,
|
||||
__DLL__ herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id,
|
||||
void *value/*out*/);
|
||||
__DLL__ herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref);
|
||||
__DLL__ herr_t H5Pget_gc_reference(hid_t fapl_id, unsigned *gc_ref/*out*/);
|
||||
__DLL__ herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref/*out*/);
|
||||
__DLL__ herr_t H5Pset_vlen_mem_manager(hid_t plist_id,
|
||||
H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func,
|
||||
void *free_info);
|
||||
H5MM_allocate_t alloc_func,
|
||||
void *alloc_info, H5MM_free_t free_func,
|
||||
void *free_info);
|
||||
__DLL__ herr_t H5Pget_vlen_mem_manager(hid_t plist_id,
|
||||
H5MM_allocate_t *alloc_func, void **alloc_info, H5MM_free_t *free_func,
|
||||
void **free_info);
|
||||
H5MM_allocate_t *alloc_func,
|
||||
void **alloc_info,
|
||||
H5MM_free_t *free_func,
|
||||
void **free_info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
59
src/H5T.c
59
src/H5T.c
@ -1372,7 +1372,7 @@ H5T_term_interface(void)
|
||||
H5T_print_stats(path, &nprint/*in,out*/);
|
||||
path->cdata.command = H5T_CONV_FREE;
|
||||
if ((path->func)(FAIL, FAIL, &(path->cdata),
|
||||
0, 0, NULL, NULL,H5P_DEFAULT)<0) {
|
||||
0, 0, 0, NULL, NULL,H5P_DEFAULT)<0) {
|
||||
#ifdef H5T_DEBUG
|
||||
if (H5DEBUG(T)) {
|
||||
fprintf (H5DEBUG(T), "H5T: conversion function "
|
||||
@ -4173,7 +4173,8 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id,
|
||||
}
|
||||
HDmemset(&cdata, 0, sizeof cdata);
|
||||
cdata.command = H5T_CONV_INIT;
|
||||
if ((func)(tmp_sid, tmp_did, &cdata, 0, 0, NULL, NULL, H5P_DEFAULT)<0) {
|
||||
if ((func)(tmp_sid, tmp_did, &cdata, 0, 0, 0, NULL, NULL,
|
||||
H5P_DEFAULT)<0) {
|
||||
H5I_dec_ref(tmp_sid);
|
||||
H5I_dec_ref(tmp_did);
|
||||
tmp_sid = tmp_did = -1;
|
||||
@ -4189,7 +4190,7 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id,
|
||||
HDstrncpy(new_path->name, name, H5T_NAMELEN);
|
||||
new_path->name[H5T_NAMELEN-1] = '\0';
|
||||
if (NULL==(new_path->src=H5T_copy(old_path->src, H5T_COPY_ALL)) ||
|
||||
NULL==(new_path->dst=H5T_copy(old_path->dst, H5T_COPY_ALL))) {
|
||||
NULL==(new_path->dst=H5T_copy(old_path->dst, H5T_COPY_ALL))) {
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
|
||||
"unable to copy data types");
|
||||
}
|
||||
@ -4205,7 +4206,7 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id,
|
||||
H5T_print_stats(old_path, &nprint);
|
||||
old_path->cdata.command = H5T_CONV_FREE;
|
||||
if ((old_path->func)(tmp_sid, tmp_did, &(old_path->cdata),
|
||||
0, 0, NULL, NULL, H5P_DEFAULT)<0) {
|
||||
0, 0, 0, NULL, NULL, H5P_DEFAULT)<0) {
|
||||
#ifdef H5T_DEBUG
|
||||
if (H5DEBUG(T)) {
|
||||
fprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx "
|
||||
@ -4308,7 +4309,8 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
|
||||
/* Shut down path */
|
||||
H5T_print_stats(path, &nprint);
|
||||
path->cdata.command = H5T_CONV_FREE;
|
||||
if ((path->func)(FAIL, FAIL, &(path->cdata), 0, 0, NULL, NULL, H5P_DEFAULT)<0) {
|
||||
if ((path->func)(FAIL, FAIL, &(path->cdata), 0, 0, 0, NULL, NULL,
|
||||
H5P_DEFAULT)<0) {
|
||||
#ifdef H5T_DEBUG
|
||||
if (H5DEBUG(T)) {
|
||||
fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx failed "
|
||||
@ -4364,8 +4366,9 @@ H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id,
|
||||
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dst is not a data type");
|
||||
}
|
||||
|
||||
if (H5T_unregister(pers,name,src,dst,func)<0)
|
||||
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTDELETE, FAIL, "internal unregister function failed");
|
||||
if (H5T_unregister(pers,name,src,dst,func)<0)
|
||||
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTDELETE, FAIL,
|
||||
"internal unregister function failed");
|
||||
|
||||
FUNC_LEAVE(SUCCEED);
|
||||
}
|
||||
@ -4474,7 +4477,8 @@ H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf,
|
||||
"unable to convert between src and dst data types");
|
||||
}
|
||||
|
||||
if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, buf, background, plist_id)<0) {
|
||||
if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, 0, buf, background,
|
||||
plist_id)<0) {
|
||||
HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL,
|
||||
"data type conversion failed");
|
||||
}
|
||||
@ -6543,7 +6547,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
|
||||
HDstrcpy(H5T_g.path[0]->name, "no-op");
|
||||
H5T_g.path[0]->func = H5T_conv_noop;
|
||||
H5T_g.path[0]->cdata.command = H5T_CONV_INIT;
|
||||
if (H5T_conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), 0, 0,
|
||||
if (H5T_conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), 0, 0, 0,
|
||||
NULL, NULL, H5P_DEFAULT)<0) {
|
||||
#ifdef H5T_DEBUG
|
||||
if (H5DEBUG(T)) {
|
||||
@ -6635,7 +6639,8 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
|
||||
"query");
|
||||
}
|
||||
path->cdata.command = H5T_CONV_INIT;
|
||||
if ((func)(src_id, dst_id, &(path->cdata), 0, 0, NULL, NULL, H5P_DEFAULT)<0) {
|
||||
if ((func)(src_id, dst_id, &(path->cdata), 0, 0, 0, NULL, NULL,
|
||||
H5P_DEFAULT)<0) {
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL,
|
||||
"unable to initialize conversion function");
|
||||
}
|
||||
@ -6667,7 +6672,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
|
||||
}
|
||||
path->cdata.command = H5T_CONV_INIT;
|
||||
if ((H5T_g.soft[i].func) (src_id, dst_id, &(path->cdata),
|
||||
0, 0, NULL, NULL, H5P_DEFAULT)<0) {
|
||||
0, 0, 0, NULL, NULL, H5P_DEFAULT)<0) {
|
||||
HDmemset (&(path->cdata), 0, sizeof(H5T_cdata_t));
|
||||
H5E_clear(); /*ignore the error*/
|
||||
} else {
|
||||
@ -6689,7 +6694,8 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
|
||||
assert(table==H5T_g.path[md]);
|
||||
H5T_print_stats(table, &nprint/*in,out*/);
|
||||
table->cdata.command = H5T_CONV_FREE;
|
||||
if ((table->func)(FAIL, FAIL, &(table->cdata), 0, 0, NULL, NULL, H5P_DEFAULT)<0) {
|
||||
if ((table->func)(FAIL, FAIL, &(table->cdata), 0, 0, 0, NULL, NULL,
|
||||
H5P_DEFAULT)<0) {
|
||||
#ifdef H5T_DEBUG
|
||||
if (H5DEBUG(T)) {
|
||||
fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free "
|
||||
@ -6758,19 +6764,32 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
|
||||
* runtime in addition to compile time.
|
||||
*
|
||||
* Robb Matzke, 1999-06-16
|
||||
* Added support for non-zero strides. If STRIDE is non-zero
|
||||
* Added support for non-zero strides. If BUF_STRIDE is non-zero
|
||||
* then convert one value at each memory location advancing
|
||||
* STRIDE bytes each time; otherwise assume both source and
|
||||
* BUF_STRIDE bytes each time; otherwise assume both source and
|
||||
* destination values are packed.
|
||||
*
|
||||
* Quincey Koziol, 1999-07-01
|
||||
* Added dataset transfer properties, to allow custom VL datatype
|
||||
* allocation function to be passed down to VL conversion routine.
|
||||
* Quincey Koziol, 1999-07-01
|
||||
* Added dataset transfer properties, to allow custom VL
|
||||
* datatype allocation function to be passed down to VL
|
||||
* conversion routine.
|
||||
*
|
||||
* Robb Matzke, 2000-05-17
|
||||
* Added the BKG_STRIDE argument which gets passed to all the
|
||||
* conversion functions. If BUF_STRIDE is non-zero then each
|
||||
* data element is at a multiple of BUF_STRIDE bytes in BUF
|
||||
* (on both input and output). If BKG_STRIDE is also set then
|
||||
* the BKG buffer is used in such a way that temporary space
|
||||
* for each element is aligned on a BKG_STRIDE byte boundary.
|
||||
* If either BUF_STRIDE or BKG_STRIDE are zero then the BKG
|
||||
* buffer will be accessed as though it were a packed array
|
||||
* of destination datatype.
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist)
|
||||
size_t buf_stride, size_t bkg_stride, void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist)
|
||||
{
|
||||
#ifdef H5T_DEBUG
|
||||
H5_timer_t timer;
|
||||
@ -6782,8 +6801,8 @@ H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, size_t nelmts,
|
||||
if (H5DEBUG(T)) H5_timer_begin(&timer);
|
||||
#endif
|
||||
tpath->cdata.command = H5T_CONV_CONV;
|
||||
if ((tpath->func)(src_id, dst_id, &(tpath->cdata), nelmts, stride, buf,
|
||||
bkg, dset_xfer_plist)<0) {
|
||||
if ((tpath->func)(src_id, dst_id, &(tpath->cdata), nelmts, buf_stride,
|
||||
bkg_stride, buf, bkg, dset_xfer_plist)<0) {
|
||||
HRETURN_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL,
|
||||
"data type conversion failed");
|
||||
}
|
||||
|
22
src/H5TB.c
22
src/H5TB.c
@ -711,7 +711,6 @@ H5TB_rem(TBBT_NODE ** root, TBBT_NODE * node, void * *kp)
|
||||
H5FL_FREE(TBBT_NODE,leaf);
|
||||
H5TB_balance(root, par, side, -1);
|
||||
|
||||
done:
|
||||
((TBBT_TREE *) root)->count--;
|
||||
|
||||
FUNC_LEAVE(data);
|
||||
@ -1388,14 +1387,21 @@ H5TB_balance(TBBT_NODE ** root, TBBT_NODE * ptr, intn side, intn added)
|
||||
if (ptr->link[Other(side)] != NULL && ptr->link[Other(side)]->Parent == ptr)
|
||||
{
|
||||
ptr->flags |= (tbbt_flag)TBBT_HEAVY(Other(side)); /* Other side longer */
|
||||
if (ptr->Parent)
|
||||
if (ptr->Parent->Rchild == ptr) /* we're the right child */
|
||||
if (Heavy(ptr->Parent, RIGHT) && LeftCnt(ptr->Parent) == 1)
|
||||
if (ptr->Parent) {
|
||||
if (ptr->Parent->Rchild == ptr) {
|
||||
/* we're the right child */
|
||||
if (Heavy(ptr->Parent, RIGHT) && LeftCnt(ptr->Parent) == 1) {
|
||||
deeper = 0;
|
||||
else
|
||||
/* we're the left child */ if (Heavy(ptr->Parent, LEFT))
|
||||
if (ptr->Parent->Rchild && !UnBal(ptr->Parent->Rchild))
|
||||
deeper = 0;
|
||||
} else {
|
||||
/* we're the left child */
|
||||
if (Heavy(ptr->Parent, LEFT)) {
|
||||
if (ptr->Parent->Rchild && !UnBal(ptr->Parent->Rchild)) {
|
||||
deeper = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
755
src/H5Tconv.c
755
src/H5Tconv.c
File diff suppressed because it is too large
Load Diff
421
src/H5Tpkg.h
421
src/H5Tpkg.h
@ -209,321 +209,518 @@ __DLLVAR__ size_t H5T_NATIVE_UINT_FAST64_ALIGN_g;
|
||||
|
||||
/* Conversion functions */
|
||||
__DLL__ herr_t H5T_conv_noop(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
||||
size_t nelmts, size_t stride, void *buf,
|
||||
void *bkg, hid_t dset_xfer_plist);
|
||||
size_t nelmts, size_t buf_stride,
|
||||
size_t bkg_stride, void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
|
||||
__DLL__ herr_t H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
||||
size_t nelmts, size_t stride, void *_buf,
|
||||
void *bkg, hid_t dset_xfer_plist);
|
||||
size_t nelmts, size_t buf_stride,
|
||||
size_t bkg_stride, void *_buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
||||
size_t nelmts, size_t stride, void *_buf,
|
||||
void *bkg, hid_t dset_xfer_plist);
|
||||
size_t nelmts, size_t buf_stride,
|
||||
size_t bkg_stride, void *_buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_struct_opt(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *_buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *_buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
||||
size_t nelmts, size_t stride, void *buf,
|
||||
void *bkg, hid_t dset_xfer_plist);
|
||||
size_t nelmts, size_t buf_stride,
|
||||
size_t bkg_stride, void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
||||
size_t nelmts, size_t stride, void *buf,
|
||||
void *bkg, hid_t dset_xfer_plist);
|
||||
size_t nelmts, size_t buf_stride,
|
||||
size_t bkg_stride, void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
||||
size_t nelmts, size_t stride, void *_buf,
|
||||
void *bkg, hid_t dset_xfer_plist);
|
||||
size_t nelmts, size_t buf_stride,
|
||||
size_t bkg_stride, void *_buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
||||
size_t nelmts, size_t stride, void *_buf,
|
||||
void *bkg, hid_t dset_xfer_plist);
|
||||
size_t nelmts, size_t buf_stride,
|
||||
size_t bkg_stride, void *_buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
||||
size_t nelmts, size_t stride, void *_buf,
|
||||
void *bkg, hid_t dset_xfer_plist);
|
||||
size_t nelmts, size_t buf_stride,
|
||||
size_t bkg_stride, void *_buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
||||
size_t nelmts, size_t stride, void *_buf,
|
||||
void *bkg, hid_t dset_xfer_plist);
|
||||
size_t nelmts, size_t buf_stride,
|
||||
size_t bkg_stride, void *_buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
|
||||
__DLL__ herr_t H5T_conv_schar_uchar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uchar_schar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_schar_short(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_schar_ushort(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uchar_short(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_schar_int(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_schar_uint(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uchar_int(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uchar_uint(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_schar_long(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_schar_ulong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uchar_long(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uchar_ulong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_schar_llong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_schar_ullong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uchar_ullong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
|
||||
__DLL__ herr_t H5T_conv_short_schar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_short_uchar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ushort_schar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_short_ushort(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ushort_short(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_short_int(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_short_uint(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ushort_int(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ushort_uint(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_short_long(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_short_ulong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ushort_long(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ushort_ulong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_short_llong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_short_ullong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ushort_ullong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
|
||||
__DLL__ herr_t H5T_conv_int_schar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_int_uchar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uint_schar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_int_short(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_int_ushort(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uint_short(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_int_uint(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uint_int(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_int_long(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_int_ulong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uint_long(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uint_ulong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_int_llong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_int_ullong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uint_llong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_uint_ullong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
|
||||
__DLL__ herr_t H5T_conv_long_schar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_long_uchar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ulong_schar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_long_short(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_long_ushort(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ulong_short(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_long_int(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_long_uint(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ulong_int(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_long_ulong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ulong_long(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_long_llong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_long_ullong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ulong_ullong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
|
||||
__DLL__ herr_t H5T_conv_llong_schar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ullong_schar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_llong_short(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ullong_short(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_llong_int(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_llong_uint(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ullong_int(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_llong_long(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ullong_long(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
|
||||
__DLL__ herr_t H5T_conv_float_double(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_double_float(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_conv_i32le_f64le(hid_t src_id, hid_t dst_id,
|
||||
H5T_cdata_t *cdata, size_t nelmts,
|
||||
size_t stride, void *_buf, void *bkg, hid_t dset_xfer_plist);
|
||||
size_t buf_stride, size_t bkg_stride,
|
||||
void *_buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
|
||||
/* Bit twiddling functions */
|
||||
__DLL__ void H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src,
|
||||
|
@ -121,8 +121,8 @@ __DLL__ H5T_path_t *H5T_path_find(const H5T_t *src, const H5T_t *dst,
|
||||
__DLL__ herr_t H5T_sort_value(H5T_t *dt, int *map);
|
||||
__DLL__ herr_t H5T_sort_name(H5T_t *dt, int *map);
|
||||
__DLL__ herr_t H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id,
|
||||
size_t nelmts, size_t stride, void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
size_t nelmts, size_t buf_stride, size_t bkg_stride,
|
||||
void *buf, void *bkg, hid_t dset_xfer_plist);
|
||||
__DLL__ herr_t H5T_set_size(H5T_t *dt, size_t size);
|
||||
__DLL__ herr_t H5T_set_precision(H5T_t *dt, size_t prec);
|
||||
__DLL__ herr_t H5T_set_offset(H5T_t *dt, size_t offset);
|
||||
|
@ -162,8 +162,9 @@ typedef struct {
|
||||
|
||||
/* All data type conversion functions are... */
|
||||
typedef herr_t (*H5T_conv_t) (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
|
||||
size_t nelmts, size_t stride, void *buf,
|
||||
void *bkg, hid_t dset_xfer_plist);
|
||||
size_t nelmts, size_t buf_stride,
|
||||
size_t bkg_stride, void *buf, void *bkg,
|
||||
hid_t dset_xfer_plist);
|
||||
|
||||
/*
|
||||
* If an error occurs during a data type conversion then the function
|
||||
|
102
test/dtypes.c
102
test/dtypes.c
@ -751,7 +751,105 @@ test_compound_4(void)
|
||||
error:
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_compound_5
|
||||
*
|
||||
* Purpose: Many versions of HDF5 have a bug in the optimized compound
|
||||
* datatype conversion function, H5T_conv_struct_opt(), which
|
||||
* is triggered when the top-level type contains a struct
|
||||
* which must undergo a conversion.
|
||||
*
|
||||
* Return: Success: 0
|
||||
*
|
||||
* Failure: number of errors
|
||||
*
|
||||
* Programmer: Robb Matzke
|
||||
* Thursday, June 17, 1999
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
test_compound_5(void)
|
||||
{
|
||||
typedef struct {
|
||||
char name[16];
|
||||
short tdim;
|
||||
short coll_ids[4];
|
||||
} src_type_t;
|
||||
|
||||
typedef struct {
|
||||
char name[16];
|
||||
short tdim;
|
||||
int coll_ids[4];
|
||||
} dst_type_t;
|
||||
|
||||
hsize_t dims[1] = {4};
|
||||
hid_t src_type, dst_type, short_array, int_array, string;
|
||||
src_type_t src[2] = {{"one", 102, {104, 105, 106, 107}},
|
||||
{"two", 202, {204, 205, 206, 207}}};
|
||||
|
||||
dst_type_t *dst;
|
||||
void *buf = calloc(2, sizeof(dst_type_t));
|
||||
void *bkg = calloc(2, sizeof(dst_type_t));
|
||||
|
||||
#if 1
|
||||
TESTING("optimized struct converter");
|
||||
#else
|
||||
/* Turn off optimized compound conversion function to work around
|
||||
* the problem. */
|
||||
TESTING("optimized struct converter bug workaround");
|
||||
H5Tunregister(H5T_PERS_DONTCARE, "struct(opt)", -1, -1, NULL);
|
||||
#endif
|
||||
|
||||
/* Build datatypes */
|
||||
short_array = H5Tcreate(H5T_COMPOUND, 4*sizeof(short));
|
||||
H5Tinsert_array(short_array, "_", 0, 1, dims, NULL, H5T_NATIVE_SHORT);
|
||||
|
||||
int_array = H5Tcreate(H5T_COMPOUND, 4*sizeof(int));
|
||||
H5Tinsert_array(int_array, "_", 0, 1, dims, NULL, H5T_NATIVE_INT);
|
||||
|
||||
string = H5Tcopy(H5T_C_S1);
|
||||
H5Tset_size(string, 16);
|
||||
|
||||
src_type = H5Tcreate(H5T_COMPOUND, sizeof(src_type_t));
|
||||
H5Tinsert(src_type, "name", HOFFSET(src_type_t, name), string );
|
||||
H5Tinsert(src_type, "tdim", HOFFSET(src_type_t, tdim), H5T_NATIVE_SHORT);
|
||||
H5Tinsert(src_type, "coll_ids", HOFFSET(src_type_t, coll_ids), short_array );
|
||||
|
||||
dst_type = H5Tcreate(H5T_COMPOUND, sizeof(dst_type_t));
|
||||
H5Tinsert(dst_type, "name", HOFFSET(dst_type_t, name), string );
|
||||
H5Tinsert(dst_type, "tdim", HOFFSET(dst_type_t, tdim), H5T_NATIVE_SHORT);
|
||||
H5Tinsert(dst_type, "coll_ids", HOFFSET(dst_type_t, coll_ids), int_array );
|
||||
|
||||
/* Convert data */
|
||||
memcpy(buf, src, sizeof(src));
|
||||
H5Tconvert(src_type, dst_type, 2, buf, bkg, H5P_DEFAULT);
|
||||
dst = (dst_type_t*)buf;
|
||||
|
||||
/* Cleanup */
|
||||
H5Tclose(src_type);
|
||||
H5Tclose(dst_type);
|
||||
H5Tclose(string);
|
||||
H5Tclose(short_array);
|
||||
H5Tclose(int_array);
|
||||
|
||||
/* Check results */
|
||||
if (memcmp(src[1].name, dst[1].name, sizeof(src[1].name)) ||
|
||||
src[1].tdim!=dst[1].tdim ||
|
||||
src[1].coll_ids[0]!=dst[1].coll_ids[0] ||
|
||||
src[1].coll_ids[1]!=dst[1].coll_ids[1] ||
|
||||
src[1].coll_ids[2]!=dst[1].coll_ids[2] ||
|
||||
src[1].coll_ids[3]!=dst[1].coll_ids[3]) {
|
||||
FAILED();
|
||||
return 1;
|
||||
}
|
||||
PASSED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -1589,7 +1687,8 @@ test_conv_bitfield(void)
|
||||
*/
|
||||
static herr_t
|
||||
convert_opaque(hid_t UNUSED st, hid_t UNUSED dt, H5T_cdata_t *cdata,
|
||||
size_t UNUSED nelmts, size_t UNUSED stride, void UNUSED *_buf,
|
||||
size_t UNUSED nelmts, size_t UNUSED buf_stride,
|
||||
size_t UNUSED bkg_stride, void UNUSED *_buf,
|
||||
void UNUSED *bkg, hid_t UNUSED dset_xfer_plid)
|
||||
{
|
||||
if (H5T_CONV_CONV==cdata->command) num_opaque_conversions_g++;
|
||||
@ -3570,6 +3669,7 @@ main(void)
|
||||
nerrors += test_compound_2();
|
||||
nerrors += test_compound_3();
|
||||
nerrors += test_compound_4();
|
||||
nerrors += test_compound_5();
|
||||
nerrors += test_conv_int ();
|
||||
nerrors += test_conv_enum_1();
|
||||
nerrors += test_conv_bitfield();
|
||||
|
@ -425,7 +425,7 @@ static void test_iter_group_large(void)
|
||||
hsize_t dims[] = {SPACE1_DIM1};
|
||||
herr_t ret; /* Generic return value */
|
||||
char gname[20]; /* Temporary group name */
|
||||
iter_info names[NGROUPS+2]={0}; /* Names of objects in the root group */
|
||||
iter_info names[NGROUPS+2]; /* Names of objects in the root group */
|
||||
iter_info *curr_name; /* Pointer to the current name in the root group */
|
||||
int i;
|
||||
|
||||
@ -436,6 +436,8 @@ static void test_iter_group_large(void)
|
||||
float c;
|
||||
} s1_t;
|
||||
|
||||
memset(names, 0, sizeof names);
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Large Group Iteration Functionality\n"));
|
||||
|
||||
|
@ -243,39 +243,6 @@ h5dump.lo: \
|
||||
$(top_srcdir)/src/H5FDmulti.h \
|
||||
$(top_srcdir)/src/H5private.h \
|
||||
$(top_builddir)/src/H5config.h
|
||||
h5dumputil.lo: \
|
||||
$(srcdir)/h5dump.h \
|
||||
$(top_srcdir)/src/hdf5.h \
|
||||
$(top_srcdir)/src/H5public.h \
|
||||
$(top_builddir)/src/H5pubconf.h \
|
||||
$(top_srcdir)/src/H5api_adpt.h \
|
||||
$(top_srcdir)/src/H5Ipublic.h \
|
||||
$(top_srcdir)/src/H5Apublic.h \
|
||||
$(top_srcdir)/src/H5ACpublic.h \
|
||||
$(top_srcdir)/src/H5Bpublic.h \
|
||||
$(top_srcdir)/src/H5Dpublic.h \
|
||||
$(top_srcdir)/src/H5Epublic.h \
|
||||
$(top_srcdir)/src/H5Fpublic.h \
|
||||
$(top_srcdir)/src/H5FDpublic.h \
|
||||
$(top_srcdir)/src/H5Gpublic.h \
|
||||
$(top_srcdir)/src/H5HGpublic.h \
|
||||
$(top_srcdir)/src/H5HLpublic.h \
|
||||
$(top_srcdir)/src/H5MMpublic.h \
|
||||
$(top_srcdir)/src/H5Opublic.h \
|
||||
$(top_srcdir)/src/H5Ppublic.h \
|
||||
$(top_srcdir)/src/H5Zpublic.h \
|
||||
$(top_srcdir)/src/H5Rpublic.h \
|
||||
$(top_srcdir)/src/H5RApublic.h \
|
||||
$(top_srcdir)/src/H5Spublic.h \
|
||||
$(top_srcdir)/src/H5Tpublic.h \
|
||||
$(top_srcdir)/src/H5FDcore.h \
|
||||
$(top_srcdir)/src/H5FDfamily.h \
|
||||
$(top_srcdir)/src/H5FDmpio.h \
|
||||
$(top_srcdir)/src/H5FDsec2.h \
|
||||
$(top_srcdir)/src/H5FDstdio.h \
|
||||
$(top_srcdir)/src/H5FDgass.h \
|
||||
$(top_srcdir)/src/H5FDdpss.h \
|
||||
$(top_srcdir)/src/H5FDmulti.h
|
||||
h5toh4.lo: \
|
||||
$(srcdir)/h5toh4.c \
|
||||
$(srcdir)/h5toh4.h \
|
||||
|
@ -96,13 +96,11 @@ usage: %s [OPTIONS] [PDBFILE ...]\n\
|
||||
static void
|
||||
version(const char *arg0)
|
||||
{
|
||||
char *progname;
|
||||
const char *progname;
|
||||
|
||||
if ((progname=strrchr(arg0, '/')) && progname[1]) progname++;
|
||||
else progname = arg0;
|
||||
|
||||
printf("This is %s version %u.%u release %u\n",
|
||||
progname, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE);
|
||||
print_version(progname);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user