- introduced macros for enter and return from API functions
- iterators revisited
This commit is contained in:
@@ -18,13 +18,13 @@
|
||||
#ifndef __H5FED_INQUIRY_H
|
||||
#define __H5FED_INQUIRY_H
|
||||
|
||||
h5_size_t H5FedGetNumMeshes ( h5_file_t * const f, const h5_oid_t type_id );
|
||||
h5_size_t H5FedGetNumLevels ( h5_file_t * const f );
|
||||
h5_id_t H5FedGetLevel ( h5_file_t * const f );
|
||||
h5_size_t H5FedGetNumVertices ( h5_file_t * const f );
|
||||
h5_size_t H5FedGetNumVerticesCnode ( h5_file_t * const f, const h5_id_t cnode );
|
||||
h5_size_t H5FedGetNumVerticesTotal ( h5_file_t * const f );
|
||||
h5_size_t H5FedGetNumElements ( h5_file_t * const f );
|
||||
h5_size_t H5FedGetNumElementsCnode ( h5_file_t * const f, const h5_id_t cnode );
|
||||
h5_size_t H5FedGetNumElementsTotal ( h5_file_t * const f );
|
||||
h5_ssize_t H5FedGetNumMeshes ( h5_file_t * const f, const h5_oid_t type_id );
|
||||
h5_ssize_t H5FedGetNumLevels ( h5_file_t * const f );
|
||||
h5t_lvl_idx_t H5FedGetLevel ( h5_file_t * const f );
|
||||
h5_ssize_t H5FedGetNumVertices ( h5_file_t * const f );
|
||||
h5_ssize_t H5FedGetNumVerticesCnode ( h5_file_t * const f, const h5_id_t cnode );
|
||||
h5_ssize_t H5FedGetNumVerticesTotal ( h5_file_t * const f );
|
||||
h5_ssize_t H5FedGetNumElements ( h5_file_t * const f );
|
||||
h5_ssize_t H5FedGetNumElementsCnode ( h5_file_t * const f, const h5_id_t cnode );
|
||||
h5_ssize_t H5FedGetNumElementsTotal ( h5_file_t * const f );
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@ H5FedAddMesh (
|
||||
const h5_oid_t mesh_type_id
|
||||
);
|
||||
|
||||
h5_id_t
|
||||
h5t_lvl_idx_t
|
||||
H5FedAddLevel (
|
||||
h5_file_t * const f
|
||||
);
|
||||
|
||||
@@ -11,7 +11,7 @@ H5FedRemoveMTagset (
|
||||
h5_file_t* const f,
|
||||
char name[]
|
||||
);
|
||||
h5_size_t
|
||||
h5_ssize_t
|
||||
H5FedGetMTagsets (
|
||||
h5_file_t* const f,
|
||||
char** names[]
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
|
||||
#define UNUSED_ARGUMENT(x) (void)x
|
||||
|
||||
#define TRY( func ) \
|
||||
if ((int64_t)(ptrdiff_t)(func) <= (int64_t)H5_ERR) \
|
||||
return H5_ERR; \
|
||||
|
||||
#define TRY2( func ) \
|
||||
if ((int64_t)(ptrdiff_t)(func) <= (int64_t)H5_ERR) \
|
||||
goto exit; \
|
||||
|
||||
|
||||
#include "h5_types.h"
|
||||
#include "h5_errno.h"
|
||||
|
||||
@@ -11,6 +20,7 @@
|
||||
#include "h5_maps.h"
|
||||
#include "h5_openclose.h"
|
||||
#include "h5_readwrite.h"
|
||||
#include "h5_syscall.h"
|
||||
|
||||
#include "h5u_readwrite.h"
|
||||
#include "h5u_model.h"
|
||||
|
||||
@@ -225,13 +225,15 @@ h5_set_funcname (
|
||||
const char * const fname
|
||||
);
|
||||
|
||||
static inline void
|
||||
H5_ENTER_API (
|
||||
h5_file_t* const f,
|
||||
const char* const fname
|
||||
) {
|
||||
h5_set_funcname( f, fname );
|
||||
h5_debug (f, "%s", " "); // just print the function name
|
||||
}
|
||||
#define H5_API_ENTER { \
|
||||
h5_set_funcname( f, __func__ ); \
|
||||
h5_debug (f, "%s", " "); \
|
||||
} \
|
||||
|
||||
#define H5_API_RETURN(retval) \
|
||||
\
|
||||
goto exit; \
|
||||
exit: \
|
||||
return retval; \
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef __H5_SYSCALL_H
|
||||
#define __H5_SYSCALL_H
|
||||
|
||||
void*
|
||||
h5_alloc (
|
||||
h5_file_t* const f,
|
||||
void* ptr,
|
||||
const size_t size
|
||||
);
|
||||
|
||||
void*
|
||||
h5_calloc (
|
||||
h5_file_t* const f,
|
||||
const size_t count,
|
||||
const size_t size
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_free (
|
||||
h5_file_t* const f,
|
||||
void* ptr
|
||||
);
|
||||
#endif
|
||||
@@ -54,16 +54,9 @@ h5t_init_leaf_iterator (
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5t_create_leaf_iterator (
|
||||
h5t_init_boundary_face_iterator (
|
||||
h5_file_t* f,
|
||||
h5t_iterator_t** iter,
|
||||
const int codim
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5t_create_boundary_face_iterator (
|
||||
h5_file_t* f,
|
||||
h5t_iterator_t** iter,
|
||||
h5t_iterator_t* iter,
|
||||
const int codim
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user