diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2004-05-21 18:50:10 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2004-05-21 18:50:10 (GMT) |
commit | 3e56e3d7f927f530c6ef2d506e4f4a745dcbcb1a (patch) | |
tree | 7850141c5c21a2d7c2daa1efd63c5dc22a617754 | |
parent | 9e9bdad5e9b2e182264b3df446cc9534a87f783c (diff) | |
download | hdf5-3e56e3d7f927f530c6ef2d506e4f4a745dcbcb1a.zip hdf5-3e56e3d7f927f530c6ef2d506e4f4a745dcbcb1a.tar.gz hdf5-3e56e3d7f927f530c6ef2d506e4f4a745dcbcb1a.tar.bz2 |
[svn-r8565] Purpose:
Improvement
Description:
Break up the C99 integer types detection into even smaller
sub-module routines. This has dropped the compile time (with
optimization) from 94 seconds to 6 seconds.
Platforms tested:
h5committested.
Misc. update:
-rw-r--r-- | src/H5detect.c | 96 |
1 files changed, 93 insertions, 3 deletions
diff --git a/src/H5detect.c b/src/H5detect.c index 3a7078d..2e7e33f 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -100,6 +100,10 @@ static void detect_C89_integers(void); static void detect_C89_floats(void); static void detect_C99_integers(void); static void detect_C99_floats(void); +static void detect_C99_integers8(void); +static void detect_C99_integers16(void); +static void detect_C99_integers32(void); +static void detect_C99_integers64(void); static void detect_alignments(void); static size_t align_g[] = {1, 2, 4, 8, 16}; static jmp_buf jbuf_g; @@ -1153,9 +1157,9 @@ detect_C89_floats(void) /*------------------------------------------------------------------------- - * Function: detect_C99_integers + * Function: detect_C99_integers8 * - * Purpose: Detect C99 integer types + * Purpose: Detect C99 8 bit integer types * * Return: void * @@ -1167,7 +1171,7 @@ detect_C89_floats(void) *------------------------------------------------------------------------- */ static void -detect_C99_integers(void) +detect_C99_integers8(void) { #if H5_SIZEOF_INT8_T>0 DETECT_I(int8_t, INT8, d[nd]); nd++; @@ -1187,6 +1191,26 @@ detect_C99_integers(void) #if H5_SIZEOF_UINT_FAST8_T>0 DETECT_I(uint_fast8_t, UINT_FAST8, d[nd]); nd++; #endif +} + + +/*------------------------------------------------------------------------- + * Function: detect_C99_integers16 + * + * Purpose: Detect C99 16 bit integer types + * + * Return: void + * + * Programmer: Albert Cheng + * 2004/05/20 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static void +detect_C99_integers16(void) +{ #if H5_SIZEOF_INT16_T>0 DETECT_I(int16_t, INT16, d[nd]); nd++; #endif @@ -1205,6 +1229,26 @@ detect_C99_integers(void) #if H5_SIZEOF_UINT_FAST16_T>0 DETECT_I(uint_fast16_t, UINT_FAST16, d[nd]); nd++; #endif +} + + +/*------------------------------------------------------------------------- + * Function: detect_C99_integers32 + * + * Purpose: Detect C99 32 bit integer types + * + * Return: void + * + * Programmer: Albert Cheng + * 2004/05/20 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static void +detect_C99_integers32(void) +{ #if H5_SIZEOF_INT32_T>0 DETECT_I(int32_t, INT32, d[nd]); nd++; #endif @@ -1223,6 +1267,26 @@ detect_C99_integers(void) #if H5_SIZEOF_UINT_FAST32_T>0 DETECT_I(uint_fast32_t, UINT_FAST32, d[nd]); nd++; #endif +} + + +/*------------------------------------------------------------------------- + * Function: detect_C99_integers64 + * + * Purpose: Detect C99 64 bit integer types + * + * Return: void + * + * Programmer: Albert Cheng + * 2004/05/20 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static void +detect_C99_integers64(void) +{ #if H5_SIZEOF_INT64_T>0 DETECT_I(int64_t, INT64, d[nd]); nd++; #endif @@ -1258,6 +1322,32 @@ detect_C99_integers(void) /*------------------------------------------------------------------------- + * Function: detect_C99_integers + * + * Purpose: Detect C99 integer types + * + * Return: void + * + * Programmer: Albert Cheng + * 2004/05/20 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static void +detect_C99_integers(void) +{ + /* break it down to more subroutines so that each module subroutine */ + /* is smaller and takes less time to compile with optimization on. */ + detect_C99_integers8(); + detect_C99_integers16(); + detect_C99_integers32(); + detect_C99_integers64(); +} + + +/*------------------------------------------------------------------------- * Function: detect_C99_floats * * Purpose: Detect C99 floating point types |