attachment implementation
This commit is contained in:
+1
-1
@@ -119,7 +119,7 @@ H5AbortErrorhandler (
|
||||
|
||||
h5_err_t
|
||||
H5GetErrno (
|
||||
h5_file_t * const f
|
||||
void
|
||||
);
|
||||
|
||||
#ifdef PARALLEL_IO
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
#ifndef __H5_ATTACHMENTS_H
|
||||
#define __H5_ATTACHMENTS_H
|
||||
|
||||
h5_ssize_t
|
||||
H5GetNumAttachments (
|
||||
h5_file_t* const f
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5GetAttachmentInfoByIdx (
|
||||
h5_file_t* const f,
|
||||
const h5_size_t idx,
|
||||
char* const name,
|
||||
h5_size_t len_name,
|
||||
h5_int64_t* const type,
|
||||
h5_size_t* const npoints
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5GetAttachmentInfoByName (
|
||||
h5_file_t* const f,
|
||||
char* const name,
|
||||
h5_int64_t* const type,
|
||||
h5_size_t* const npoints
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5WriteAttachmentBitstream (
|
||||
h5_file_t* const f,
|
||||
const char* name,
|
||||
const void* const content,
|
||||
const h5_size_t size
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5WriteAttachmentFloat32 (
|
||||
h5_file_t* const f,
|
||||
const char* name,
|
||||
const void* const content,
|
||||
const h5_size_t size
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5WriteAttachmentFloat64 (
|
||||
h5_file_t* const f,
|
||||
const char* name,
|
||||
const void* const content,
|
||||
const h5_size_t size
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5WriteAttachmentInt32 (
|
||||
h5_file_t* const f,
|
||||
const char* name,
|
||||
const void* const content,
|
||||
const h5_size_t size
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5WriteAttachmentInt64 (
|
||||
h5_file_t* const f,
|
||||
const char* name,
|
||||
const void* const content,
|
||||
const h5_size_t size
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5ReadAttachmentBitstream (
|
||||
h5_file_t* const f,
|
||||
const char* name,
|
||||
void* const content
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5ReadAttachmentFloat32 (
|
||||
h5_file_t* const f,
|
||||
const char* name,
|
||||
void* const content
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5ReadAttachmentFloat64 (
|
||||
h5_file_t* const f,
|
||||
const char* name,
|
||||
void* const content
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5ReadAttachmentInt32 (
|
||||
h5_file_t* const f,
|
||||
const char* name,
|
||||
void* const content
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5ReadAttachmentInt64 (
|
||||
h5_file_t* const f,
|
||||
const char* name,
|
||||
void* const content
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
H5DeleteAttachment (
|
||||
h5_file_t* const f,
|
||||
const char* const name
|
||||
);
|
||||
|
||||
#endif
|
||||
@@ -8,6 +8,7 @@ extern "C" {
|
||||
#include "h5core/h5_core.h"
|
||||
#include "H5.h"
|
||||
#include "H5_attribs.h"
|
||||
#include "H5_attachments.h"
|
||||
#include "H5Part.h"
|
||||
#include "H5Block.h"
|
||||
#include "H5Block_readwrite.h"
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
#ifndef __H5_ATTACH_H
|
||||
#define __H5_ATTACH_H
|
||||
|
||||
h5_err_t
|
||||
h5_write_attachment (
|
||||
h5_file_t* const f,
|
||||
const char* const name,
|
||||
const hid_t type,
|
||||
const char* const content,
|
||||
const h5_size_t size
|
||||
);
|
||||
|
||||
h5_ssize_t
|
||||
h5_get_num_attachments (
|
||||
h5_file_t* const f
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_get_attachment_info_by_idx (
|
||||
h5_file_t* const f,
|
||||
const h5_size_t idx, // IN
|
||||
char* const name, // OUT
|
||||
h5_size_t len_name, // IN
|
||||
h5_int64_t* const type, // OUT
|
||||
h5_size_t* const npoints // OUT
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_get_attachment_info_by_name (
|
||||
h5_file_t* const f,
|
||||
const char* const name, // IN
|
||||
h5_int64_t* const type, // OUT
|
||||
h5_size_t* const npoints // OUT
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_read_attachment (
|
||||
h5_file_t* const f,
|
||||
const char* const name,
|
||||
const hid_t type,
|
||||
void* const content
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
h5_delete_attachment (
|
||||
h5_file_t* const f,
|
||||
const char* const name
|
||||
);
|
||||
|
||||
#endif
|
||||
@@ -14,13 +14,13 @@
|
||||
#define H5_DEBUG_ALL (-1)
|
||||
|
||||
extern char* h5_rfmts[];
|
||||
#define __FUNC_ENTER(type) \
|
||||
#define __FUNC_ENTER(type) \
|
||||
h5_call_stack_push (__func__,e_##type); \
|
||||
type ret_value = (type)H5_ERR;
|
||||
|
||||
#define __FUNC_ARGS0(mask) \
|
||||
#define __FUNC_ARGS0(mask) \
|
||||
if (h5_debug_level & mask ) { \
|
||||
h5_debug ("(void)"); \
|
||||
h5_debug ("(void)"); \
|
||||
}
|
||||
|
||||
#define __FUNC_ARGS1(fmt, a1, mask) \
|
||||
@@ -69,7 +69,7 @@ extern char* h5_rfmts[];
|
||||
__FUNC_ARGS4(fmt, a1, a2, a3, a4, mask);
|
||||
|
||||
#define __FUNC_ENTER5(type, fmt, a1, a2, a3, a4, a5, mask) \
|
||||
__FUNC_ENTER(type); \
|
||||
__FUNC_ENTER(type); \
|
||||
__FUNC_ARGS5(fmt, a1, a2, a3, a4, a5, mask);
|
||||
|
||||
#define __FUNC_LEAVE(expr) { \
|
||||
@@ -80,8 +80,8 @@ extern char* h5_rfmts[];
|
||||
#define __FUNC_RETURN(expr, mask) \
|
||||
ret_value = expr; \
|
||||
goto done; \
|
||||
done: \
|
||||
if (h5_debug_level & mask ) { \
|
||||
done: \
|
||||
if (h5_debug_level & mask ) { \
|
||||
char fmt[256]; \
|
||||
snprintf (fmt, sizeof(fmt), "return: %s", \
|
||||
h5_rfmts[h5_call_stack_get_type()]); \
|
||||
@@ -109,6 +109,14 @@ done: \
|
||||
H5_API_ENTER(type); \
|
||||
__FUNC_ARGS3(fmt, a1,a2,a3, H5_DEBUG_API)
|
||||
|
||||
#define H5_API_ENTER4(type, fmt, a1, a2, a3, a4) \
|
||||
H5_API_ENTER(type); \
|
||||
__FUNC_ARGS4(fmt, a1,a2,a3, a4, H5_DEBUG_API)
|
||||
|
||||
#define H5_API_ENTER5(type, fmt, a1, a2, a3, a4, a5) \
|
||||
H5_API_ENTER(type); \
|
||||
__FUNC_ARGS5(fmt, a1,a2,a3, a4, a5, H5_DEBUG_API)
|
||||
|
||||
#define H5_API_LEAVE(expr) __FUNC_LEAVE(expr)
|
||||
#define H5_API_RETURN(expr) __FUNC_RETURN(expr, H5_DEBUG_API);
|
||||
|
||||
@@ -135,6 +143,7 @@ done: \
|
||||
#include "h5_types.h"
|
||||
#include "h5_errno.h"
|
||||
|
||||
#include "h5_attach.h"
|
||||
#include "h5_attribs.h"
|
||||
#include "h5_hdf5.h"
|
||||
#include "h5_maps.h"
|
||||
|
||||
@@ -33,16 +33,6 @@ hdf5_get_name_of_dataset_by_idx (
|
||||
size_t len
|
||||
);
|
||||
|
||||
h5_err_t
|
||||
hdf5_get_dataset_info_by_idx (
|
||||
const hid_t loc_id,
|
||||
const hsize_t idx,
|
||||
char* const name,
|
||||
const size_t len_name,
|
||||
h5_int64_t* const type,
|
||||
hsize_t* const npoints
|
||||
);
|
||||
|
||||
const char *
|
||||
hdf5_get_objname (
|
||||
hid_t id
|
||||
|
||||
Reference in New Issue
Block a user