- obsolete hdf5_xyz() functions replaced
- adapted to coding style
This commit is contained in:
@@ -461,6 +461,7 @@ src/include/h5core/h5_attribs.h -text
|
||||
src/include/h5core/h5_core.h -text
|
||||
src/include/h5core/h5_errno.h -text
|
||||
src/include/h5core/h5_errorhandling.h -text
|
||||
src/include/h5core/h5_hdf5.h -text
|
||||
src/include/h5core/h5_maps.h -text
|
||||
src/include/h5core/h5_openclose.h -text
|
||||
src/include/h5core/h5_readwrite.h -text
|
||||
|
||||
@@ -10,6 +10,7 @@ EXTRA_HEADERS = \
|
||||
../include/h5core/h5_attribs.h \
|
||||
../include/h5core/h5_core.h \
|
||||
../include/h5core/h5_errorhandling.h \
|
||||
../include/h5core/h5_hdf5.h \
|
||||
../include/h5core/h5_maps.h \
|
||||
../include/h5core/h5_openclose.h \
|
||||
../include/h5core/h5_readwrite.h \
|
||||
@@ -24,7 +25,6 @@ EXTRA_HEADERS = \
|
||||
../include/h5core/h5t_storemesh.h \
|
||||
../include/h5core/h5t_tags.h \
|
||||
../include/h5core/h5u_readwrite.h \
|
||||
../include/h5core/hdf5_misc.h \
|
||||
h5_errorhandling_private.h \
|
||||
h5_fcmp_private.h \
|
||||
h5_hdf5_private.h \
|
||||
@@ -98,8 +98,7 @@ libH5Core_a_SOURCES = \
|
||||
h5t_trim_adjacencies.c \
|
||||
h5t_trim_retrieve.c \
|
||||
h5t_trim_store.c \
|
||||
h5u_readwrite.c \
|
||||
hdf5_misc.c
|
||||
h5u_readwrite.c
|
||||
|
||||
libH5Core_a_DEPENDENCIES = $(EXTRA_HEADERS)
|
||||
|
||||
|
||||
+463
-242
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
#ifndef __H5_HDF5_H
|
||||
#define __H5_HDF5_H
|
||||
#ifndef __H5_HDF5_PRIVATE_H
|
||||
#define __H5_HDF5_PRIVATE_H
|
||||
|
||||
/*** group ***/
|
||||
hid_t
|
||||
@@ -35,12 +35,14 @@ h5priv_get_num_objs_in_hdf5_group (
|
||||
const hid_t group_id
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5priv_get_objname_by_idx_in_hdf5_group (
|
||||
h5_file_t * const f,
|
||||
ssize_t
|
||||
h5priv_get_hdf5_objname_by_idx (
|
||||
h5_file_t* const f,
|
||||
hid_t loc_id,
|
||||
hsize_t idx,
|
||||
char **name );
|
||||
char *name,
|
||||
size_t size
|
||||
);
|
||||
|
||||
/*** dataset ***/
|
||||
hid_t
|
||||
@@ -334,4 +336,5 @@ h5priv_delete_hdf5_link (
|
||||
const char *name,
|
||||
hid_t lapl_id
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
+23
-26
@@ -11,21 +11,18 @@
|
||||
*/
|
||||
h5_size_t
|
||||
h5t_get_num_meshes (
|
||||
h5_file_t * const f,
|
||||
h5_file_t* const f,
|
||||
const enum h5_oid type_id
|
||||
) {
|
||||
struct h5t_fdata *t = f->t;
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if ( t->num_meshes >= 0 ) {
|
||||
if (t->num_meshes >= 0) {
|
||||
return t->num_meshes;
|
||||
}
|
||||
if ( t->topo_gid < 0 ) {
|
||||
TRY( h5tpriv_open_topo_group ( f ) );
|
||||
if (t->topo_gid < 0) {
|
||||
TRY( h5tpriv_open_topo_group (f) );
|
||||
}
|
||||
TRY( t->num_meshes = (h5_size_t)hdf5_get_num_objects (
|
||||
t->topo_gid,
|
||||
h5tpriv_meshes_grpnames[type_id],
|
||||
H5G_GROUP ) );
|
||||
TRY( t->num_meshes = h5_get_num_hdf5_groups (f, t->meshes_gid) );
|
||||
|
||||
return t->num_meshes;
|
||||
}
|
||||
@@ -39,12 +36,12 @@ h5t_get_num_meshes (
|
||||
*/
|
||||
h5_size_t
|
||||
h5t_get_num_levels (
|
||||
h5_file_t * const f
|
||||
h5_file_t* const f
|
||||
) {
|
||||
h5t_fdata_t *t = f->t;
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if ( t->cur_mesh < 0 ) {
|
||||
return h5tpriv_error_undef_mesh ( f );
|
||||
if (t->cur_mesh < 0) {
|
||||
return h5tpriv_error_undef_mesh (f);
|
||||
}
|
||||
return t->num_levels;
|
||||
}
|
||||
@@ -58,7 +55,7 @@ h5t_get_num_levels (
|
||||
*/
|
||||
h5_id_t
|
||||
h5t_get_level (
|
||||
h5_file_t * f
|
||||
h5_file_t* const f
|
||||
) {
|
||||
return f->t->cur_level;
|
||||
}
|
||||
@@ -78,16 +75,16 @@ h5t_get_level (
|
||||
*/
|
||||
h5_size_t
|
||||
h5t_get_num_elems (
|
||||
h5_file_t * const f,
|
||||
h5_file_t* const f,
|
||||
const h5_id_t cnode
|
||||
) {
|
||||
h5t_fdata_t *t = f->t;
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if ( t->cur_mesh < 0 ) {
|
||||
return h5tpriv_error_undef_mesh ( f );
|
||||
if (t->cur_mesh < 0) {
|
||||
return h5tpriv_error_undef_mesh (f);
|
||||
}
|
||||
if ( t->cur_level < 0 ) {
|
||||
return h5tpriv_error_undef_level ( f );
|
||||
if (t->cur_level < 0) {
|
||||
return h5tpriv_error_undef_level (f);
|
||||
}
|
||||
return t->num_elems_on_level[t->cur_level];
|
||||
}
|
||||
@@ -107,16 +104,16 @@ h5t_get_num_elems (
|
||||
*/
|
||||
h5_size_t
|
||||
h5t_get_num_vertices (
|
||||
h5_file_t * f,
|
||||
h5_file_t* const f,
|
||||
h5_id_t cnode
|
||||
) {
|
||||
h5t_fdata_t *t = f->t;
|
||||
h5t_fdata_t* t = f->t;
|
||||
|
||||
if ( t->cur_mesh < 0 ) {
|
||||
return h5tpriv_error_undef_mesh ( f );
|
||||
if (t->cur_mesh < 0) {
|
||||
return h5tpriv_error_undef_mesh (f);
|
||||
}
|
||||
if ( t->cur_level < 0 ) {
|
||||
return h5tpriv_error_undef_level ( f );
|
||||
if (t->cur_level < 0) {
|
||||
return h5tpriv_error_undef_level (f);
|
||||
}
|
||||
return t->num_vertices[t->cur_level];
|
||||
}
|
||||
|
||||
+10
-14
@@ -90,12 +90,11 @@ h5u_get_num_elems (
|
||||
"%s#%0*lld",
|
||||
f->prefix_step_name, f->width_step_idx, (long long) f->step_idx );
|
||||
|
||||
TRY( hdf5_get_object_name (
|
||||
f->file,
|
||||
step_name,
|
||||
H5G_DATASET,
|
||||
0,
|
||||
dataset_name, sizeof (dataset_name) ) );
|
||||
TRY( h5_get_hdf5_datasetname_by_idx (
|
||||
f,
|
||||
f->step_gid,
|
||||
0,
|
||||
dataset_name, sizeof (dataset_name)) );
|
||||
TRY( dataset_id = h5priv_open_hdf5_dataset ( f, f->step_gid, dataset_name ) );
|
||||
TRY( space_id = _get_diskshape_for_reading ( f, dataset_id ) );
|
||||
|
||||
@@ -456,14 +455,11 @@ h5u_get_dataset_info (
|
||||
h5_int64_t *nelem /*!< [out] Number of elements. */
|
||||
) {
|
||||
|
||||
h5_int64_t herr = hdf5_get_object_name (
|
||||
f->file,
|
||||
f->step_name,
|
||||
H5G_DATASET,
|
||||
idx,
|
||||
dataset_name,
|
||||
len_dataset_name );
|
||||
if ( herr < 0 ) return herr;
|
||||
TRY( h5_get_hdf5_datasetname_by_idx (
|
||||
f,
|
||||
f->step_gid,
|
||||
idx,
|
||||
dataset_name, len_dataset_name) );
|
||||
|
||||
if ( nelem ) {
|
||||
*nelem = h5u_get_num_elems ( f );
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
#include "h5_attribs.h"
|
||||
#include "h5_errorhandling.h"
|
||||
#include "h5_hdf5.h"
|
||||
#include "h5_maps.h"
|
||||
#include "h5_openclose.h"
|
||||
#include "h5_readwrite.h"
|
||||
#include "h5u_readwrite.h"
|
||||
#include "hdf5_misc.h"
|
||||
|
||||
#include "h5t_core.h"
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#ifndef __H5_HDF5_H
|
||||
#define __H5_HDF5_H
|
||||
|
||||
ssize_t
|
||||
h5_get_num_hdf5_groups (
|
||||
h5_file_t* const f,
|
||||
const hid_t loc_id
|
||||
);
|
||||
|
||||
ssize_t
|
||||
h5_get_num_hdf5_groups_matching_prefix (
|
||||
h5_file_t* const f,
|
||||
const hid_t loc_id,
|
||||
char* prefix
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_get_hdf5_groupname_by_idx (
|
||||
h5_file_t* const f,
|
||||
hid_t loc_id,
|
||||
hsize_t idx,
|
||||
char *name,
|
||||
size_t size
|
||||
);
|
||||
|
||||
ssize_t
|
||||
h5_get_num_hdf5_datasets (
|
||||
h5_file_t* const f,
|
||||
const hid_t loc_id
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_get_hdf5_datasetname_by_idx (
|
||||
h5_file_t* const f,
|
||||
hid_t loc_id,
|
||||
hsize_t idx,
|
||||
char *name,
|
||||
size_t size
|
||||
);
|
||||
|
||||
const char *
|
||||
h5_get_objname (
|
||||
hid_t id
|
||||
);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user