summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2022-02-24 16:04:59 (GMT)
committerGitHub <noreply@github.com>2022-02-24 16:04:59 (GMT)
commit758e97c1e5f02869dbae81a7a428d270a016464e (patch)
tree425cd765d18520621e6cbd5f7f1f2a917697ff82 /src/H5private.h
parent5a5a77040225a5c621cb75b578204c8b534a7652 (diff)
downloadhdf5-758e97c1e5f02869dbae81a7a428d270a016464e.zip
hdf5-758e97c1e5f02869dbae81a7a428d270a016464e.tar.gz
hdf5-758e97c1e5f02869dbae81a7a428d270a016464e.tar.bz2
Parallel Compression improvements (#1302)
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 68aabc2..d67163f 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -387,6 +387,25 @@
#define HSSIZET_MAX ((hssize_t)LLONG_MAX)
#define HSSIZET_MIN (~(HSSIZET_MAX))
+#ifdef H5_HAVE_PARALLEL
+
+/* Define a type for safely sending size_t values with MPI */
+#if SIZE_MAX == UCHAR_MAX
+#define H5_SIZE_T_AS_MPI_TYPE MPI_UNSIGNED_CHAR
+#elif SIZE_MAX == USHRT_MAX
+#define H5_SIZE_T_AS_MPI_TYPE MPI_UNSIGNED_SHORT
+#elif SIZE_MAX == UINT_MAX
+#define H5_SIZE_T_AS_MPI_TYPE MPI_UNSIGNED
+#elif SIZE_MAX == ULONG_MAX
+#define H5_SIZE_T_AS_MPI_TYPE MPI_UNSIGNED_LONG
+#elif SIZE_MAX == ULLONG_MAX
+#define H5_SIZE_T_AS_MPI_TYPE MPI_UNSIGNED_LONG_LONG
+#else
+#error "no suitable MPI type for size_t"
+#endif
+
+#endif /* H5_HAVE_PARALLEL */
+
/*
* Types and max sizes for POSIX I/O.
* OS X (Darwin) is odd since the max I/O size does not match the types.
@@ -508,6 +527,9 @@
#define H5_GCC_CLANG_DIAG_ON(x)
#endif
+/* Function pointer typedef for qsort */
+typedef int (*H5_sort_func_cb_t)(const void *, const void *);
+
/* Typedefs and functions for timing certain parts of the library. */
/* A set of elapsed/user/system times emitted as a time point by the
@@ -2617,6 +2639,14 @@ H5_DLL herr_t H5_mpi_comm_cmp(MPI_Comm comm1, MPI_Comm comm2, int *result);
H5_DLL herr_t H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result);
H5_DLL herr_t H5_mpio_create_large_type(hsize_t num_elements, MPI_Aint stride_bytes, MPI_Datatype old_type,
MPI_Datatype *new_type);
+H5_DLL herr_t H5_mpio_gatherv_alloc(void *send_buf, int send_count, MPI_Datatype send_type,
+ const int recv_counts[], const int displacements[],
+ MPI_Datatype recv_type, hbool_t allgather, int root, MPI_Comm comm,
+ int mpi_rank, int mpi_size, void **out_buf, size_t *out_buf_num_entries);
+H5_DLL herr_t H5_mpio_gatherv_alloc_simple(void *send_buf, int send_count, MPI_Datatype send_type,
+ MPI_Datatype recv_type, hbool_t allgather, int root, MPI_Comm comm,
+ int mpi_rank, int mpi_size, void **out_buf,
+ size_t *out_buf_num_entries);
#endif /* H5_HAVE_PARALLEL */
/* Functions for debugging */