public header files moved to ../include/h5core

This commit is contained in:
2010-04-22 11:49:38 +00:00
parent 17426706fc
commit d24ae27e47
20 changed files with 19 additions and 19 deletions
+39
View File
@@ -0,0 +1,39 @@
#ifndef __H5_ATTRIBS_H
#define __H5_ATTRIBS_H
h5_int64_t
h5_read_attrib (
h5_file_t * const f,
hid_t id,
const char *attrib_name,
void *attrib_value
);
h5_int64_t
h5_write_attrib (
h5_file_t * const f,
hid_t id,
const char *attrib_name,
const hid_t attrib_type,
const void *attrib_value,
const hsize_t attrib_nelem
);
h5_int64_t
h5_get_attrib_info (
h5_file_t * const f,
hid_t id,
const h5_int64_t attrib_idx,
char *attrib_name,
const h5_int64_t len_attrib_name,
h5_int64_t *attrib_type,
h5_int64_t *attrib_nelem
);
h5_ssize_t
h5_get_num_attribs (
h5_file_t * constf,
hid_t id
);
#endif
+17
View File
@@ -0,0 +1,17 @@
#ifndef __H5_CORE_H
#define __H5_CORE_H
#include "h5_types.h"
#include "h5_errno.h"
#include "h5_attribs.h"
#include "h5_errorhandling.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"
#endif
+24
View File
@@ -0,0 +1,24 @@
#ifndef __H5_ERRNO_H
#define __H5_ERRNO_H
#define H5_SUCCESS 0
#define H5_OK H5_SUCCESS
#define H5_NOK -1
#define H5_ERR -2
#define H5_ERR_BADF -9
#define H5_ERR_NOMEM -12
#define H5_ERR_INVAL -22
#define H5_ERR_BADFD -77
#define H5_ERR_LAYOUT -100
#define H5_ERR_NOENT -101
#define H5_ERR_INIT -200
#define H5_ERR_NOENTRY -201
#define H5_ERR_MPI -201
#define H5_ERR_HDF5 -202
#define H5_ERR_INTERNAL -253
#define H5_ERR_NOT_IMPLEMENTED -254
#endif
+160
View File
@@ -0,0 +1,160 @@
#ifndef __H5_ERRORHANDLING_H
#define __H5_ERRORHANDLING_H
#define SET_FNAME( f, fname ) h5_set_funcname( f, fname );
#define CHECK_FILEHANDLE( f ) \
if ( h5_check_filehandle ( f ) != H5_SUCCESS ) \
return h5_get_errno( f );
#define CHECK_WRITABLE_MODE( f ) \
if ( f->mode==H5_O_RDONLY ) \
return h5_error ( \
f, \
H5_ERR_INVAL, \
"Attempting to write to read-only file" );
#define CHECK_READONLY_MODE( f ) \
if ( ! f->mode==H5_O_RDONLY ) \
return h5_error ( \
f, \
H5_ERR_INVAL, \
"Operation is not allowed on writable files." );
#define CHECK_TIMEGROUP( f ) \
if ( f->step_gid <= 0 ) \
return h5_error ( \
f, \
H5_ERR_INVAL, \
"Internal error: step_gid <= 0.");
h5_err_t
h5_set_debuglevel (
h5_id_t debuglevel
);
h5_err_t
h5_get_debuglevel (
void
);
h5_err_t
h5_set_errorhandler (
h5_errorhandler_t errorhandler
);
h5_errorhandler_t
h5_get_errorhandler (
void
);
h5_err_t
h5_get_errno (
h5_file_t * const f
);
void
h5_set_errno (
h5_file_t * const f,
h5_err_t h5_errno
);
h5_err_t
h5_report_errorhandler (
h5_file_t * const f,
const char *fmt,
va_list ap
);
h5_err_t
h5_abort_errorhandler (
h5_file_t * const f,
const char *fmt,
va_list ap
) ;
h5_err_t
h5_error (
h5_file_t * const f,
h5_err_t error_no,
const char *fmt,
...
)
#ifdef __GNUC__
__attribute__ ((format (printf, 3, 4)))
#endif
;
void
h5_verror (
h5_file_t * const f,
const char *fmt,
va_list ap
);
void
h5_vwarn (
h5_file_t * const f,
const char *fmt,
va_list ap
);
void
h5_warn (
h5_file_t * const f,
const char *fmt,
...
)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)))
#endif
;
void
h5_vinfo (
h5_file_t * const f,
const char *fmt,
va_list ap
);
void
h5_info (
h5_file_t * const f,
const char *fmt,
...
)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)))
#endif
;
void
h5_vdebug (
h5_file_t * const f,
const char *fmt,
va_list ap
);
void
h5_debug (
h5_file_t * const f,
const char *fmt,
...
)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)))
#endif
;
void
h5_set_funcname (
h5_file_t * const f,
const char * const fname
);
const char *
h5_get_funcname (
h5_file_t * const f
);
#endif
+103
View File
@@ -0,0 +1,103 @@
#ifndef __H5_MAPS_H
#define __H5_MAPS_H
h5_err_t
h5priv_alloc_idlist (
h5_file_t * const f,
h5_idlist_t **list,
const h5_size_t size
);
h5_err_t
h5priv_free_idlist (
h5_file_t * const f,
h5_idlist_t **list
);
h5_err_t
h5priv_alloc_idlist_items (
h5_file_t * const f,
h5_idlist_t *list,
const h5_size_t size
);
h5_err_t
h5priv_free_idlist_items (
h5_file_t * const f,
h5_idlist_t *list
);
h5_err_t
h5priv_append_to_idlist (
h5_file_t * const f,
h5_idlist_t *list,
h5_id_t id
);
int
h5priv_cmp_ids_by_eid (
const void *_id1,
const void *_id2
);
int
h5priv_cmp_ids (
const void *_id1,
const void *_id2
);
h5_err_t
h5priv_sort_idlist_by_eid (
h5_file_t * const f,
h5_idlist_t *list
);
h5_id_t
h5priv_find_idlist (
h5_file_t * const f,
h5_idlist_t *list,
h5_id_t item
);
h5_id_t
h5priv_insert_idlist (
h5_file_t * const f,
h5_idlist_t *list,
h5_id_t item,
h5_id_t idx
);
h5_id_t
h5priv_search_idlist (
h5_file_t * const f,
h5_idlist_t *list,
h5_id_t item
);
h5_err_t
h5priv_alloc_idmap (
h5_file_t * const f,
h5_idmap_t *map,
const h5_size_t size
);
h5_err_t
h5priv_insert_idmap (
h5_file_t * const f,
h5_idmap_t *map,
h5_id_t global_id,
h5_id_t local_id
);
h5_id_t
h5priv_search_idmap (
h5_idmap_t *map,
h5_id_t value
);
h5_err_t
h5priv_sort_idmap (
h5_idmap_t *map
);
#endif
+62
View File
@@ -0,0 +1,62 @@
#ifndef __H5_OPENCLOSE_H
#define __H5_OPENCLOSE_H
h5_file_t *
h5_open_file (
const char *filename,
h5_int32_t flags,
MPI_Comm comm,
const char *funcname
);
h5_int64_t
h5_check_filehandle (
h5_file_t * const f
);
h5_int64_t
h5_close_file (
h5_file_t * const f
);
h5_int64_t
h5_set_stepname_fmt (
h5_file_t * const f,
const char *name,
const h5_int64_t width
);
h5_err_t
h5_get_stepname_fmt (
h5_file_t * const f,
char *name,
const h5_size_t l_name,
h5_size_t *width
);
h5_err_t
h5priv_close_step (
h5_file_t * const f
);
h5_int64_t
h5_has_step (
h5_file_t * const f,
h5_int64_t step
);
h5_int64_t
h5_get_step (
h5_file_t * const f
);
h5_err_t
h5_start_traverse_steps (
h5_file_t * f /*!< file handle */
);
h5_err_t
h5_traverse_steps (
h5_file_t * f /*!< file handle */
);
#endif
+40
View File
@@ -0,0 +1,40 @@
#ifndef __H5_READWRITE_H
#define __H5_READWRITE_H
h5_int64_t
h5_write_data (
h5_file_t *f,
const char *name,
const void *array,
const hid_t type_id,
const hid_t group_id,
const hid_t memspace_id,
const hid_t diskspace_id
) ;
h5_int64_t
h5_set_step (
h5_file_t * const f,
const h5_int64_t step /*!< [in] Time-step to set. */
);
hid_t
h5_normalize_h5_type (
h5_file_t * const f,
hid_t type
);
h5_int64_t
h5_get_dataset_type(
h5_file_t * const f,
hid_t group_id,
const char *dataset_name
);
h5_int64_t
h5_has_index (
h5_file_t * const f, /*!< [in] Handle to open file */
h5_int64_t step /*!< [in] Step number to query */
);
#endif
+128
View File
@@ -0,0 +1,128 @@
#ifndef __H5_TYPES_H
#define __H5_TYPES_H
#include <hdf5.h>
/*
file modes:
H5_O_RDONLY: only reading allowed
H5_O_WRONLY: create new file, dataset must not exist
H5_O_APPEND: allows to append a new datasets to an existing file
H5_O_RDWR: dataset may exist
*/
#define H5_O_RDWR 0
#define H5_O_RDONLY 1
#define H5_O_WRONLY 2
#define H5_O_APPEND 3
#define H5_ID_T H5T_NATIVE_INT64
#define H5_FLOAT64_T H5T_NATIVE_DOUBLE
#define H5_FLOAT32_T H5T_NATIVE_FLOAT
#define H5_INT64_T H5T_NATIVE_INT64
#define H5_INT32_T H5T_NATIVE_INT32
#define H5_COMPOUND_T H5T_COMPOUND
extern const char * const H5_O_MODES[];
#ifdef WIN32
typedef __int64 int64_t;
#endif /* WIN32 */
typedef int64_t h5_int64_t;
typedef int32_t h5_int32_t;
typedef int64_t h5_id_t;
typedef uint64_t h5_size_t; /* size in number of elements */
typedef int64_t h5_ssize_t; /* size in number of elements */
typedef int64_t h5_err_t;
typedef double h5_float64_t;
typedef float h5_float32_t;
typedef struct h5_complex {
h5_float64_t r,i;
} h5_complex_t;
typedef h5_id_t h5_2id_t[2];
typedef h5_id_t h5_3id_t[3];
typedef h5_id_t h5_4id_t[4];
typedef h5_float64_t h5_coord3d_t[3];
struct h5_file;
typedef h5_err_t (*h5_errorhandler_t)(
struct h5_file * const,
const char*,
va_list ap );
#ifndef PARALLEL_IO
typedef unsigned long MPI_Comm;
#endif
typedef struct h5_idlist {
int32_t size; /* allocated space in number of items */
int32_t num_items; /* stored items */
h5_id_t *items;
} h5_idlist_t;
struct h5_idmap;
typedef struct h5_idmap h5_idmap_t;
/**
\struct h5_file
This is an essentially opaque datastructure that
acts as the filehandle for all practical purposes.
It is created by H5PartOpenFile<xx>() and destroyed by
H5PartCloseFile().
*/
struct h5_file {
hid_t file; /* file id -> fid */
unsigned mode; /* file access mode */
int empty;
h5_err_t __errno; /* error number */
const char * __funcname; /* H5Block/Fed/Part API function*/
/* MPI */
MPI_Comm comm; /* MPI communicator */
int nprocs; /* number of processors */
int myproc; /* The index of the processor
this process is running on. */
/* HDF5 */
hid_t xfer_prop; /* file transfer properties */
hid_t create_prop; /* file create properties */
hid_t access_prop; /* file access properties */
hid_t root_gid; /* id of root group */
hid_t step_gid; /* id of current step */
/* step internal data */
char prefix_step_name[256]; /* Prefix of step name */
int width_step_idx; /* pad step index with 0 up to this */
char step_name[128]; /* full step name */
h5_int64_t step_idx; /* step index */
int is_new_step;
struct h5u_fdata *u;
struct h5b_fdata *b;
struct h5t_fdata *t;
};
typedef struct h5_file h5_file_t;
enum h5_oid { /* enum with number of vertices(!) */
H5_OID_VERTEX = 1,
H5_OID_EDGE = 2,
H5_OID_TRIANGLE = 3,
H5_OID_TETRAHEDRON = 4
};
typedef enum h5_oid h5_oid_t;
#define H5_MAX_VERTICES_PER_ELEM H5_OID_TETRAHEDRON
#define H5_TRIANGLE_MESH (H5_OID_TRIANGLE)
#define H5_TETRAHEDRAL_MESH (H5_OID_TETRAHEDRON)
#endif
+93
View File
@@ -0,0 +1,93 @@
#ifndef __H5T_ADJACENCIES_H
#define __H5T_ADJACENCIES_H
h5_err_t
h5t_get_edges_upadjacent_to_vertex (
h5_file_t * const f,
const h5_id_t local_vid,
h5_idlist_t **list
);
h5_err_t
h5t_get_triangles_upadjacent_to_vertex (
h5_file_t * const f,
const h5_id_t local_vid,
h5_idlist_t **list
);
h5_err_t
h5t_get_tets_upadjacent_to_vertex (
h5_file_t * const f,
const h5_id_t local_vid,
h5_idlist_t **list
);
h5_err_t
h5t_get_triangles_upadjacent_to_edge (
h5_file_t * const f,
const h5_id_t local_kid,
h5_idlist_t **list
);
h5_err_t
h5t_get_tets_upadjacent_to_edge (
h5_file_t * const f,
const h5_id_t local_kid,
h5_idlist_t **list
);
h5_err_t
h5t_get_tets_upadjacent_to_triangle (
h5_file_t * const f,
const h5_id_t local_did,
h5_idlist_t **list
);
h5_err_t
h5t_get_vertices_downadjacent_to_edge (
h5_file_t * const f,
const h5_id_t local_kid,
h5_idlist_t **list
);
h5_err_t
h5t_get_vertices_downadjacent_to_triangle (
h5_file_t * const f,
const h5_id_t local_did,
h5_idlist_t **list
);
h5_err_t
h5t_get_vertices_downadjacent_to_tet (
h5_file_t * const f,
const h5_id_t local_tid,
h5_idlist_t **list
);
h5_err_t
h5t_get_edges_downadjacent_to_triangle (
h5_file_t * const f,
const h5_id_t local_did,
h5_idlist_t **list
);
h5_err_t
h5t_get_edges_downadjacent_to_tet (
h5_file_t * const f,
const h5_id_t local_tid,
h5_idlist_t **list
);
h5_err_t
h5t_get_triangles_downadjacent_to_tet (
h5_file_t * const f,
const h5_id_t local_tid,
h5_idlist_t **list
);
h5_err_t
h5t_release_list_of_adjacencies (
h5_file_t * const f,
h5_idlist_t **list
);
#endif
+78
View File
@@ -0,0 +1,78 @@
#ifndef __H5T_CORE_H
#define __H5T_CORE_H
#include "h5t_adjacencies.h"
#include "h5t_inquiry.h"
#include "h5t_map.h"
#include "h5t_openclose.h"
#include "h5t_readwrite.h"
#include "h5t_retrieve.h"
#include "h5t_storemesh.h"
#include "h5t_tags.h"
/*
ID's: 64bit
Vertices:
000100vv tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt
3V TT TT TT TT TT TT
Edges:
00100eee tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt
2E TT TT TT TT TT TT
Trinagles:
001100dd tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt
1D TT TT TT TT TT TT
Tets:
01000000 tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt tttttttt
00 TT TT TT TT TT TT
*/
#define H5T_ELEM_MASK ( (h5_id_t) (ULLONG_MAX >> 8) )
#define H5T_ETYPE_MASK ( 7ull << (sizeof(h5_id_t)*8-4) )
#define H5T_COMPONENT_MASK (~H5T_ELEM_MASK)
#define H5T_COMPONENT_ID_MASK (15ull << (sizeof(h5_id_t)*7) )
#define H5T_ETYPE_VERTEX ((h5_id_t)1)
#define H5T_ETYPE_EDGE ((h5_id_t)2)
#define H5T_ETYPE_TRIANGLE ((h5_id_t)3)
#define H5T_ETYPE_TET ((h5_id_t)4)
#define h5tpriv_set_entity_type( type, elem_idx ) \
( \
((h5_id_t)(type) << (sizeof(h5_id_t)*8-4)) | \
((h5_id_t)(elem_idx)) \
)
#define h5tpriv_get_entity_type( entity_id ) \
((entity_id & H5T_ETYPE_MASK) >> (sizeof(h5_id_t)*8-4))
#define h5tpriv_build_id( type, comp_idx, elem_idx ) \
( \
((h5_id_t)(type) << (sizeof(h5_id_t)*8-4)) | \
((h5_id_t)(comp_idx) << (sizeof(h5_id_t)*7)) | \
((h5_id_t)(elem_idx) & H5T_ELEM_MASK) \
)
#define h5tpriv_build_vertex_id( comp_idx, elem_idx ) \
( h5tpriv_build_id ( H5T_ETYPE_VERTEX, comp_idx, elem_idx ) )
#define h5tpriv_build_edge_id( comp_idx, elem_idx ) \
( h5tpriv_build_id ( H5T_ETYPE_EDGE, comp_idx, elem_idx ) )
#define h5tpriv_build_triangle_id( comp_idx, elem_idx ) \
( h5tpriv_build_id ( H5T_ETYPE_TRIANGLE, comp_idx, elem_idx ) )
#define h5tpriv_build_elem_id( elem_idx ) \
( h5tpriv_build_id ( f->t->mesh_type, 0, elem_idx ) )
#define h5tpriv_get_face_id( entity_id ) \
( (entity_id & H5T_COMPONENT_ID_MASK) >> (sizeof(h5_id_t)*7) )
#define h5tpriv_get_elem_idx( entity_id ) \
( entity_id & H5T_ELEM_MASK )
#endif
+31
View File
@@ -0,0 +1,31 @@
#ifndef __H5T_INQUIRY_H
#define __H5T_INQUIRY_H
h5_size_t
h5t_get_num_meshes (
h5_file_t * const f,
const enum h5_oid type
);
h5_size_t
h5t_get_num_levels (
h5_file_t * const f
);
h5_size_t
h5t_get_num_elems (
h5_file_t * const f,
const h5_id_t cnode_id
);
h5_size_t
h5t_get_num_vertices (
h5_file_t * const f,
const h5_id_t cnode_id
);
h5_id_t
h5t_get_level (
h5_file_t * const f
);
#endif
+98
View File
@@ -0,0 +1,98 @@
#ifndef __H5T_MAP_H
#define __H5T_MAP_H
h5_id_t
h5t_map_global_vid2local (
h5_file_t * const f,
h5_id_t global_vid
);
h5_err_t
h5t_map_global_vids2local (
h5_file_t *f,
const h5_id_t * const global_vids,
const h5_id_t size,
h5_id_t * const local_vids
);
h5_id_t
h5t_map_local_vid2global (
h5_file_t *f,
h5_id_t local_vid
);
h5_id_t
h5t_map_local_eid2global (
h5_file_t *f,
h5_id_t local_eid
);
h5_id_t
h5t_map_global_eid2local (
h5_file_t * const f,
const h5_id_t global_eid
);
h5_id_t
h5t_map_local_triangle_id2global (
h5_file_t * const f,
const h5_id_t local_tid
);
h5_id_t
h5t_map_global_triangle_id2local (
h5_file_t * const f,
const h5_id_t global_tid
);
h5_id_t
h5tpriv_get_local_vid (
h5_file_t * const f,
h5_float64_t P[3]
);
h5_id_t
h5t_get_local_eid (
h5_file_t *f,
h5_id_t * const local_vids
);
h5_err_t
h5t_get_local_vids_of_edge (
h5_file_t * const f,
const h5_id_t id,
h5_id_t *edge
);
h5_err_t
h5t_get_local_vids_of_edge2 (
h5_file_t * const f,
const h5_id_t face,
const h5_id_t id,
h5_id_t *vids
);
h5_err_t
h5t_get_local_vids_of_triangle (
h5_file_t * const f,
const h5_id_t id,
h5_id_t *vids
);
h5_err_t
h5t_get_local_vids_of_triangle2 (
h5_file_t * const f,
const h5_id_t face,
const h5_id_t id,
h5_id_t *vids
);
h5_err_t
h5t_get_local_vids_of_tet (
h5_file_t * const f,
const h5_id_t id,
h5_id_t *vids
);
#endif
+27
View File
@@ -0,0 +1,27 @@
#ifndef __H5T_OPENCLOSE_H
#define __H5T_OPENCLOSE_H
h5_err_t h5t_open_mesh ( h5_file_t * const f, const h5_id_t id,
const h5_oid_t type );
h5_err_t h5t_open_level ( h5_file_t * const f, const h5_id_t id );
h5_err_t h5tpriv_open_file ( h5_file_t * const f );
h5_err_t h5tpriv_close_file ( h5_file_t * const f );
h5_err_t h5tpriv_open_topo_group ( h5_file_t * const f );
h5_err_t h5tpriv_open_meshes_group ( h5_file_t * const f );
h5_err_t h5tpriv_open_mesh_group ( h5_file_t * const f );
h5_err_t h5tpriv_close_mesh ( h5_file_t * const f );
h5_err_t h5tpriv_close_step ( h5_file_t * const f );
h5_err_t h5tpriv_init_fdata ( h5_file_t * const f );
h5_err_t h5tpriv_init_step ( h5_file_t * const f );
h5_err_t h5tpriv_alloc_num_vertices ( h5_file_t * const f,
const h5_size_t num_vertices );
h5_err_t h5tpriv_alloc_tris ( h5_file_t * const f, const size_t cur,
const size_t new_size );
h5_err_t h5tpriv_alloc_tets ( h5_file_t * const f, const size_t cur,
const size_t new_size );
#endif
+4
View File
@@ -0,0 +1,4 @@
#ifndef __H5T_READWRITE_H
#define __H5T_READWRITE_H
#endif
+19
View File
@@ -0,0 +1,19 @@
#ifndef __H5T_RETRIEVE_H
#define __H5T_RETRIEVE_H
h5_err_t h5t_begin_traverse_vertices ( h5_file_t * const f );
h5_id_t h5t_traverse_vertices ( h5_file_t * const f, h5_float64_t P[3] );
h5_err_t h5t_end_traverse_vertices ( h5_file_t * f );
h5_err_t h5t_begin_traverse_edges ( h5_file_t * const f );
h5_id_t h5t_traverse_edges ( h5_file_t * const f, h5_id_t * const vids );
h5_err_t h5t_end_traverse_edges ( h5_file_t * f );
h5_err_t h5t_begin_traverse_triangles ( h5_file_t * const f );
h5_id_t h5t_traverse_triangles ( h5_file_t * const f, h5_id_t * const vids );
h5_err_t h5t_end_traverse_triangles ( h5_file_t * const f );
h5_err_t h5t_begin_traverse_elems ( h5_file_t * const f );
h5_id_t h5t_traverse_elems ( h5_file_t * const f, h5_id_t * const vids );
h5_err_t h5t_end_traverse_elems ( h5_file_t * const f );
#endif
+67
View File
@@ -0,0 +1,67 @@
#ifndef __H5T_STOREMESH_H
#define __H5T_STOREMESH_H
h5_id_t
h5t_add_mesh (
h5_file_t * const f,
const h5_oid_t mesh_type
);
h5_id_t
h5t_add_level (
h5_file_t * const f
);
h5_size_t
h5t_begin_store_vertices (
h5_file_t * const f,
const h5_size_t num
);
h5_id_t
h5t_store_vertex (
h5_file_t * const f,
const h5_id_t mesher_vid,
const h5_float64_t P[3]
);
h5_err_t
h5t_end_store_vertices (
h5_file_t * const f
);
h5_err_t
h5t_begin_store_elems (
h5_file_t * const f,
const h5_size_t num
);
h5_id_t
h5t_store_elem (
h5_file_t * const f,
const h5_id_t local_parent_eid,
const h5_id_t local_vids[]
);
h5_err_t
h5t_end_store_elems (
h5_file_t * const f
);
h5_err_t
h5t_begin_refine_elems (
h5_file_t * const f,
const h5_size_t num_elems_to_refine
);
h5_id_t
h5t_refine_elem (
h5_file_t * const f,
const h5_id_t local_eid
);
h5_err_t
h5t_end_refine_elems (
h5_file_t * const f
);
#endif
+25
View File
@@ -0,0 +1,25 @@
#ifndef __H5T_TAGS_H
#define __H5T_TAGS_H
typedef struct h5t_tagset H5T_Tagset;
h5_err_t h5t_add_mtagset ( h5_file_t* const f, char name[], h5_id_t id );
h5_err_t h5t_remove_mtagset ( h5_file_t* const f, const char name[] );
h5_err_t h5t_open_mtagset ( h5_file_t* const f, const char *name,
H5T_Tagset** retval );
h5_size_t h5t_get_num_mtagsets ( h5_file_t* const f );
h5_size_t h5t_get_mtagsets ( h5_file_t* const f, char** names[] );
h5_err_t h5t_get_mtagset_info ( h5_file_t* const f, const h5_id_t idx,
char** names, h5_id_t* type );
h5_id_t h5t_get_mtagset_type_by_name ( h5_file_t* const f, char name[] );
h5_err_t h5t_set_mtag_by_name ( h5_file_t* const f, char name[], const h5_id_t id,
const size_t dim, void* value );
h5_err_t h5t_get_mtag_by_name ( h5_file_t* const f, const char name[],
const h5_id_t id, size_t* dim, void* vals );
h5_err_t h5t_remove_mtag_by_name ( h5_file_t* const f, const char name[],
const h5_id_t id );
#endif
+69
View File
@@ -0,0 +1,69 @@
#ifndef __H5U_READWRITE_H
#define __H5U_READWRITE_H
h5_int64_t
h5u_get_num_elems (
h5_file_t *f
);
h5_int64_t
h5u_read_elems (
h5_file_t *f,
const char *name,
void *array,
const hid_t type
);
h5_int64_t
h5u_set_num_elements (
h5_file_t *f,
h5_int64_t nparticles
);
h5_int64_t
h5u_write_data (
h5_file_t *f,
const char *name,
const void *array,
const hid_t type
);
h5_int64_t
h5u_has_view (
h5_file_t *f
);
h5_int64_t
h5u_reset_view (
h5_file_t *f
);
h5_int64_t
h5u_set_view (
h5_file_t *f,
h5_int64_t start,
h5_int64_t end
);
h5_int64_t
h5u_get_view (
h5_file_t *f,
h5_int64_t *start,
h5_int64_t *end
);
h5_int64_t
h5u_set_canonical_view (
h5_file_t *f
);
h5_int64_t
h5u_get_dataset_info (
h5_file_t *f,
const h5_int64_t idx,
char *dataset_name,
const h5_int64_t len_dataset_name,
h5_int64_t *type,
h5_int64_t *nelem
);
#endif
+34
View File
@@ -0,0 +1,34 @@
#ifndef __HDF5_MISC_H
#define __HDF5_MISC_H
h5_int64_t
hdf5_get_num_objects (
hid_t group_id,
const char *group_name,
const hid_t type
);
const char *
h5_get_objname (
hid_t id
);
h5_int64_t
hdf5_get_num_objects_matching_pattern (
hid_t group_id,
const char *group_name,
const hid_t type,
char * const pattern
);
h5_int64_t
hdf5_get_object_name (
hid_t group_id,
const char *group_name,
const hid_t type,
const h5_int64_t idx,
char *obj_name,
const h5_int64_t len_obj_name
);
#endif