summaryrefslogtreecommitdiffstats
path: root/src/H5Fprivate.h
diff options
context:
space:
mode:
authorRobert Kim Yates <rkyates@llnl.gov>1998-02-10 14:59:51 (GMT)
committerRobert Kim Yates <rkyates@llnl.gov>1998-02-10 14:59:51 (GMT)
commitef4270b53003664119e318ad473a75716d5d570e (patch)
treeabecc8d27d654d103ba4c6c5e5c05e3c8e41f099 /src/H5Fprivate.h
parent01ea6431c86c4956a5efb139d0516c35eb9dda52 (diff)
downloadhdf5-ef4270b53003664119e318ad473a75716d5d570e.zip
hdf5-ef4270b53003664119e318ad473a75716d5d570e.tar.gz
hdf5-ef4270b53003664119e318ad473a75716d5d570e.tar.bz2
[svn-r234] Cleaned up conversion between MPIOffset and haddr_t in H5Fmpio.c.
In H5Fprivate.h made MPI-IO the default low-level I/O module when HAVE_PARALLEL.
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r--src/H5Fprivate.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 7550165..dc3147e 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -100,10 +100,10 @@
# define INT64ENCODE(p, n) { \
int64 _n = (n); \
- size_t _i; \
+ intn _i; \
uint8 *_p = (uint8*)(p); \
for (_i=0; _i<sizeof(int64); _i++, _n>>=8) { \
- *_p++ = (uint8)(_n & 0xff); \
+ *_p++ = _n & 0xff; \
} \
for (/*void*/; _i<8; _i++) { \
*_p++ = (n)<0 ? 0xff : 0; \
@@ -113,10 +113,10 @@
# define UINT64ENCODE(p, n) { \
uint64 _n = (n); \
- size_t _i; \
+ intn _i; \
uint8 *_p = (uint8*)(p); \
for (_i=0; _i<sizeof(uint64); _i++, _n>>=8) { \
- *_p++ = (uint8)(_n & 0xff); \
+ *_p++ = _n & 0xff; \
} \
for (/*void*/; _i<8; _i++) { \
*_p++ = 0; \
@@ -150,7 +150,7 @@
# define INT64DECODE(p, n) { \
/* WE DON'T CHECK FOR OVERFLOW! */ \
- size_t _i; \
+ intn _i; \
n = 0; \
(p) += 8; \
for (_i=0; _i<sizeof(int64); _i++, n<<=8) { \
@@ -161,7 +161,7 @@
# define UINT64DECODE(p, n) { \
/* WE DON'T CHECK FOR OVERFLOW! */ \
- size_t _i; \
+ intn _i; \
n = 0; \
(p) += 8; \
for (_i=0; _i<sizeof(uint64); _i++, n<<=8) { \
@@ -327,7 +327,11 @@ typedef struct H5F_low_t {
/* What types of low-level files are there? */
#ifndef H5F_LOW_DFLT
+# ifdef HAVE_PARALLEL
+# define H5F_LOW_DFLT H5F_LOW_MPIO /* when parallel, MPI-IO is default */
+# else
# define H5F_LOW_DFLT H5F_LOW_STDIO /* The default type */
+# endif
#endif
extern const H5F_low_class_t H5F_LOW_SEC2[]; /* Posix section 2 */
extern const H5F_low_class_t H5F_LOW_STDIO[]; /* Posix stdio */
@@ -399,12 +403,18 @@ typedef struct H5F_t {
break; \
}
+#ifdef NOT_YET
+#define H5F_encode_length(f,p,l) (H5F_SIZEOF_SIZE(f)==4 ? UINT32ENCODE(p,l) \
+ : H5F_SIZEOF_SIZE(f)==8 ? UINT64ENCODE(p,l) \
+ : H5F_SIZEOF_SIZE(f)==2 ? UINT16ENCODE(p,l) : H5FPencode_unusual_length(f,&(p),(uint8 *)&(l)))
+#else
#define H5F_encode_length(f,p,l) \
switch(H5F_SIZEOF_SIZE(f)) { \
case 4: UINT32ENCODE(p,l); break; \
case 8: UINT64ENCODE(p,l); break; \
case 2: UINT16ENCODE(p,l); break; \
}
+#endif
#define H5F_decode_length(f,p,l) \
switch(H5F_SIZEOF_SIZE(f)) { \