diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-09-30 14:27:10 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-09-30 14:27:10 (GMT) |
commit | b2d661b508a7fc7a2592c13bc6bdc175551f075d (patch) | |
tree | 13baeb0d83a7c2a4c6299993c182b1227c2f6114 /src/H5FDprivate.h | |
parent | 29ab58b58dce556639ea3154e262895773a8a8df (diff) | |
download | hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2 |
Clang-format of source files
Diffstat (limited to 'src/H5FDprivate.h')
-rw-r--r-- | src/H5FDprivate.h | 130 |
1 files changed, 62 insertions, 68 deletions
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h index dcca0f6..c5c51c9 100644 --- a/src/H5FDprivate.h +++ b/src/H5FDprivate.h @@ -22,34 +22,33 @@ #include "H5FDpublic.h" /* Private headers needed by this file */ -#include "H5Pprivate.h" /* Property lists */ +#include "H5Pprivate.h" /* Property lists */ /* * The MPI drivers are needed because there are * places where we check for things that aren't handled by these drivers. */ -#include "H5FDmpi.h" /* MPI-based file drivers */ - +#include "H5FDmpi.h" /* MPI-based file drivers */ /**************************/ /* Library Private Macros */ /**************************/ /* Length of filename buffer */ -#define H5FD_MAX_FILENAME_LEN 1024 +#define H5FD_MAX_FILENAME_LEN 1024 #ifdef H5_HAVE_PARALLEL /* ======== Temporary data transfer properties ======== */ /* Definitions for memory MPI type property */ -#define H5FD_MPI_XFER_MEM_MPI_TYPE_NAME "H5FD_mpi_mem_mpi_type" +#define H5FD_MPI_XFER_MEM_MPI_TYPE_NAME "H5FD_mpi_mem_mpi_type" /* Definitions for file MPI type property */ -#define H5FD_MPI_XFER_FILE_MPI_TYPE_NAME "H5FD_mpi_file_mpi_type" +#define H5FD_MPI_XFER_FILE_MPI_TYPE_NAME "H5FD_mpi_file_mpi_type" /* Sub-class the H5FD_class_t to add more specific functions for MPI-based VFDs */ typedef struct H5FD_class_mpi_t { - H5FD_class_t super; /* Superclass information & methods */ - int (*get_rank)(const H5FD_t *file); /* Get the MPI rank of a process */ - int (*get_size)(const H5FD_t *file); /* Get the MPI size of a communicator */ + H5FD_class_t super; /* Superclass information & methods */ + int (*get_rank)(const H5FD_t *file); /* Get the MPI rank of a process */ + int (*get_size)(const H5FD_t *file); /* Get the MPI size of a communicator */ MPI_Comm (*get_comm)(const H5FD_t *file); /* Get the communicator for a file */ } H5FD_class_mpi_t; #endif @@ -60,46 +59,44 @@ typedef struct H5FD_class_mpi_t { /* File operations */ typedef enum { - OP_UNKNOWN = 0, /* Unknown last file operation */ - OP_READ = 1, /* Last file I/O operation was a read */ - OP_WRITE = 2 /* Last file I/O operation was a write */ + OP_UNKNOWN = 0, /* Unknown last file operation */ + OP_READ = 1, /* Last file I/O operation was a read */ + OP_WRITE = 2 /* Last file I/O operation was a write */ } H5FD_file_op_t; - /* Define structure to hold initial file image and other relevant information */ typedef struct { - void *buffer; - size_t size; + void * buffer; + size_t size; H5FD_file_image_callbacks_t callbacks; } H5FD_file_image_info_t; /* Define default file image info */ -#define H5FD_DEFAULT_FILE_IMAGE_INFO { \ - NULL, /* file image buffer */ \ - 0, /* buffer size */ \ - { /* Callbacks */ \ - NULL, /* image_malloc */ \ - NULL, /* image_memcpy */ \ - NULL, /* image_realloc */ \ - NULL, /* image_free */ \ - NULL, /* udata_copy */ \ - NULL, /* udata_free */ \ - NULL, /* udata */ \ - } \ -} +#define H5FD_DEFAULT_FILE_IMAGE_INFO \ + { \ + NULL, /* file image buffer */ \ + 0, /* buffer size */ \ + { /* Callbacks */ \ + NULL, /* image_malloc */ \ + NULL, /* image_memcpy */ \ + NULL, /* image_realloc */ \ + NULL, /* image_free */ \ + NULL, /* udata_copy */ \ + NULL, /* udata_free */ \ + NULL, /* udata */ \ + } \ + } /* Define structure to hold driver ID & info for FAPLs */ typedef struct { - hid_t driver_id; /* Driver's ID */ - const void *driver_info; /* Driver info, for open callbacks */ + hid_t driver_id; /* Driver's ID */ + const void *driver_info; /* Driver info, for open callbacks */ } H5FD_driver_prop_t; - /*****************************/ /* Library Private Variables */ /*****************************/ - /******************************/ /* Library Private Prototypes */ /******************************/ @@ -107,50 +104,48 @@ typedef struct { /* Forward declarations for prototype arguments */ struct H5F_t; -H5_DLL int H5FD_term_interface(void); +H5_DLL int H5FD_term_interface(void); H5_DLL herr_t H5FD_locate_signature(H5FD_t *file, haddr_t *sig_addr); H5_DLL H5FD_class_t *H5FD_get_class(hid_t id); -H5_DLL hsize_t H5FD_sb_size(H5FD_t *file); -H5_DLL herr_t H5FD_sb_encode(H5FD_t *file, char *name/*out*/, uint8_t *buf); -H5_DLL herr_t H5FD_sb_load(H5FD_t *file, const char *name, const uint8_t *buf); -H5_DLL void *H5FD_fapl_get(H5FD_t *file); -H5_DLL herr_t H5FD_free_driver_info(hid_t driver_id, const void *driver_info); -H5_DLL hid_t H5FD_register(const void *cls, size_t size, hbool_t app_ref); -H5_DLL H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id, - haddr_t maxaddr); -H5_DLL herr_t H5FD_close(H5FD_t *file); -H5_DLL int H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2); -H5_DLL herr_t H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*out*/); -H5_DLL haddr_t H5FD_alloc(H5FD_t *file, H5FD_mem_t type, - struct H5F_t *f, hsize_t size, haddr_t *frag_addr, hsize_t *frag_size); -H5_DLL herr_t H5FD_free(H5FD_t *file, H5FD_mem_t type, struct H5F_t *f, - haddr_t addr, hsize_t size); -H5_DLL htri_t H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, struct H5F_t *f, - haddr_t blk_end, hsize_t extra_requested); +H5_DLL hsize_t H5FD_sb_size(H5FD_t *file); +H5_DLL herr_t H5FD_sb_encode(H5FD_t *file, char *name /*out*/, uint8_t *buf); +H5_DLL herr_t H5FD_sb_load(H5FD_t *file, const char *name, const uint8_t *buf); +H5_DLL void * H5FD_fapl_get(H5FD_t *file); +H5_DLL herr_t H5FD_free_driver_info(hid_t driver_id, const void *driver_info); +H5_DLL hid_t H5FD_register(const void *cls, size_t size, hbool_t app_ref); +H5_DLL H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr); +H5_DLL herr_t H5FD_close(H5FD_t *file); +H5_DLL int H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2); +H5_DLL herr_t H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags /*out*/); +H5_DLL haddr_t H5FD_alloc(H5FD_t *file, H5FD_mem_t type, struct H5F_t *f, hsize_t size, haddr_t *frag_addr, + hsize_t *frag_size); +H5_DLL herr_t H5FD_free(H5FD_t *file, H5FD_mem_t type, struct H5F_t *f, haddr_t addr, hsize_t size); +H5_DLL htri_t H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, struct H5F_t *f, haddr_t blk_end, + hsize_t extra_requested); H5_DLL haddr_t H5FD_get_eoa(const H5FD_t *file, H5FD_mem_t type); -H5_DLL herr_t H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr); +H5_DLL herr_t H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr); H5_DLL haddr_t H5FD_get_eof(const H5FD_t *file, H5FD_mem_t type); H5_DLL haddr_t H5FD_get_maxaddr(const H5FD_t *file); -H5_DLL herr_t H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags); -H5_DLL herr_t H5FD_set_feature_flags(H5FD_t *file, unsigned long feature_flags); -H5_DLL herr_t H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map); -H5_DLL herr_t H5FD_read(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/); -H5_DLL herr_t H5FD_write(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf); -H5_DLL herr_t H5FD_flush(H5FD_t *file, hbool_t closing); -H5_DLL herr_t H5FD_truncate(H5FD_t *file, hbool_t closing); -H5_DLL herr_t H5FD_lock(H5FD_t *file, hbool_t rw); -H5_DLL herr_t H5FD_unlock(H5FD_t *file); -H5_DLL herr_t H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum); -H5_DLL herr_t H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl, void** file_handle); -H5_DLL herr_t H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr); +H5_DLL herr_t H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags); +H5_DLL herr_t H5FD_set_feature_flags(H5FD_t *file, unsigned long feature_flags); +H5_DLL herr_t H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map); +H5_DLL herr_t H5FD_read(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /*out*/); +H5_DLL herr_t H5FD_write(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf); +H5_DLL herr_t H5FD_flush(H5FD_t *file, hbool_t closing); +H5_DLL herr_t H5FD_truncate(H5FD_t *file, hbool_t closing); +H5_DLL herr_t H5FD_lock(H5FD_t *file, hbool_t rw); +H5_DLL herr_t H5FD_unlock(H5FD_t *file); +H5_DLL herr_t H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum); +H5_DLL herr_t H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl, void **file_handle); +H5_DLL herr_t H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr); H5_DLL haddr_t H5FD_get_base_addr(const H5FD_t *file); -H5_DLL herr_t H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged); +H5_DLL herr_t H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged); /* Function prototypes for MPI based VFDs*/ #ifdef H5_HAVE_PARALLEL /* General routines */ H5_DLL haddr_t H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off); -H5_DLL herr_t H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/); +H5_DLL herr_t H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off /*out*/); #ifdef NOT_YET H5_DLL herr_t H5FD_mpio_wait_for_left_neighbor(H5FD_t *file); H5_DLL herr_t H5FD_mpio_signal_right_neighbor(H5FD_t *file); @@ -159,10 +154,9 @@ H5_DLL herr_t H5FD_set_mpio_atomicity(H5FD_t *file, hbool_t flag); H5_DLL herr_t H5FD_get_mpio_atomicity(H5FD_t *file, hbool_t *flag); /* Driver specific methods */ -H5_DLL int H5FD_mpi_get_rank(const H5FD_t *file); -H5_DLL int H5FD_mpi_get_size(const H5FD_t *file); +H5_DLL int H5FD_mpi_get_rank(const H5FD_t *file); +H5_DLL int H5FD_mpi_get_size(const H5FD_t *file); H5_DLL MPI_Comm H5FD_mpi_get_comm(const H5FD_t *_file); #endif /* H5_HAVE_PARALLEL */ #endif /* !_H5FDprivate_H */ - |