diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-09-04 21:51:30 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-09-04 21:51:30 (GMT) |
commit | d8d17d23284d29048da7af67c9653ffc2d0945c4 (patch) | |
tree | 916b9b1144be81df0b25a2ea712f8e6ac6e8e040 | |
parent | 30c7264c2ca0f169b099b6ebbf13c5bd71652ebc (diff) | |
download | hdf5-d8d17d23284d29048da7af67c9653ffc2d0945c4.zip hdf5-d8d17d23284d29048da7af67c9653ffc2d0945c4.tar.gz hdf5-d8d17d23284d29048da7af67c9653ffc2d0945c4.tar.bz2 |
File changes to affect formatting
40 files changed, 8252 insertions, 8105 deletions
diff --git a/examples/h5_dtransform.c b/examples/h5_dtransform.c index 0b718ad..6be4813 100644 --- a/examples/h5_dtransform.c +++ b/examples/h5_dtransform.c @@ -36,29 +36,31 @@ #define ROWS 12 #define COLS 18 +/* clang-format off */ const float windchillF[ROWS][COLS] = - { {36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0 }, - {34.0, 27.0, 21.0, 15.0, 9.0, 3.0, -4.0, -10.0, -16.0, -22.0, -28.0, -35.0, -41.0, -47.0, -53.0, -59.0, -66.0, -72.0 } , - {32.0, 25.0, 19.0, 13.0, 6.0, 0.0, -7.0, -13.0, -19.0, -26.0, -32.0, -39.0, -45.0, -51.0, -58.0, -64.0, -71.0, -77.0 }, - {30.0, 24.0, 17.0, 11.0, 4.0, -2.0, -9.0, -15.0, -22.0, -29.0, -35.0, -42.0, -48.0, -55.0, -61.0, -68.0, -74.0, -81.0 }, - {29.0, 23.0, 16.0, 9.0, 3.0, -4.0, -11.0, -17.0, -24.0, -31.0, -37.0, -44.0, -51.0, -58.0, -64.0, -71.0, -78.0, -84.0 }, - {28.0, 22.0, 15.0, 8.0, 1.0, -5.0, -12.0, -19.0, -26.0, -33.0, -39.0, -46.0, -53.0, -60.0, -67.0, -73.0, -80.0, -87.0 }, - {28.0, 21.0, 14.0, 7.0, 0.0, -7.0, -14.0, -21.0, -27.0, -34.0, -41.0, -48.0, -55.0, -62.0, -69.0, -76.0, -82.0, -89.0 }, - {27.0, 20.0, 13.0, 6.0, -1.0, -8.0, -15.0, -22.0, -29.0, -36.0, -43.0, -50.0, -57.0, -64.0, -71.0, -78.0, -84.0, -91.0 }, - {26.0, 19.0, 12.0, 5.0, -2.0, -9.0, -16.0, -23.0, -30.0, -37.0, -44.0, -51.0, -58.0, -65.0, -72.0, -79.0, -86.0, -93.0 }, + { {36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0}, + {34.0, 27.0, 21.0, 15.0, 9.0, 3.0, -4.0, -10.0, -16.0, -22.0, -28.0, -35.0, -41.0, -47.0, -53.0, -59.0, -66.0, -72.0}, + {32.0, 25.0, 19.0, 13.0, 6.0, 0.0, -7.0, -13.0, -19.0, -26.0, -32.0, -39.0, -45.0, -51.0, -58.0, -64.0, -71.0, -77.0}, + {30.0, 24.0, 17.0, 11.0, 4.0, -2.0, -9.0, -15.0, -22.0, -29.0, -35.0, -42.0, -48.0, -55.0, -61.0, -68.0, -74.0, -81.0}, + {29.0, 23.0, 16.0, 9.0, 3.0, -4.0, -11.0, -17.0, -24.0, -31.0, -37.0, -44.0, -51.0, -58.0, -64.0, -71.0, -78.0, -84.0}, + {28.0, 22.0, 15.0, 8.0, 1.0, -5.0, -12.0, -19.0, -26.0, -33.0, -39.0, -46.0, -53.0, -60.0, -67.0, -73.0, -80.0, -87.0}, + {28.0, 21.0, 14.0, 7.0, 0.0, -7.0, -14.0, -21.0, -27.0, -34.0, -41.0, -48.0, -55.0, -62.0, -69.0, -76.0, -82.0, -89.0}, + {27.0, 20.0, 13.0, 6.0, -1.0, -8.0, -15.0, -22.0, -29.0, -36.0, -43.0, -50.0, -57.0, -64.0, -71.0, -78.0, -84.0, -91.0}, + {26.0, 19.0, 12.0, 5.0, -2.0, -9.0, -16.0, -23.0, -30.0, -37.0, -44.0, -51.0, -58.0, -65.0, -72.0, -79.0, -86.0, -93.0}, {26.0, 19.0, 12.0, 4.0, -3.0, -10.0, -17.0, -24.0, -31.0, -38.0, -45.0, -52.0, -60.0, -67.0, -74.0, -81.0, -88.0, -95.0}, {25.0, 18.0, 11.0, 4.0, -3.0, -11.0, -18.0, -25.0, -32.0, -39.0, -46.0, -54.0, -61.0, -68.0, -75.0, -82.0, -89.0, -97.0}, {25.0, 17.0, 10.0, 3.0, -4.0, -11.0, -19.0, -26.0, -33.0, -40.0, -48.0, -55.0, -62.0, -69.0, -76.0, -84.0, -91.0, -98.0} }; - -#define PRINT(array) \ -{ \ - for(i=0; i<ROWS; i++) \ - { \ - for(j=0; j<COLS; j++) \ - printf("%6.2f ", array[i][j]); \ - printf("\n"); \ - } \ +/* clang-format on */ + +#define PRINT(array) \ +{ \ + for(i=0; i<ROWS; i++) \ + { \ + for(j=0; j<COLS; j++) \ + printf("%6.2f ", array[i][j]); \ + printf("\n"); \ + } \ } @@ -71,12 +73,12 @@ main (void) hid_t dataspace; /* handles */ hsize_t dimsf[2]; /* dataset dimensions */ herr_t status; - hid_t dxpl_id_f_to_c, dxpl_id_c_to_f; /* data transform handles */ + hid_t dxpl_id_f_to_c, dxpl_id_c_to_f; /* data transform handles */ const char* f_to_c = "(5/9.0)*(x-32)"; const char* c_to_f = "(9/5.0)*x + 32"; - char* transform; - float windchillC[ROWS][COLS]; - int i,j, transform_size; + char* transform; + float windchillC[ROWS][COLS]; + int i,j, transform_size; /* * Create a new file using H5F_ACC_TRUNC access, @@ -110,7 +112,7 @@ main (void) * Write the data to the dataset using default transfer properties (ie, no transform set) */ status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, - H5P_DEFAULT, windchillF); + H5P_DEFAULT, windchillF); /* Create the dataset transfer property list */ dxpl_id_f_to_c = H5Pcreate(H5P_DATASET_XFER); @@ -131,7 +133,7 @@ main (void) * Write the data to the dataset with the f_to_c transform set */ status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, - dxpl_id_f_to_c, windchillF); + dxpl_id_f_to_c, windchillF); /* Read out the data with the default transfer list (ie, no transform set) */ H5Dread(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, windchillC); @@ -154,7 +156,7 @@ main (void) * Write the data to the dataset using the f_to_c transform */ status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, - dxpl_id_f_to_c, windchillF); + dxpl_id_f_to_c, windchillF); /* Read the data with the c_to_f data transform */ H5Dread(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_c_to_f, windchillC); diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 7cb3db8..98f1a3c 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -2067,10 +2067,10 @@ h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* rig * OUTPUTS * * degree - possible values are: - * H5F_CLOSE_DEFAULT - * H5F_CLOSE_WEAK - * H5F_CLOSE_SEMI - * H5F_CLOSE_STRONG + * H5F_CLOSE_DEFAULT + * H5F_CLOSE_WEAK + * H5F_CLOSE_SEMI + * H5F_CLOSE_STRONG * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -2105,10 +2105,10 @@ h5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree) * INPUTS * fapl_id - file access identifier * degree - possible values are: - * H5F_CLOSE_DEFAULT - * H5F_CLOSE_WEAK - * H5F_CLOSE_SEMI - * H5F_CLOSE_STRONG + * H5F_CLOSE_DEFAULT + * H5F_CLOSE_WEAK + * H5F_CLOSE_SEMI + * H5F_CLOSE_STRONG * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -2659,9 +2659,9 @@ h5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size) */ int_f h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls, - H5P_cls_create_func_t create, void *create_data, - H5P_cls_copy_func_t copy, void *copy_data, - H5P_cls_close_func_t close, void *close_data) + H5P_cls_create_func_t create, void *create_data, + H5P_cls_copy_func_t copy, void *copy_data, + H5P_cls_close_func_t close, void *close_data) /******/ { int ret_value = -1; @@ -3434,7 +3434,10 @@ h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset) */ int_f -/*h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) */ +/* + * h5pset_fapl_multi_c(hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, + * int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) + */ h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag) /******/ { @@ -3865,7 +3868,7 @@ DONE: * Calls H5Pget_attr_phase_change * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier + * ocpl_id - Object (dataset or group) creation property list identifier * Outputs max_compact - Maximum number of attributes to be stored in compact storage * min_dense - Minimum number of attributes to be stored in dense storage * RETURNS @@ -3906,7 +3909,7 @@ h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dens * Calls H5Ppset_attr_creation_order * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier + * ocpl_id - Object (dataset or group) creation property list identifier * Outputs crt_order_flags - Flags specifying whether to track and index attribute creation order * RETURNS * 0 on success, -1 on failure @@ -4068,7 +4071,7 @@ h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) * Calls H5Pset_link_creation_order * * INPUTS - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * crt_order_flags - Creation order flag(s) * OUTPUTS * @@ -4104,7 +4107,7 @@ h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags ) * Calls H5Pget_link_phase_change * * INPUTS - * gcpl_id - Group creation property list identifier + * gcpl_id - Group creation property list identifier * Outputs max_compact - Maximum number of attributes to be stored in compact storage * min_dense - Minimum number of attributes to be stored in dense storage * RETURNS @@ -4227,7 +4230,7 @@ h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) * * INPUTS * - * lcpl_id - Link creation property list identifier + * lcpl_id - Link creation property list identifier * crt_intermed_group - crt_intermed_group specifying whether * to create intermediate groups upon the * creation of an object @@ -4311,8 +4314,8 @@ h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags) * * plist_id - Property list identifier * encoding - String encoding character set: - * H5T_CSET_ASCII_F -> US ASCII - * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding + * H5T_CSET_ASCII_F -> US ASCII + * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding * OUTPUTS * NONE * @@ -4355,8 +4358,8 @@ h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding) * OUTPUTS * * encoding - Encoding character set: - * H5T_CSET_ASCII_F -> US ASCII - * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding + * H5T_CSET_ASCII_F -> US ASCII + * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding * * RETURNS * 0 on success, -1 on failure @@ -4484,7 +4487,7 @@ h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options) * RETURNS * * Success: 0 - * Failure: -1 + * Failure: -1 * * AUTHOR * M. Scot Breitenfeld @@ -4546,7 +4549,7 @@ done: * RETURNS * * Success: 0 - * Failure: -1 + * Failure: -1 * * AUTHOR * M. Scot Breitenfeld @@ -4595,7 +4598,7 @@ done: * RETURNS * * Success: 0 - * Failure: -1 + * Failure: -1 * * AUTHOR * M. Scot Breitenfeld @@ -4637,7 +4640,7 @@ h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) * RETURNS * * Success: 0 - * Failure: -1 + * Failure: -1 * * AUTHOR * M. Scot Breitenfeld @@ -4682,7 +4685,7 @@ h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name * RETURNS * * Success: 0 - * Failure: -1 + * Failure: -1 * * AUTHOR * M. Scot Breitenfeld @@ -4722,7 +4725,7 @@ h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint) * RETURNS * * Success: 0 - * Failure: -1 + * Failure: -1 * * AUTHOR * M. Scot Breitenfeld @@ -4792,7 +4795,7 @@ h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dens * * INPUTS * - * fapl_id - File access property list identifier + * fapl_id - File access property list identifier * alignment - Required memory alignment boundary * block_size - File system block size * cbuf_size - Copy buffer size @@ -4838,7 +4841,7 @@ h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a * * INPUTS * - * fapl_id - File access property list identifier + * fapl_id - File access property list identifier * OUTPUTS * * alignment - Required memory alignment boundary @@ -4890,7 +4893,7 @@ h5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a * Calls H5Pset_attr_phase_change * * INPUTS - * ocpl_id - Object (dataset or group) creation property list identifier + * ocpl_id - Object (dataset or group) creation property list identifier * max_compact - Maximum number of attributes to be stored in compact storage * min_dense - Minimum number of attributes to be stored in dense storage * OUTPUTS @@ -5072,7 +5075,7 @@ h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks) * * INPUTS * - * lcpl_id - Link creation property list identifier + * lcpl_id - Link creation property list identifier * crt_intermed_group - Specifying whether to create intermediate groups upon * the creation of an object * RETURNS @@ -5108,7 +5111,7 @@ h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group) * Name: h5pset_chunk_cache_c * Purpose: Calls H5Pset_chunk_cache * - * Inputs: dapl_id - Link creation property list identifier + * Inputs: dapl_id - Link creation property list identifier * rdcc_nslots - * rdcc_nbytes - * rdcc_w0 - @@ -5138,7 +5141,7 @@ h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nby * Name: h5pget_chunk_cache_c * Purpose: Calls H5Pget_chunk_cache * - * Inputs: dapl_id - Link creation property list identifier + * Inputs: dapl_id - Link creation property list identifier * Outputs: * rdcc_nslots - * rdcc_nbytes - diff --git a/hl/examples/pal_rgb.h b/hl/examples/pal_rgb.h index f3905b3..488ee42 100644 --- a/hl/examples/pal_rgb.h +++ b/hl/examples/pal_rgb.h @@ -11,263 +11,266 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -const unsigned char pal_rgb[256*3] = {255,255,255, -0,0,131, -0,0,135, -0,0,139, -0,0,143, -0,0,147, -0,0,151, -0,0,155, -0,0,159, -0,0,163, -0,0,167, -0,0,171, -0,0,175, -0,0,179, -0,0,183, -0,0,187, -0,0,191, -0,0,195, -0,0,199, -0,0,203, -0,0,207, -0,0,211, -0,0,215, -0,0,219, -0,0,223, -0,0,227, -0,0,231, -0,0,235, -0,0,239, -0,0,243, -0,0,247, -0,0,251, -0,0,255, -0,0,255, -0,3,255, -0,7,255, -0,11,255, -0,15,255, -0,19,255, -0,23,255, -0,27,255, -0,31,255, -0,35,255, -0,39,255, -0,43,255, -0,47,255, -0,51,255, -0,55,255, -0,59,255, -0,63,255, -0,67,255, -0,71,255, -0,75,255, -0,79,255, -0,83,255, -0,87,255, -0,91,255, -0,95,255, -0,99,255, -0,103,255, -0,107,255, -0,111,255, -0,115,255, -0,119,255, -0,123,255, -0,127,255, -0,131,255, -0,135,255, -0,139,255, -0,143,255, -0,147,255, -0,151,255, -0,155,255, -0,159,255, -0,163,255, -0,167,255, -0,171,255, -0,175,255, -0,179,255, -0,183,255, -0,187,255, -0,191,255, -0,195,255, -0,199,255, -0,203,255, -0,207,255, -0,211,255, -0,215,255, -0,219,255, -0,223,255, -0,227,255, -0,231,255, -0,235,255, -0,239,255, -0,243,255, -0,247,255, -0,251,255, -0,255,255, -0,255,255, -3,255,251, -7,255,247, -11,255,243, -15,255,239, -19,255,235, -23,255,231, -27,255,227, -31,255,223, -35,255,219, -39,255,215, -43,255,211, -47,255,207, -51,255,203, -55,255,199, -59,255,195, -63,255,191, -67,255,187, -71,255,183, -75,255,179, -79,255,175, -83,255,171, -87,255,167, -91,255,163, -95,255,159, -99,255,155, -103,255,151, -107,255,147, -111,255,143, -115,255,139, -119,255,135, -123,255,131, -127,255,127, -131,255,123, -135,255,119, -139,255,115, -143,255,111, -147,255,107, -151,255,103, -155,255,99, -159,255,95, -163,255,91, -167,255,87, -171,255,83, -175,255,79, -179,255,75, -183,255,71, -187,255,67, -191,255,63, -195,255,59, -199,255,55, -203,255,51, -207,255,47, -211,255,43, -215,255,39, -219,255,35, -223,255,31, -227,255,27, -231,255,23, -235,255,19, -239,255,15, -243,255,11, -247,255,7, -251,255,3, -255,255,0, -255,251,0, -255,247,0, -255,243,0, -255,239,0, -255,235,0, -255,231,0, -255,227,0, -255,223,0, -255,219,0, -255,215,0, -255,211,0, -255,207,0, -255,203,0, -255,199,0, -255,195,0, -255,191,0, -255,187,0, -255,183,0, -255,179,0, -255,175,0, -255,171,0, -255,167,0, -255,163,0, -255,159,0, -255,155,0, -255,151,0, -255,147,0, -255,143,0, -255,139,0, -255,135,0, -255,131,0, -255,127,0, -255,123,0, -255,119,0, -255,115,0, -255,111,0, -255,107,0, -255,103,0, -255,99,0, -255,95,0, -255,91,0, -255,87,0, -255,83,0, -255,79,0, -255,75,0, -255,71,0, -255,67,0, -255,63,0, -255,59,0, -255,55,0, -255,51,0, -255,47,0, -255,43,0, -255,39,0, -255,35,0, -255,31,0, -255,27,0, -255,23,0, -255,19,0, -255,15,0, -255,11,0, -255,7,0, -255,3,0, -255,0,0, -250,0,0, -246,0,0, -241,0,0, -237,0,0, -233,0,0, -228,0,0, -224,0,0, -219,0,0, -215,0,0, -211,0,0, -206,0,0, -202,0,0, -197,0,0, -193,0,0, -189,0,0, -184,0,0, -180,0,0, -175,0,0, -171,0,0, -167,0,0, -162,0,0, -158,0,0, -153,0,0, -149,0,0, -145,0,0, -140,0,0, -136,0,0, -131,0,0, -127,0,0 +/* clang-format off */ +const unsigned char pal_rgb[256*3] = { + 255,255,255, + 0,0,131, + 0,0,135, + 0,0,139, + 0,0,143, + 0,0,147, + 0,0,151, + 0,0,155, + 0,0,159, + 0,0,163, + 0,0,167, + 0,0,171, + 0,0,175, + 0,0,179, + 0,0,183, + 0,0,187, + 0,0,191, + 0,0,195, + 0,0,199, + 0,0,203, + 0,0,207, + 0,0,211, + 0,0,215, + 0,0,219, + 0,0,223, + 0,0,227, + 0,0,231, + 0,0,235, + 0,0,239, + 0,0,243, + 0,0,247, + 0,0,251, + 0,0,255, + 0,0,255, + 0,3,255, + 0,7,255, + 0,11,255, + 0,15,255, + 0,19,255, + 0,23,255, + 0,27,255, + 0,31,255, + 0,35,255, + 0,39,255, + 0,43,255, + 0,47,255, + 0,51,255, + 0,55,255, + 0,59,255, + 0,63,255, + 0,67,255, + 0,71,255, + 0,75,255, + 0,79,255, + 0,83,255, + 0,87,255, + 0,91,255, + 0,95,255, + 0,99,255, + 0,103,255, + 0,107,255, + 0,111,255, + 0,115,255, + 0,119,255, + 0,123,255, + 0,127,255, + 0,131,255, + 0,135,255, + 0,139,255, + 0,143,255, + 0,147,255, + 0,151,255, + 0,155,255, + 0,159,255, + 0,163,255, + 0,167,255, + 0,171,255, + 0,175,255, + 0,179,255, + 0,183,255, + 0,187,255, + 0,191,255, + 0,195,255, + 0,199,255, + 0,203,255, + 0,207,255, + 0,211,255, + 0,215,255, + 0,219,255, + 0,223,255, + 0,227,255, + 0,231,255, + 0,235,255, + 0,239,255, + 0,243,255, + 0,247,255, + 0,251,255, + 0,255,255, + 0,255,255, + 3,255,251, + 7,255,247, + 11,255,243, + 15,255,239, + 19,255,235, + 23,255,231, + 27,255,227, + 31,255,223, + 35,255,219, + 39,255,215, + 43,255,211, + 47,255,207, + 51,255,203, + 55,255,199, + 59,255,195, + 63,255,191, + 67,255,187, + 71,255,183, + 75,255,179, + 79,255,175, + 83,255,171, + 87,255,167, + 91,255,163, + 95,255,159, + 99,255,155, + 103,255,151, + 107,255,147, + 111,255,143, + 115,255,139, + 119,255,135, + 123,255,131, + 127,255,127, + 131,255,123, + 135,255,119, + 139,255,115, + 143,255,111, + 147,255,107, + 151,255,103, + 155,255,99, + 159,255,95, + 163,255,91, + 167,255,87, + 171,255,83, + 175,255,79, + 179,255,75, + 183,255,71, + 187,255,67, + 191,255,63, + 195,255,59, + 199,255,55, + 203,255,51, + 207,255,47, + 211,255,43, + 215,255,39, + 219,255,35, + 223,255,31, + 227,255,27, + 231,255,23, + 235,255,19, + 239,255,15, + 243,255,11, + 247,255,7, + 251,255,3, + 255,255,0, + 255,251,0, + 255,247,0, + 255,243,0, + 255,239,0, + 255,235,0, + 255,231,0, + 255,227,0, + 255,223,0, + 255,219,0, + 255,215,0, + 255,211,0, + 255,207,0, + 255,203,0, + 255,199,0, + 255,195,0, + 255,191,0, + 255,187,0, + 255,183,0, + 255,179,0, + 255,175,0, + 255,171,0, + 255,167,0, + 255,163,0, + 255,159,0, + 255,155,0, + 255,151,0, + 255,147,0, + 255,143,0, + 255,139,0, + 255,135,0, + 255,131,0, + 255,127,0, + 255,123,0, + 255,119,0, + 255,115,0, + 255,111,0, + 255,107,0, + 255,103,0, + 255,99,0, + 255,95,0, + 255,91,0, + 255,87,0, + 255,83,0, + 255,79,0, + 255,75,0, + 255,71,0, + 255,67,0, + 255,63,0, + 255,59,0, + 255,55,0, + 255,51,0, + 255,47,0, + 255,43,0, + 255,39,0, + 255,35,0, + 255,31,0, + 255,27,0, + 255,23,0, + 255,19,0, + 255,15,0, + 255,11,0, + 255,7,0, + 255,3,0, + 255,0,0, + 250,0,0, + 246,0,0, + 241,0,0, + 237,0,0, + 233,0,0, + 228,0,0, + 224,0,0, + 219,0,0, + 215,0,0, + 211,0,0, + 206,0,0, + 202,0,0, + 197,0,0, + 193,0,0, + 189,0,0, + 184,0,0, + 180,0,0, + 175,0,0, + 171,0,0, + 167,0,0, + 162,0,0, + 158,0,0, + 153,0,0, + 149,0,0, + 145,0,0, + 140,0,0, + 136,0,0, + 131,0,0, + 127,0,0 }; +/* clang-format on */ diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 939f6aa..ac5d641 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -58,17 +58,17 @@ size_t indent = 0; /* Data structure to pass application data to callbacks. */ typedef struct { - void *app_image_ptr; /* Pointer to application buffer */ - size_t app_image_size; /* Size of application buffer */ - void *fapl_image_ptr; /* Pointer to FAPL buffer */ - size_t fapl_image_size; /* Size of FAPL buffer */ - int fapl_ref_count; /* Reference counter for FAPL buffer */ - void *vfd_image_ptr; /* Pointer to VFD buffer */ - size_t vfd_image_size; /* Size of VFD buffer */ - int vfd_ref_count; /* Reference counter for VFD buffer */ - unsigned flags; /* Flags indicate how the file image will */ + void *app_image_ptr; /* Pointer to application buffer */ + size_t app_image_size; /* Size of application buffer */ + void *fapl_image_ptr; /* Pointer to FAPL buffer */ + size_t fapl_image_size; /* Size of FAPL buffer */ + int fapl_ref_count; /* Reference counter for FAPL buffer */ + void *vfd_image_ptr; /* Pointer to VFD buffer */ + size_t vfd_image_size; /* Size of VFD buffer */ + int vfd_ref_count; /* Reference counter for VFD buffer */ + unsigned flags; /* Flags indicate how the file image will */ /* be open */ - int ref_count; /* Reference counter on udata struct */ + int ref_count; /* Reference counter on udata struct */ } H5LT_file_image_ud_t; /* callbacks prototypes for file image ops */ @@ -81,7 +81,7 @@ static herr_t udata_free(void *udata); /* Definition of callbacks for file image operations. */ - + /*------------------------------------------------------------------------- * Function: image_malloc * @@ -127,9 +127,9 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata) udata->fapl_image_size = udata->app_image_size; return_value = udata->fapl_image_ptr; udata->fapl_ref_count++; - break; + break; - case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY: + case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY: if (udata->fapl_image_ptr == NULL) goto out; if (udata->fapl_image_size != size) @@ -139,7 +139,7 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata) return_value = udata->fapl_image_ptr; udata->fapl_ref_count++; - break; + break; case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET: goto out; @@ -160,16 +160,16 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata) goto out; udata->vfd_image_ptr = udata->fapl_image_ptr; - udata->vfd_image_size = size; + udata->vfd_image_size = size; udata->vfd_ref_count++; return_value = udata->vfd_image_ptr; break; - /* added unused labels to shut the compiler up */ - case H5FD_FILE_IMAGE_OP_NO_OP: - case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE: - case H5FD_FILE_IMAGE_OP_FILE_RESIZE: - case H5FD_FILE_IMAGE_OP_FILE_CLOSE: + /* added unused labels to shut the compiler up */ + case H5FD_FILE_IMAGE_OP_NO_OP: + case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE: + case H5FD_FILE_IMAGE_OP_FILE_RESIZE: + case H5FD_FILE_IMAGE_OP_FILE_CLOSE: default: goto out; } /* end switch */ @@ -180,7 +180,7 @@ out: return NULL; } /* end image_malloc() */ - + /*------------------------------------------------------------------------- * Function: image_memcpy * @@ -251,11 +251,11 @@ image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file goto out; break; - /* added unused labels to shut the compiler up */ - case H5FD_FILE_IMAGE_OP_NO_OP: - case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE: - case H5FD_FILE_IMAGE_OP_FILE_RESIZE: - case H5FD_FILE_IMAGE_OP_FILE_CLOSE: + /* added unused labels to shut the compiler up */ + case H5FD_FILE_IMAGE_OP_NO_OP: + case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE: + case H5FD_FILE_IMAGE_OP_FILE_RESIZE: + case H5FD_FILE_IMAGE_OP_FILE_CLOSE: default: goto out; } /* end switch */ @@ -266,7 +266,7 @@ out: return NULL; } /* end image_memcpy() */ - + /*------------------------------------------------------------------------- * Function: image_realloc * @@ -351,7 +351,7 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata) switch(file_image_op) { case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE: - if (udata->fapl_image_ptr != ptr) + if (udata->fapl_image_ptr != ptr) goto out; if (udata->fapl_ref_count == 0) goto out; @@ -386,14 +386,14 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata) } /* end if */ break; - /* added unused labels to keep the compiler quite */ - case H5FD_FILE_IMAGE_OP_NO_OP: - case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET: - case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY: - case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET: - case H5FD_FILE_IMAGE_OP_FILE_OPEN: - case H5FD_FILE_IMAGE_OP_FILE_RESIZE: - default: + /* added unused labels to keep the compiler quite */ + case H5FD_FILE_IMAGE_OP_NO_OP: + case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET: + case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY: + case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET: + case H5FD_FILE_IMAGE_OP_FILE_OPEN: + case H5FD_FILE_IMAGE_OP_FILE_RESIZE: + default: goto out; } /* end switch */ @@ -403,7 +403,7 @@ out: return(FAIL); } /* end image_free() */ - + /*------------------------------------------------------------------------- * Function: udata_copy * @@ -843,7 +843,7 @@ out: return -1; } - + /*------------------------------------------------------------------------- * Function: H5LTopen_file_image * @@ -859,9 +859,9 @@ out: */ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags) { - hid_t fapl=-1, file_id=-1; /* HDF5 identifiers */ + hid_t fapl=-1, file_id=-1; /* HDF5 identifiers */ unsigned file_open_flags; /* Flags for image open */ - char file_name[64]; /* Filename buffer */ + char file_name[64]; /* Filename buffer */ size_t alloc_incr; /* Buffer allocation increment */ size_t min_incr = 65536; /* Minimum buffer increment */ double buf_prcnt = 0.1f; /* Percentage of buffer size to set @@ -898,7 +898,7 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags) /* Set callbacks for file image ops ONLY if the file image is NOT copied */ if (flags & H5LT_FILE_IMAGE_DONT_COPY) { - H5LT_file_image_ud_t *udata; /* Pointer to udata structure */ + H5LT_file_image_ud_t *udata; /* Pointer to udata structure */ /* Allocate buffer to communicate user data to callbacks */ if (NULL == (udata = (H5LT_file_image_ud_t *)HDmalloc(sizeof(H5LT_file_image_ud_t)))) @@ -1407,13 +1407,13 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *op_ * modify the op_data buffer (i.e.: dset_name) during the traversal, and the * library never modifies that buffer. */ -H5_GCC_DIAG_OFF(cast-qual) +H5_GCC_DIAG_OFF("cast-qual") herr_t H5LTfind_dataset( hid_t loc_id, const char *dset_name ) { return H5Literate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, 0, find_dataset, (void *)dset_name); } -H5_GCC_DIAG_ON(cast-qual) +H5_GCC_DIAG_ON("cast-qual") /*------------------------------------------------------------------------- * @@ -2038,13 +2038,13 @@ herr_t H5LTfind_attribute( hid_t loc_id, const char* attr_name ) * modify the op_data buffer (i.e.: attr_name) during the traversal, and the * library never modifies that buffer. */ -H5_GCC_DIAG_OFF(cast-qual) +H5_GCC_DIAG_OFF("cast-qual") herr_t H5LT_find_attribute( hid_t loc_id, const char* attr_name ) { return H5Aiterate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, find_attr, (void *)attr_name); } -H5_GCC_DIAG_ON(cast-qual) +H5_GCC_DIAG_ON("cast-qual") /*------------------------------------------------------------------------- @@ -2297,13 +2297,13 @@ realloc_and_append(hbool_t _no_user_buf, size_t *len, char *buf, const char *str * extend past the allocated buffer; if it does then truncate the string */ if(size_str < *len - 1) { - if( size_str + size_str_to_add < *len - 1) { - HDstrncat(buf, str_to_add, size_str_to_add); - } else { - HDstrncat(buf, str_to_add, (*len - 1) - size_str); - } + if( size_str + size_str_to_add < *len - 1) { + HDstrncat(buf, str_to_add, size_str_to_add); + } else { + HDstrncat(buf, str_to_add, (*len - 1) - size_str); + } } else { - buf[*len-1] = '\0'; /* buffer is full, null terminate */ + buf[*len-1] = '\0'; /* buffer is full, null terminate */ } } @@ -3062,15 +3062,15 @@ next: HDsnprintf(dt_str, *slen, "H5T_NO_CLASS"); break; case H5T_REFERENCE: - if (H5Tequal(dtype, H5T_STD_REF_DSETREG) == TRUE) { - HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_DSETREG }"); - } - else { - HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_OBJECT }"); - } - break; + if (H5Tequal(dtype, H5T_STD_REF_DSETREG) == TRUE) { + HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_DSETREG }"); + } + else { + HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_OBJECT }"); + } + break; case H5T_NCLASSES: - break; + break; default: HDsnprintf(dt_str, *slen, "unknown data type"); } @@ -3626,7 +3626,7 @@ out: return -1; } - + /*------------------------------------------------------------------------- * Function: H5LT_set_attribute_string * @@ -3746,12 +3746,12 @@ H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid) if(HDstrncmp(path, ".", path_length) == 0) { if(check_object_valid) { obj_exists = H5Oexists_by_name(loc_id, path, H5P_DEFAULT); - ret_value = obj_exists; - goto done; + ret_value = obj_exists; + goto done; } else { - ret_value = TRUE; /* Since the object is the identifier itself, - * we can only check if loc_id is a valid type */ - goto done; + ret_value = TRUE; /* Since the object is the identifier itself, + * we can only check if loc_id is a valid type */ + goto done; } } @@ -3775,20 +3775,20 @@ H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid) obj_exists = FALSE; if((link_exists = H5Lexists(loc_id, tmp_path, H5P_DEFAULT)) < 0) { - ret_value = FAIL; - goto done; + ret_value = FAIL; + goto done; } /* If target link does not exist then no reason to * continue checking the path */ if(link_exists != TRUE) { - ret_value = FALSE; - goto done; + ret_value = FALSE; + goto done; } /* Determine if link resolves to an actual object */ if((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) { - ret_value = FAIL; + ret_value = FAIL; goto done; } @@ -3812,11 +3812,11 @@ H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid) ret_value = link_exists; /* Determine if link resolves to an actual object for check_object_valid TRUE */ if(check_object_valid == TRUE && link_exists == TRUE) { - if((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) { - ret_value = FAIL; - } else { - ret_value = obj_exists; - } + if((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) { + ret_value = FAIL; + } else { + ret_value = obj_exists; + } } } diff --git a/hl/test/pal_rgb.h b/hl/test/pal_rgb.h index 4b22bea..488ee42 100644 --- a/hl/test/pal_rgb.h +++ b/hl/test/pal_rgb.h @@ -11,261 +11,270 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -const unsigned char pal_rgb[256*3] = {255,255,255, -0,0,131, -0,0,135, -0,0,139, -0,0,143, -0,0,147, -0,0,151, -0,0,155, -0,0,159, -0,0,163, -0,0,167, -0,0,171, -0,0,175, -0,0,179, -0,0,183, -0,0,187, -0,0,191, -0,0,195, -0,0,199, -0,0,203, -0,0,207, -0,0,211, -0,0,215, -0,0,219, -0,0,223, -0,0,227, -0,0,231, -0,0,235, -0,0,239, -0,0,243, -0,0,247, -0,0,251, -0,0,255, -0,0,255, -0,3,255, -0,7,255, -0,11,255, -0,15,255, -0,19,255, -0,23,255, -0,27,255, -0,31,255, -0,35,255, -0,39,255, -0,43,255, -0,47,255, -0,51,255, -0,55,255, -0,59,255, -0,63,255, -0,67,255, -0,71,255, -0,75,255, -0,79,255, -0,83,255, -0,87,255, -0,91,255, -0,95,255, -0,99,255, -0,103,255, -0,107,255, -0,111,255, -0,115,255, -0,119,255, -0,123,255, -0,127,255, -0,131,255, -0,135,255, -0,139,255, -0,143,255, -0,147,255, -0,151,255, -0,155,255, -0,159,255, -0,163,255, -0,167,255, -0,171,255, -0,175,255, -0,179,255, -0,183,255, -0,187,255, -0,191,255, -0,195,255, -0,199,255, -0,203,255, -0,207,255, -0,211,255, -0,215,255, -0,219,255, -0,223,255, -0,227,255, -0,231,255, -0,235,255, -0,239,255, -0,243,255, -0,247,255, -0,251,255, -0,255,255, -0,255,255, -3,255,251, -7,255,247, -11,255,243, -15,255,239, -19,255,235, -23,255,231, -27,255,227, -31,255,223, -35,255,219, -39,255,215, -43,255,211, -47,255,207, -51,255,203, -55,255,199, -59,255,195, -63,255,191, -67,255,187, -71,255,183, -75,255,179, -79,255,175, -83,255,171, -87,255,167, -91,255,163, -95,255,159, -99,255,155, -103,255,151, -107,255,147, -111,255,143, -115,255,139, -119,255,135, -123,255,131, -127,255,127, -131,255,123, -135,255,119, -139,255,115, -143,255,111, -147,255,107, -151,255,103, -155,255,99, -159,255,95, -163,255,91, -167,255,87, -171,255,83, -175,255,79, -179,255,75, -183,255,71, -187,255,67, -191,255,63, -195,255,59, -199,255,55, -203,255,51, -207,255,47, -211,255,43, -215,255,39, -219,255,35, -223,255,31, -227,255,27, -231,255,23, -235,255,19, -239,255,15, -243,255,11, -247,255,7, -251,255,3, -255,255,0, -255,251,0, -255,247,0, -255,243,0, -255,239,0, -255,235,0, -255,231,0, -255,227,0, -255,223,0, -255,219,0, -255,215,0, -255,211,0, -255,207,0, -255,203,0, -255,199,0, -255,195,0, -255,191,0, -255,187,0, -255,183,0, -255,179,0, -255,175,0, -255,171,0, -255,167,0, -255,163,0, -255,159,0, -255,155,0, -255,151,0, -255,147,0, -255,143,0, -255,139,0, -255,135,0, -255,131,0, -255,127,0, -255,123,0, -255,119,0, -255,115,0, -255,111,0, -255,107,0, -255,103,0, -255,99,0, -255,95,0, -255,91,0, -255,87,0, -255,83,0, -255,79,0, -255,75,0, -255,71,0, -255,67,0, -255,63,0, -255,59,0, -255,55,0, -255,51,0, -255,47,0, -255,43,0, -255,39,0, -255,35,0, -255,31,0, -255,27,0, -255,23,0, -255,19,0, -255,15,0, -255,11,0, -255,7,0, -255,3,0, -255,0,0, -250,0,0, -246,0,0, -241,0,0, -237,0,0, -233,0,0, -228,0,0, -224,0,0, -219,0,0, -215,0,0, -211,0,0, -206,0,0, -202,0,0, -197,0,0, -193,0,0, -189,0,0, -184,0,0, -180,0,0, -175,0,0, -171,0,0, -167,0,0, -162,0,0, -158,0,0, -153,0,0, -149,0,0, -145,0,0, -140,0,0, -136,0,0, -131,0,0, -127,0,0 +/* clang-format off */ +const unsigned char pal_rgb[256*3] = { + 255,255,255, + 0,0,131, + 0,0,135, + 0,0,139, + 0,0,143, + 0,0,147, + 0,0,151, + 0,0,155, + 0,0,159, + 0,0,163, + 0,0,167, + 0,0,171, + 0,0,175, + 0,0,179, + 0,0,183, + 0,0,187, + 0,0,191, + 0,0,195, + 0,0,199, + 0,0,203, + 0,0,207, + 0,0,211, + 0,0,215, + 0,0,219, + 0,0,223, + 0,0,227, + 0,0,231, + 0,0,235, + 0,0,239, + 0,0,243, + 0,0,247, + 0,0,251, + 0,0,255, + 0,0,255, + 0,3,255, + 0,7,255, + 0,11,255, + 0,15,255, + 0,19,255, + 0,23,255, + 0,27,255, + 0,31,255, + 0,35,255, + 0,39,255, + 0,43,255, + 0,47,255, + 0,51,255, + 0,55,255, + 0,59,255, + 0,63,255, + 0,67,255, + 0,71,255, + 0,75,255, + 0,79,255, + 0,83,255, + 0,87,255, + 0,91,255, + 0,95,255, + 0,99,255, + 0,103,255, + 0,107,255, + 0,111,255, + 0,115,255, + 0,119,255, + 0,123,255, + 0,127,255, + 0,131,255, + 0,135,255, + 0,139,255, + 0,143,255, + 0,147,255, + 0,151,255, + 0,155,255, + 0,159,255, + 0,163,255, + 0,167,255, + 0,171,255, + 0,175,255, + 0,179,255, + 0,183,255, + 0,187,255, + 0,191,255, + 0,195,255, + 0,199,255, + 0,203,255, + 0,207,255, + 0,211,255, + 0,215,255, + 0,219,255, + 0,223,255, + 0,227,255, + 0,231,255, + 0,235,255, + 0,239,255, + 0,243,255, + 0,247,255, + 0,251,255, + 0,255,255, + 0,255,255, + 3,255,251, + 7,255,247, + 11,255,243, + 15,255,239, + 19,255,235, + 23,255,231, + 27,255,227, + 31,255,223, + 35,255,219, + 39,255,215, + 43,255,211, + 47,255,207, + 51,255,203, + 55,255,199, + 59,255,195, + 63,255,191, + 67,255,187, + 71,255,183, + 75,255,179, + 79,255,175, + 83,255,171, + 87,255,167, + 91,255,163, + 95,255,159, + 99,255,155, + 103,255,151, + 107,255,147, + 111,255,143, + 115,255,139, + 119,255,135, + 123,255,131, + 127,255,127, + 131,255,123, + 135,255,119, + 139,255,115, + 143,255,111, + 147,255,107, + 151,255,103, + 155,255,99, + 159,255,95, + 163,255,91, + 167,255,87, + 171,255,83, + 175,255,79, + 179,255,75, + 183,255,71, + 187,255,67, + 191,255,63, + 195,255,59, + 199,255,55, + 203,255,51, + 207,255,47, + 211,255,43, + 215,255,39, + 219,255,35, + 223,255,31, + 227,255,27, + 231,255,23, + 235,255,19, + 239,255,15, + 243,255,11, + 247,255,7, + 251,255,3, + 255,255,0, + 255,251,0, + 255,247,0, + 255,243,0, + 255,239,0, + 255,235,0, + 255,231,0, + 255,227,0, + 255,223,0, + 255,219,0, + 255,215,0, + 255,211,0, + 255,207,0, + 255,203,0, + 255,199,0, + 255,195,0, + 255,191,0, + 255,187,0, + 255,183,0, + 255,179,0, + 255,175,0, + 255,171,0, + 255,167,0, + 255,163,0, + 255,159,0, + 255,155,0, + 255,151,0, + 255,147,0, + 255,143,0, + 255,139,0, + 255,135,0, + 255,131,0, + 255,127,0, + 255,123,0, + 255,119,0, + 255,115,0, + 255,111,0, + 255,107,0, + 255,103,0, + 255,99,0, + 255,95,0, + 255,91,0, + 255,87,0, + 255,83,0, + 255,79,0, + 255,75,0, + 255,71,0, + 255,67,0, + 255,63,0, + 255,59,0, + 255,55,0, + 255,51,0, + 255,47,0, + 255,43,0, + 255,39,0, + 255,35,0, + 255,31,0, + 255,27,0, + 255,23,0, + 255,19,0, + 255,15,0, + 255,11,0, + 255,7,0, + 255,3,0, + 255,0,0, + 250,0,0, + 246,0,0, + 241,0,0, + 237,0,0, + 233,0,0, + 228,0,0, + 224,0,0, + 219,0,0, + 215,0,0, + 211,0,0, + 206,0,0, + 202,0,0, + 197,0,0, + 193,0,0, + 189,0,0, + 184,0,0, + 180,0,0, + 175,0,0, + 171,0,0, + 167,0,0, + 162,0,0, + 158,0,0, + 153,0,0, + 149,0,0, + 145,0,0, + 140,0,0, + 136,0,0, + 131,0,0, + 127,0,0 }; +/* clang-format on */ + + + + + + diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index 8fdca35..f9354d7 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -26,8 +26,8 @@ extern "C" { #include <stdlib.h> #include "h5jni.h" -H5_GCC_DIAG_OFF(missing-prototypes) -H5_GCC_DIAG_OFF(unused-parameter) +H5_GCC_DIAG_OFF("missing-prototypes") +H5_GCC_DIAG_OFF("unused-parameter") JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5_1QUARTER_1HADDR_1MAX(JNIEnv *env, jclass cls) { return (hsize_t)HADDR_MAX/4; } @@ -365,7 +365,7 @@ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_HDF5Constants_H5ES_1STATUS_1CANCELED(JNIEnv *env, jclass cls) { return H5ES_STATUS_CANCELED; } /* Java does not have unsigned native types */ -H5_GCC_DIAG_OFF(sign-conversion) +H5_GCC_DIAG_OFF("sign-conversion") JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1CREAT(JNIEnv *env, jclass cls) { return H5F_ACC_CREAT; } JNIEXPORT jint JNICALL @@ -382,7 +382,7 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1READ(JNIEnv *env, jclass cls) { return H5F_ACC_SWMR_READ; } JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1WRITE(JNIEnv *env, jclass cls) { return H5F_ACC_SWMR_WRITE; } -H5_GCC_DIAG_ON(sign-conversion) +H5_GCC_DIAG_ON("sign-conversion") JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5F_1CLOSE_1DEFAULT(JNIEnv *env, jclass cls) { return H5F_CLOSE_DEFAULT; } @@ -1410,8 +1410,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5Z_1SCALEOFFSET_1USER_1NPARMS(JNIEnv *env, jclas JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1ALL(JNIEnv *env, jclass cls) { return H5Z_FILTER_ALL; } -H5_GCC_DIAG_ON(missing-prototypes) -H5_GCC_DIAG_ON(unused-parameter) +H5_GCC_DIAG_ON("missing-prototypes") +H5_GCC_DIAG_ON("unused-parameter") #ifdef __cplusplus } /* end extern "C" */ diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 84c6672..f59afd4 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -13,12 +13,12 @@ /*------------------------------------------------------------------------- * - * Created: H5ACprivate.h - * Jul 9 1997 - * Robb Matzke + * Created: H5ACprivate.h + * Jul 9 1997 + * Robb Matzke * - * Purpose: Constants and typedefs available to the rest of the - * library. + * Purpose: Constants and typedefs available to the rest of the + * library. * *------------------------------------------------------------------------- */ @@ -26,14 +26,14 @@ #ifndef _H5ACprivate_H #define _H5ACprivate_H -#include "H5ACpublic.h" /*public prototypes */ +#include "H5ACpublic.h" /*public prototypes */ /* Pivate headers needed by this header */ -#include "H5private.h" /* Generic Functions */ -#include "H5Cprivate.h" /* Cache */ -#include "H5Fprivate.h" /* File access */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5SLprivate.h" /* Skip lists */ +#include "H5private.h" /* Generic Functions */ +#include "H5Cprivate.h" /* Cache */ +#include "H5Fprivate.h" /* File access */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5SLprivate.h" /* Skip lists */ /* Global metadata tag values */ #define H5AC__INVALID_TAG (haddr_t)0 @@ -75,7 +75,7 @@ typedef enum { H5AC_DRVRINFO_ID, /* (26) driver info block (supplements superblock) */ H5AC_EPOCH_MARKER_ID, /* (27) epoch marker - always internal to cache */ H5AC_PROXY_ENTRY_ID, /* (28) cache entry proxy */ - H5AC_PREFETCHED_ENTRY_ID, /* (29) prefetched entry - always internal to cache */ + H5AC_PREFETCHED_ENTRY_ID, /* (29) prefetched entry - always internal to cache */ H5AC_NTYPES /* Number of types, must be last */ } H5AC_type_t; @@ -90,29 +90,29 @@ typedef enum { * * NOTE: test/cache plays games with the f->shared->cache, and thus * setting H5AC_DUMP_STATS_ON_CLOSE will generate constant, - * irrelevant data when run with that test program. See - * comments on setup_cache() / takedown_cache() in test/cache_common.c. + * irrelevant data when run with that test program. See + * comments on setup_cache() / takedown_cache() in test/cache_common.c. * for details. * - * If you need to dump stats at file close in test/cache.c, - * use the dump_stats parameter to takedown_cache(), or call - * H5C_stats() directly. - * JRM -- 4/12/15 + * If you need to dump stats at file close in test/cache.c, + * use the dump_stats parameter to takedown_cache(), or call + * H5C_stats() directly. + * JRM -- 4/12/15 * * Added the H5AC_DUMP_IMAGE_STATS_ON_CLOSE #define, which works much * the same way as H5AC_DUMP_STATS_ON_CLOSE. However, the set of stats * displayed is much smaller, and directed purely at the cache image feature. * - * JRM -- 11/1/15 + * JRM -- 11/1/15 */ #if H5C_COLLECT_CACHE_STATS -#define H5AC_DUMP_STATS_ON_CLOSE 0 +#define H5AC_DUMP_STATS_ON_CLOSE 0 #define H5AC_DUMP_IMAGE_STATS_ON_CLOSE 0 #else /* H5C_COLLECT_CACHE_STATS */ -#define H5AC_DUMP_STATS_ON_CLOSE 0 +#define H5AC_DUMP_STATS_ON_CLOSE 0 #define H5AC_DUMP_IMAGE_STATS_ON_CLOSE 0 #endif /* H5C_COLLECT_CACHE_STATS */ @@ -121,8 +121,8 @@ typedef enum { * At present, these are the same as those given in H5Cprivate.h. */ -#define H5AC__DEFAULT_MAX_CACHE_SIZE H5C__DEFAULT_MAX_CACHE_SIZE -#define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE +#define H5AC__DEFAULT_MAX_CACHE_SIZE H5C__DEFAULT_MAX_CACHE_SIZE +#define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE /* Check if we are sanity checking tagging */ #if H5C_DO_TAGGING_SANITY_CHECKS @@ -132,18 +132,18 @@ typedef enum { #endif /* - * Class methods pertaining to caching. Each type of cached object will + * Class methods pertaining to caching. Each type of cached object will * have a constant variable with permanent life-span that describes how * to cache the object. */ -#define H5AC__SERIALIZE_RESIZED_FLAG H5C__SERIALIZE_RESIZED_FLAG -#define H5AC__SERIALIZE_MOVED_FLAG H5C__SERIALIZE_MOVED_FLAG +#define H5AC__SERIALIZE_RESIZED_FLAG H5C__SERIALIZE_RESIZED_FLAG +#define H5AC__SERIALIZE_MOVED_FLAG H5C__SERIALIZE_MOVED_FLAG /* Cork actions: cork/uncork/get cork status of an object */ -#define H5AC__SET_CORK H5C__SET_CORK -#define H5AC__UNCORK H5C__UNCORK -#define H5AC__GET_CORKED H5C__GET_CORKED +#define H5AC__SET_CORK H5C__SET_CORK +#define H5AC__UNCORK H5C__UNCORK +#define H5AC__GET_CORKED H5C__GET_CORKED /* Aliases for the "ring" type and values */ typedef H5C_ring_t H5AC_ring_t; @@ -159,7 +159,7 @@ typedef H5C_ring_t H5AC_ring_t; typedef H5C_notify_action_t H5AC_notify_action_t; #define H5AC_NOTIFY_ACTION_AFTER_INSERT H5C_NOTIFY_ACTION_AFTER_INSERT #define H5AC_NOTIFY_ACTION_AFTER_LOAD H5C_NOTIFY_ACTION_AFTER_LOAD -#define H5AC_NOTIFY_ACTION_AFTER_FLUSH H5C_NOTIFY_ACTION_AFTER_FLUSH +#define H5AC_NOTIFY_ACTION_AFTER_FLUSH H5C_NOTIFY_ACTION_AFTER_FLUSH #define H5AC_NOTIFY_ACTION_BEFORE_EVICT H5C_NOTIFY_ACTION_BEFORE_EVICT #define H5AC_NOTIFY_ACTION_ENTRY_DIRTIED H5C_NOTIFY_ACTION_ENTRY_DIRTIED #define H5AC_NOTIFY_ACTION_ENTRY_CLEANED H5C_NOTIFY_ACTION_ENTRY_CLEANED @@ -168,36 +168,36 @@ typedef H5C_notify_action_t H5AC_notify_action_t; #define H5AC_NOTIFY_ACTION_CHILD_UNSERIALIZED H5C_NOTIFY_ACTION_CHILD_UNSERIALIZED #define H5AC_NOTIFY_ACTION_CHILD_SERIALIZED H5C_NOTIFY_ACTION_CHILD_SERIALIZED -#define H5AC__CLASS_NO_FLAGS_SET H5C__CLASS_NO_FLAGS_SET +#define H5AC__CLASS_NO_FLAGS_SET H5C__CLASS_NO_FLAGS_SET #define H5AC__CLASS_SPECULATIVE_LOAD_FLAG H5C__CLASS_SPECULATIVE_LOAD_FLAG /* The following flags should only appear in test code */ #define H5AC__CLASS_SKIP_READS H5C__CLASS_SKIP_READS #define H5AC__CLASS_SKIP_WRITES H5C__CLASS_SKIP_WRITES -typedef H5C_get_initial_load_size_func_t H5AC_get_initial_load_size_func_t; -typedef H5C_get_final_load_size_func_t H5AC_get_final_load_size_func_t; -typedef H5C_verify_chksum_func_t H5AC_verify_chksum_func_t; -typedef H5C_deserialize_func_t H5AC_deserialize_func_t; -typedef H5C_image_len_func_t H5AC_image_len_func_t; +typedef H5C_get_initial_load_size_func_t H5AC_get_initial_load_size_func_t; +typedef H5C_get_final_load_size_func_t H5AC_get_final_load_size_func_t; +typedef H5C_verify_chksum_func_t H5AC_verify_chksum_func_t; +typedef H5C_deserialize_func_t H5AC_deserialize_func_t; +typedef H5C_image_len_func_t H5AC_image_len_func_t; #define H5AC__SERIALIZE_NO_FLAGS_SET H5C__SERIALIZE_NO_FLAGS_SET #define H5AC__SERIALIZE_RESIZED_FLAG H5C__SERIALIZE_RESIZED_FLAG #define H5AC__SERIALIZE_MOVED_FLAG H5C__SERIALIZE_MOVED_FLAG -typedef H5C_pre_serialize_func_t H5AC_pre_serialize_func_t; -typedef H5C_serialize_func_t H5AC_serialize_func_t; -typedef H5C_notify_func_t H5AC_notify_func_t; -typedef H5C_free_icr_func_t H5AC_free_icr_func_t; -typedef H5C_get_fsf_size_t H5AC_get_fsf_size_t; +typedef H5C_pre_serialize_func_t H5AC_pre_serialize_func_t; +typedef H5C_serialize_func_t H5AC_serialize_func_t; +typedef H5C_notify_func_t H5AC_notify_func_t; +typedef H5C_free_icr_func_t H5AC_free_icr_func_t; +typedef H5C_get_fsf_size_t H5AC_get_fsf_size_t; -typedef H5C_class_t H5AC_class_t; +typedef H5C_class_t H5AC_class_t; /* Cache entry info */ -typedef H5C_cache_entry_t H5AC_info_t; +typedef H5C_cache_entry_t H5AC_info_t; /* Typedef for metadata cache (defined in H5Cpkg.h) */ -typedef H5C_t H5AC_t; +typedef H5C_t H5AC_t; /* Metadata cache proxy entry type */ typedef struct H5AC_proxy_entry_t { @@ -223,6 +223,7 @@ typedef struct H5AC_proxy_entry_t { #define H5AC__DEFAULT_METADATA_WRITE_STRATEGY \ H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED +/* clang-format off */ #ifdef H5_HAVE_PARALLEL #define H5AC__DEFAULT_CACHE_CONFIG \ { \ @@ -255,9 +256,9 @@ typedef struct H5AC_proxy_entry_t { /* int epochs_before_eviction = */ 3, \ /* hbool_t apply_empty_reserve = */ TRUE, \ /* double empty_reserve = */ 0.1f, \ - /* size_t dirty_bytes_threshold = */ (256 * 1024), \ - /* int metadata_write_strategy = */ \ - H5AC__DEFAULT_METADATA_WRITE_STRATEGY \ + /* size_t dirty_bytes_threshold = */ (256 * 1024), \ + /* int metadata_write_strategy = */ \ + H5AC__DEFAULT_METADATA_WRITE_STRATEGY \ } #else /* H5_HAVE_PARALLEL */ #define H5AC__DEFAULT_CACHE_CONFIG \ @@ -291,9 +292,9 @@ typedef struct H5AC_proxy_entry_t { /* int epochs_before_eviction = */ 3, \ /* hbool_t apply_empty_reserve = */ TRUE, \ /* double empty_reserve = */ 0.1f, \ - /* size_t dirty_bytes_threshold = */ (256 * 1024), \ - /* int metadata_write_strategy = */ \ - H5AC__DEFAULT_METADATA_WRITE_STRATEGY \ + /* size_t dirty_bytes_threshold = */ (256 * 1024), \ + /* int metadata_write_strategy = */ \ + H5AC__DEFAULT_METADATA_WRITE_STRATEGY \ } #endif /* H5_HAVE_PARALLEL */ @@ -304,6 +305,7 @@ typedef struct H5AC_proxy_entry_t { /* hbool_t save_resize_status = */ FALSE, \ /* int32_t entry_ageout = */ H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE \ } +/* clang-format on */ /* * Library prototypes. */ @@ -313,21 +315,21 @@ typedef struct H5AC_proxy_entry_t { * the equivalent flags from H5Cprivate.h. */ -#define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET -#define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG -#define H5AC__DELETED_FLAG H5C__DELETED_FLAG -#define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG -#define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG -#define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG -#define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG -#define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG +#define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET +#define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG +#define H5AC__DELETED_FLAG H5C__DELETED_FLAG +#define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG +#define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG +#define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG +#define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG +#define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG #define H5AC__FLUSH_MARKED_ENTRIES_FLAG H5C__FLUSH_MARKED_ENTRIES_FLAG #define H5AC__FLUSH_IGNORE_PROTECTED_FLAG H5C__FLUSH_IGNORE_PROTECTED_FLAG -#define H5AC__READ_ONLY_FLAG H5C__READ_ONLY_FLAG -#define H5AC__FREE_FILE_SPACE_FLAG H5C__FREE_FILE_SPACE_FLAG +#define H5AC__READ_ONLY_FLAG H5C__READ_ONLY_FLAG +#define H5AC__FREE_FILE_SPACE_FLAG H5C__FREE_FILE_SPACE_FLAG #define H5AC__TAKE_OWNERSHIP_FLAG H5C__TAKE_OWNERSHIP_FLAG -#define H5AC__FLUSH_LAST_FLAG H5C__FLUSH_LAST_FLAG -#define H5AC__FLUSH_COLLECTIVELY_FLAG H5C__FLUSH_COLLECTIVELY_FLAG +#define H5AC__FLUSH_LAST_FLAG H5C__FLUSH_LAST_FLAG +#define H5AC__FLUSH_COLLECTIVELY_FLAG H5C__FLUSH_COLLECTIVELY_FLAG /* #defines of flags used to report entry status in the @@ -19,52 +19,52 @@ * * Purpose: Functions in this file implement a generic cache for * things which exist on disk, and which may be - * unambiguously referenced by their disk addresses. + * unambiguously referenced by their disk addresses. * * The code in this module was initially written in - * support of a complete re-write of the metadata cache - * in H5AC.c However, other uses for the cache code - * suggested themselves, and thus this file was created - * in an attempt to support re-use. + * support of a complete re-write of the metadata cache + * in H5AC.c However, other uses for the cache code + * suggested themselves, and thus this file was created + * in an attempt to support re-use. * - * For a detailed overview of the cache, please see the - * header comment for H5C_t in H5Cpkg.h. + * For a detailed overview of the cache, please see the + * header comment for H5C_t in H5Cpkg.h. * *------------------------------------------------------------------------- */ /************************************************************************** * - * To Do: + * To Do: * - * Code Changes: + * Code Changes: * - * - Remove extra functionality in H5C__flush_single_entry()? + * - Remove extra functionality in H5C__flush_single_entry()? * - * - Change protect/unprotect to lock/unlock. + * - Change protect/unprotect to lock/unlock. * - * - Flush entries in increasing address order in - * H5C__make_space_in_cache(). + * - Flush entries in increasing address order in + * H5C__make_space_in_cache(). * - * - Also in H5C__make_space_in_cache(), use high and low water marks - * to reduce the number of I/O calls. + * - Also in H5C__make_space_in_cache(), use high and low water marks + * to reduce the number of I/O calls. * - * - When flushing, attempt to combine contiguous entries to reduce - * I/O overhead. Can't do this just yet as some entries are not - * contiguous. Do this in parallel only or in serial as well? + * - When flushing, attempt to combine contiguous entries to reduce + * I/O overhead. Can't do this just yet as some entries are not + * contiguous. Do this in parallel only or in serial as well? * - * - Create MPI type for dirty objects when flushing in parallel. + * - Create MPI type for dirty objects when flushing in parallel. * - * - Now that TBBT routines aren't used, fix nodes in memory to + * - Now that TBBT routines aren't used, fix nodes in memory to * point directly to the skip list node from the LRU list, eliminating * skip list lookups when evicting objects from the cache. * - * Tests: + * Tests: * - * - Trim execution time. (This is no longer a major issue with the - * shift from the TBBT to a hash table for indexing.) + * - Trim execution time. (This is no longer a major issue with the + * shift from the TBBT to a hash table for indexing.) * - * - Add random tests. + * - Add random tests. * **************************************************************************/ @@ -73,21 +73,21 @@ /****************/ #include "H5Cmodule.h" /* This source code file is part of the H5C module */ -#define H5F_FRIEND /* suppress error about including H5Fpkg */ +#define H5F_FRIEND /* suppress error about including H5Fpkg */ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Cpkg.h" /* Cache */ +#include "H5private.h" /* Generic Functions */ +#include "H5Cpkg.h" /* Cache */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* Files */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MFprivate.h" /* File memory management */ -#include "H5MMprivate.h" /* Memory management */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* Files */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MFprivate.h" /* File memory management */ +#include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ @@ -215,21 +215,21 @@ H5FL_DEFINE_STATIC(H5C_t); H5FL_SEQ_DEFINE_STATIC(H5C_cache_entry_ptr_t); - + /*------------------------------------------------------------------------- * Function: H5C_create * * Purpose: Allocate, initialize, and return the address of a new - * instance of H5C_t. + * instance of H5C_t. * - * In general, the max_cache_size parameter must be positive, - * and the min_clean_size parameter must lie in the closed - * interval [0, max_cache_size]. + * In general, the max_cache_size parameter must be positive, + * and the min_clean_size parameter must lie in the closed + * interval [0, max_cache_size]. * - * The check_write_permitted parameter must either be NULL, - * or point to a function of type H5C_write_permitted_func_t. - * If it is NULL, the cache will use the write_permitted - * flag to determine whether writes are permitted. + * The check_write_permitted parameter must either be NULL, + * or point to a function of type H5C_write_permitted_func_t. + * If it is NULL, the cache will use the write_permitted + * flag to determine whether writes are permitted. * * Return: Success: Pointer to the new instance. * @@ -305,24 +305,24 @@ H5FL_SEQ_DEFINE_STATIC(H5C_cache_entry_ptr_t); * * JRM -- 4/20/20 * Added initialization for the slist_enabled field. Recall - * that the slist is used to flush metadata cache entries - * in (roughly) increasing address order. While this is + * that the slist is used to flush metadata cache entries + * in (roughly) increasing address order. While this is * needed at flush and close, it is not used elsewhere. - * The slist_enabled field exists to allow us to construct + * The slist_enabled field exists to allow us to construct * the slist when needed, and leave it empty otherwise -- thus * avoiding the overhead of maintaining it. - * + * * JRM -- 4/29/20 - * + * *------------------------------------------------------------------------- */ H5C_t * -H5C_create(size_t max_cache_size, - size_t min_clean_size, - int max_type_id, +H5C_create(size_t max_cache_size, + size_t min_clean_size, + int max_type_id, const H5C_class_t * const * class_table_ptr, H5C_write_permitted_func_t check_write_permitted, - hbool_t write_permitted, + hbool_t write_permitted, H5C_log_flush_func_t log_flush, void * aux_ptr) { @@ -346,7 +346,7 @@ H5C_create(size_t max_cache_size, } /* end for */ if(NULL == (cache_ptr = H5FL_CALLOC(H5C_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") if(NULL == (cache_ptr->slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, NULL, "can't create skip list") @@ -358,34 +358,34 @@ H5C_create(size_t max_cache_size, * the fields. */ - cache_ptr->magic = H5C__H5C_T_MAGIC; + cache_ptr->magic = H5C__H5C_T_MAGIC; - cache_ptr->flush_in_progress = FALSE; + cache_ptr->flush_in_progress = FALSE; if(NULL == (cache_ptr->log_info = (H5C_log_info_t *)H5MM_calloc(sizeof(H5C_log_info_t)))) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed") - cache_ptr->aux_ptr = aux_ptr; + cache_ptr->aux_ptr = aux_ptr; - cache_ptr->max_type_id = max_type_id; + cache_ptr->max_type_id = max_type_id; - cache_ptr->class_table_ptr = class_table_ptr; + cache_ptr->class_table_ptr = class_table_ptr; - cache_ptr->max_cache_size = max_cache_size; - cache_ptr->min_clean_size = min_clean_size; + cache_ptr->max_cache_size = max_cache_size; + cache_ptr->min_clean_size = min_clean_size; - cache_ptr->check_write_permitted = check_write_permitted; - cache_ptr->write_permitted = write_permitted; + cache_ptr->check_write_permitted = check_write_permitted; + cache_ptr->write_permitted = write_permitted; - cache_ptr->log_flush = log_flush; + cache_ptr->log_flush = log_flush; - cache_ptr->evictions_enabled = TRUE; - cache_ptr->close_warning_received = FALSE; + cache_ptr->evictions_enabled = TRUE; + cache_ptr->close_warning_received = FALSE; - cache_ptr->index_len = 0; - cache_ptr->index_size = (size_t)0; - cache_ptr->clean_index_size = (size_t)0; - cache_ptr->dirty_index_size = (size_t)0; + cache_ptr->index_len = 0; + cache_ptr->index_size = (size_t)0; + cache_ptr->clean_index_size = (size_t)0; + cache_ptr->dirty_index_size = (size_t)0; for(i = 0; i < H5C_RING_NTYPES; i++) { cache_ptr->index_ring_len[i] = 0; @@ -415,98 +415,98 @@ H5C_create(size_t max_cache_size, cache_ptr->slist_len = 0; cache_ptr->slist_size = (size_t)0; - /* slist_ring_len, slist_ring_size, and + /* slist_ring_len, slist_ring_size, and * slist_ptr initializaed above. */ #if H5C_DO_SANITY_CHECKS - cache_ptr->slist_len_increase = 0; - cache_ptr->slist_size_increase = 0; + cache_ptr->slist_len_increase = 0; + cache_ptr->slist_size_increase = 0; #endif /* H5C_DO_SANITY_CHECKS */ - cache_ptr->entries_removed_counter = 0; - cache_ptr->last_entry_removed_ptr = NULL; + cache_ptr->entries_removed_counter = 0; + cache_ptr->last_entry_removed_ptr = NULL; cache_ptr->entry_watched_for_removal = NULL; - cache_ptr->pl_len = 0; - cache_ptr->pl_size = (size_t)0; - cache_ptr->pl_head_ptr = NULL; - cache_ptr->pl_tail_ptr = NULL; + cache_ptr->pl_len = 0; + cache_ptr->pl_size = (size_t)0; + cache_ptr->pl_head_ptr = NULL; + cache_ptr->pl_tail_ptr = NULL; - cache_ptr->pel_len = 0; - cache_ptr->pel_size = (size_t)0; - cache_ptr->pel_head_ptr = NULL; - cache_ptr->pel_tail_ptr = NULL; + cache_ptr->pel_len = 0; + cache_ptr->pel_size = (size_t)0; + cache_ptr->pel_head_ptr = NULL; + cache_ptr->pel_tail_ptr = NULL; - cache_ptr->LRU_list_len = 0; - cache_ptr->LRU_list_size = (size_t)0; - cache_ptr->LRU_head_ptr = NULL; - cache_ptr->LRU_tail_ptr = NULL; + cache_ptr->LRU_list_len = 0; + cache_ptr->LRU_list_size = (size_t)0; + cache_ptr->LRU_head_ptr = NULL; + cache_ptr->LRU_tail_ptr = NULL; #ifdef H5_HAVE_PARALLEL - cache_ptr->coll_list_len = 0; - cache_ptr->coll_list_size = (size_t)0; - cache_ptr->coll_head_ptr = NULL; - cache_ptr->coll_tail_ptr = NULL; - cache_ptr->coll_write_list = NULL; + cache_ptr->coll_list_len = 0; + cache_ptr->coll_list_size = (size_t)0; + cache_ptr->coll_head_ptr = NULL; + cache_ptr->coll_tail_ptr = NULL; + cache_ptr->coll_write_list = NULL; #endif /* H5_HAVE_PARALLEL */ #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - cache_ptr->cLRU_list_len = 0; - cache_ptr->cLRU_list_size = (size_t)0; - cache_ptr->cLRU_head_ptr = NULL; - cache_ptr->cLRU_tail_ptr = NULL; - - cache_ptr->dLRU_list_len = 0; - cache_ptr->dLRU_list_size = (size_t)0; - cache_ptr->dLRU_head_ptr = NULL; - cache_ptr->dLRU_tail_ptr = NULL; + cache_ptr->cLRU_list_len = 0; + cache_ptr->cLRU_list_size = (size_t)0; + cache_ptr->cLRU_head_ptr = NULL; + cache_ptr->cLRU_tail_ptr = NULL; + + cache_ptr->dLRU_list_len = 0; + cache_ptr->dLRU_list_size = (size_t)0; + cache_ptr->dLRU_head_ptr = NULL; + cache_ptr->dLRU_tail_ptr = NULL; #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - cache_ptr->size_increase_possible = FALSE; + cache_ptr->size_increase_possible = FALSE; cache_ptr->flash_size_increase_possible = FALSE; cache_ptr->flash_size_increase_threshold = 0; - cache_ptr->size_decrease_possible = FALSE; - cache_ptr->resize_enabled = FALSE; - cache_ptr->cache_full = FALSE; - cache_ptr->size_decreased = FALSE; - cache_ptr->resize_in_progress = FALSE; - cache_ptr->msic_in_progress = FALSE; - - (cache_ptr->resize_ctl).version = H5C__CURR_AUTO_SIZE_CTL_VER; - (cache_ptr->resize_ctl).rpt_fcn = NULL; - (cache_ptr->resize_ctl).set_initial_size = FALSE; - (cache_ptr->resize_ctl).initial_size = H5C__DEF_AR_INIT_SIZE; - (cache_ptr->resize_ctl).min_clean_fraction = H5C__DEF_AR_MIN_CLEAN_FRAC; - (cache_ptr->resize_ctl).max_size = H5C__DEF_AR_MAX_SIZE; - (cache_ptr->resize_ctl).min_size = H5C__DEF_AR_MIN_SIZE; - (cache_ptr->resize_ctl).epoch_length = H5C__DEF_AR_EPOCH_LENGTH; - - (cache_ptr->resize_ctl).incr_mode = H5C_incr__off; - (cache_ptr->resize_ctl).lower_hr_threshold = H5C__DEF_AR_LOWER_THRESHHOLD; - (cache_ptr->resize_ctl).increment = H5C__DEF_AR_INCREMENT; - (cache_ptr->resize_ctl).apply_max_increment = TRUE; - (cache_ptr->resize_ctl).max_increment = H5C__DEF_AR_MAX_INCREMENT; + cache_ptr->size_decrease_possible = FALSE; + cache_ptr->resize_enabled = FALSE; + cache_ptr->cache_full = FALSE; + cache_ptr->size_decreased = FALSE; + cache_ptr->resize_in_progress = FALSE; + cache_ptr->msic_in_progress = FALSE; + + (cache_ptr->resize_ctl).version = H5C__CURR_AUTO_SIZE_CTL_VER; + (cache_ptr->resize_ctl).rpt_fcn = NULL; + (cache_ptr->resize_ctl).set_initial_size = FALSE; + (cache_ptr->resize_ctl).initial_size = H5C__DEF_AR_INIT_SIZE; + (cache_ptr->resize_ctl).min_clean_fraction = H5C__DEF_AR_MIN_CLEAN_FRAC; + (cache_ptr->resize_ctl).max_size = H5C__DEF_AR_MAX_SIZE; + (cache_ptr->resize_ctl).min_size = H5C__DEF_AR_MIN_SIZE; + (cache_ptr->resize_ctl).epoch_length = H5C__DEF_AR_EPOCH_LENGTH; + + (cache_ptr->resize_ctl).incr_mode = H5C_incr__off; + (cache_ptr->resize_ctl).lower_hr_threshold = H5C__DEF_AR_LOWER_THRESHHOLD; + (cache_ptr->resize_ctl).increment = H5C__DEF_AR_INCREMENT; + (cache_ptr->resize_ctl).apply_max_increment = TRUE; + (cache_ptr->resize_ctl).max_increment = H5C__DEF_AR_MAX_INCREMENT; (cache_ptr->resize_ctl).flash_incr_mode = H5C_flash_incr__off; (cache_ptr->resize_ctl).flash_multiple = (double)1.0f; (cache_ptr->resize_ctl).flash_threshold = (double)0.25f; - (cache_ptr->resize_ctl).decr_mode = H5C_decr__off; - (cache_ptr->resize_ctl).upper_hr_threshold = (double)H5C__DEF_AR_UPPER_THRESHHOLD; - (cache_ptr->resize_ctl).decrement = (double)H5C__DEF_AR_DECREMENT; - (cache_ptr->resize_ctl).apply_max_decrement = TRUE; - (cache_ptr->resize_ctl).max_decrement = H5C__DEF_AR_MAX_DECREMENT; + (cache_ptr->resize_ctl).decr_mode = H5C_decr__off; + (cache_ptr->resize_ctl).upper_hr_threshold = (double)H5C__DEF_AR_UPPER_THRESHHOLD; + (cache_ptr->resize_ctl).decrement = (double)H5C__DEF_AR_DECREMENT; + (cache_ptr->resize_ctl).apply_max_decrement = TRUE; + (cache_ptr->resize_ctl).max_decrement = H5C__DEF_AR_MAX_DECREMENT; (cache_ptr->resize_ctl).epochs_before_eviction = H5C__DEF_AR_EPCHS_B4_EVICT; (cache_ptr->resize_ctl).apply_empty_reserve = TRUE; - (cache_ptr->resize_ctl).empty_reserve = (double)H5C__DEF_AR_EMPTY_RESERVE; + (cache_ptr->resize_ctl).empty_reserve = (double)H5C__DEF_AR_EMPTY_RESERVE; - cache_ptr->epoch_markers_active = 0; + cache_ptr->epoch_markers_active = 0; /* no need to initialize the ring buffer itself */ - cache_ptr->epoch_marker_ringbuf_first = 1; - cache_ptr->epoch_marker_ringbuf_last = 0; - cache_ptr->epoch_marker_ringbuf_size = 0; + cache_ptr->epoch_marker_ringbuf_first = 1; + cache_ptr->epoch_marker_ringbuf_last = 0; + cache_ptr->epoch_marker_ringbuf_size = 0; /* Initialize all epoch marker entries' fields to zero/FALSE/NULL */ HDmemset(cache_ptr->epoch_markers, 0, sizeof(cache_ptr->epoch_markers)); @@ -514,10 +514,10 @@ H5C_create(size_t max_cache_size, /* Set non-zero/FALSE/NULL fields for epoch markers */ for ( i = 0; i < H5C__MAX_EPOCH_MARKERS; i++ ) { - ((cache_ptr->epoch_markers)[i]).magic = - H5C__H5C_CACHE_ENTRY_T_MAGIC; - ((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i; - ((cache_ptr->epoch_markers)[i]).type = H5AC_EPOCH_MARKER; + ((cache_ptr->epoch_markers)[i]).magic = + H5C__H5C_CACHE_ENTRY_T_MAGIC; + ((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i; + ((cache_ptr->epoch_markers)[i]).type = H5AC_EPOCH_MARKER; } /* Initialize cache image generation on file close related fields. @@ -531,25 +531,25 @@ H5C_create(size_t max_cache_size, cache_ptr->image_ctl.flags = H5C_CI__ALL_FLAGS; cache_ptr->serialization_in_progress= FALSE; - cache_ptr->load_image = FALSE; + cache_ptr->load_image = FALSE; cache_ptr->image_loaded = FALSE; - cache_ptr->delete_image = FALSE; - cache_ptr->image_addr = HADDR_UNDEF; - cache_ptr->image_len = 0; - cache_ptr->image_data_len = 0; + cache_ptr->delete_image = FALSE; + cache_ptr->image_addr = HADDR_UNDEF; + cache_ptr->image_len = 0; + cache_ptr->image_data_len = 0; - cache_ptr->entries_loaded_counter = 0; - cache_ptr->entries_inserted_counter = 0; - cache_ptr->entries_relocated_counter = 0; - cache_ptr->entry_fd_height_change_counter = 0; + cache_ptr->entries_loaded_counter = 0; + cache_ptr->entries_inserted_counter = 0; + cache_ptr->entries_relocated_counter = 0; + cache_ptr->entry_fd_height_change_counter = 0; - cache_ptr->num_entries_in_image = 0; - cache_ptr->image_entries = NULL; - cache_ptr->image_buffer = NULL; + cache_ptr->num_entries_in_image = 0; + cache_ptr->image_entries = NULL; + cache_ptr->image_buffer = NULL; /* initialize free space manager related fields: */ - cache_ptr->rdfsm_settled = FALSE; - cache_ptr->mdfsm_settled = FALSE; + cache_ptr->rdfsm_settled = FALSE; + cache_ptr->mdfsm_settled = FALSE; if(H5C_reset_cache_hit_rate_stats(cache_ptr) < 0) /* this should be impossible... */ @@ -557,7 +557,7 @@ H5C_create(size_t max_cache_size, H5C_stats__reset(cache_ptr); - cache_ptr->prefix[0] = '\0'; /* empty string */ + cache_ptr->prefix[0] = '\0'; /* empty string */ #ifndef NDEBUG cache_ptr->get_entry_ptr_from_addr_counter = 0; @@ -586,19 +586,19 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_create() */ - + /*------------------------------------------------------------------------- * Function: H5C_def_auto_resize_rpt_fcn * * Purpose: Print results of a automatic cache resize. * - * This function should only be used where HDprintf() behaves - * well -- i.e. not on Windows. + * This function should only be used where HDprintf() behaves + * well -- i.e. not on Windows. * * Return: void * * Programmer: John Mainzer - * 10/27/04 + * 10/27/04 * *------------------------------------------------------------------------- */ @@ -638,7 +638,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr, (cache_ptr->resize_ctl).lower_hr_threshold); HDfprintf(stdout, - "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n", + "%scache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n", cache_ptr->prefix, old_max_cache_size, old_min_clean_size, @@ -712,7 +712,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr, } HDfprintf(stdout, - "%s cache size decreased from (%Zu/%Zu) to (%Zu/%Zu).\n", + "%s cache size decreased from (%Zu/%Zu) to (%Zu/%Zu).\n", cache_ptr->prefix, old_max_cache_size, old_min_clean_size, @@ -726,7 +726,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr, cache_ptr->prefix, hit_rate, (cache_ptr->resize_ctl).lower_hr_threshold); HDfprintf(stdout, - "%s cache already at maximum size so no change.\n", + "%s cache already at maximum size so no change.\n", cache_ptr->prefix); break; @@ -734,7 +734,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr, HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n", cache_ptr->prefix, hit_rate); - HDfprintf(stdout, "%s cache already at minimum size.\n", + HDfprintf(stdout, "%s cache already at minimum size.\n", cache_ptr->prefix); break; @@ -758,7 +758,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr, cache_ptr->prefix, hit_rate, (cache_ptr->resize_ctl).lower_hr_threshold); HDfprintf(stdout, - "%s cache not full so no increase in size.\n", + "%s cache not full so no increase in size.\n", cache_ptr->prefix); break; @@ -772,7 +772,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr, } /* H5C_def_auto_resize_rpt_fcn() */ - + /*------------------------------------------------------------------------- * Function: H5C__free_tag_list_cb * @@ -781,7 +781,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr, * Return: Non-negative on success/Negative on failure * * Programmer: Vailin Choi - * January 2014 + * January 2014 * *------------------------------------------------------------------------- */ @@ -800,14 +800,14 @@ H5C__free_tag_list_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED FUNC_LEAVE_NOAPI(0) } /* H5C__free_tag_list_cb() */ - + /*------------------------------------------------------------------------- * * Function: H5C_prep_for_file_close * * Purpose: This function should be called just prior to the cache - * flushes at file close. There should be no protected - * entries in the cache at this point. + * flushes at file close. There should be no protected + * entries in the cache at this point. * * Return: Non-negative on success/Negative on failure * @@ -821,7 +821,7 @@ H5C_prep_for_file_close(H5F_t *f) { H5C_t * cache_ptr; hbool_t image_generated = FALSE; /* Whether a cache image was generated */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -895,7 +895,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_prep_for_file_close() */ - + /*------------------------------------------------------------------------- * Function: H5C_dest * @@ -904,24 +904,24 @@ done: * This function fails if any object are protected since the * resulting file might not be consistent. * - * Note that *cache_ptr has been freed upon successful return. + * Note that *cache_ptr has been freed upon successful return. * * Return: Non-negative on success/Negative on failure * * Programmer: John Mainzer - * 6/2/04 + * 6/2/04 * * Modifications: * * JRM -- 5/15/20 * - * Updated the function to enable the slist prior to the - * call to H5C__flush_invalidate_cache(). + * Updated the function to enable the slist prior to the + * call to H5C__flush_invalidate_cache(). * * Arguably, it shouldn't be necessary to re-enable the - * slist after the call to H5C__flush_invalidate_cache(), as + * slist after the call to H5C__flush_invalidate_cache(), as * the metadata cache should be discarded. However, in the - * test code, we make multiple calls to H5C_dest(). Thus + * test code, we make multiple calls to H5C_dest(). Thus * we re-enable the slist on failure if it and the cache * still exist. * @@ -964,7 +964,7 @@ H5C_dest(H5F_t * f) "Can't generate metadata cache image") } - /* Question: Is it possible for cache_ptr->slist be non-null at this + /* Question: Is it possible for cache_ptr->slist be non-null at this * point? If no, shouldn't this if statement be an assert? */ if ( cache_ptr->slist_ptr != NULL ) { @@ -996,7 +996,7 @@ H5C_dest(H5F_t * f) if ( cache_ptr->get_entry_ptr_from_addr_counter > 0 ) { - HDfprintf(stdout, + HDfprintf(stdout, "*** %ld calls to H5C_get_entry_ptr_from_add(). ***\n", cache_ptr->get_entry_ptr_from_addr_counter); } @@ -1023,7 +1023,7 @@ done: } /* H5C_dest() */ - + /*------------------------------------------------------------------------- * Function: H5C_evict * @@ -1032,15 +1032,15 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Vailin Choi - * Dec 2013 + * Dec 2013 * * Modifications: * * JRM -- 5/5/20 * * Added code to enable the skip list prior to the call - * to H5C__flush_invalidate_cache(), and disable it - * afterwards. + * to H5C__flush_invalidate_cache(), and disable it + * afterwards. * *------------------------------------------------------------------------- */ @@ -1062,7 +1062,7 @@ H5C_evict(H5F_t * f) /* Flush and invalidate all cache entries except the pinned entries */ if ( H5C__flush_invalidate_cache(f, H5C__EVICT_ALLOW_LAST_PINS_FLAG) < 0 ) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict entries in the cache") /* Disable the slist, @@ -1075,13 +1075,13 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_evict() */ - + /*------------------------------------------------------------------------- * Function: H5C_expunge_entry * * Purpose: Use this function to tell the cache to expunge an entry - * from the cache without writing it to disk even if it is - * dirty. The entry may not be either pinned or protected. + * from the cache without writing it to disk even if it is + * dirty. The entry may not be either pinned or protected. * * Return: Non-negative on success/Negative on failure * @@ -1093,10 +1093,10 @@ done: herr_t H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flags) { - H5C_t * cache_ptr; - H5C_cache_entry_t * entry_ptr = NULL; + H5C_t * cache_ptr; + H5C_cache_entry_t * entry_ptr = NULL; unsigned flush_flags = (H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG); - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1151,51 +1151,51 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_expunge_entry() */ - + /*------------------------------------------------------------------------- * Function: H5C_flush_cache * - * Purpose: Flush (and possibly destroy) the entries contained in the - * specified cache. + * Purpose: Flush (and possibly destroy) the entries contained in the + * specified cache. * - * If the cache contains protected entries, the function will - * fail, as protected entries cannot be flushed. However - * all unprotected entries should be flushed before the - * function returns failure. + * If the cache contains protected entries, the function will + * fail, as protected entries cannot be flushed. However + * all unprotected entries should be flushed before the + * function returns failure. * * Return: Non-negative on success/Negative on failure or if there was - * a request to flush all items and something was protected. + * a request to flush all items and something was protected. * * Programmer: John Mainzer - * 6/2/04 + * 6/2/04 * - * Changes: Modified function to test for slist chamges in - * pre_serialize and serialize callbacks, and re-start - * scans through the slist when such changes occur. + * Changes: Modified function to test for slist chamges in + * pre_serialize and serialize callbacks, and re-start + * scans through the slist when such changes occur. * - * This has been a potential problem for some time, - * and there has been code in this function to deal - * with elements of this issue. However the shift - * to the V3 cache in combination with the activities - * of some of the cache clients (in particular the - * free space manager and the fractal heap) have - * made this re-work necessary. + * This has been a potential problem for some time, + * and there has been code in this function to deal + * with elements of this issue. However the shift + * to the V3 cache in combination with the activities + * of some of the cache clients (in particular the + * free space manager and the fractal heap) have + * made this re-work necessary. * - * JRM -- 12/13/14 + * JRM -- 12/13/14 * - * Modified function to support rings. Basic idea is that - * every entry in the cache is assigned to a ring. Entries - * in the outermost ring are flushed first, followed by - * those in the next outermost ring, and so on until the - * innermost ring is flushed. See header comment on - * H5C_ring_t in H5Cprivate.h for a more detailed - * discussion. + * Modified function to support rings. Basic idea is that + * every entry in the cache is assigned to a ring. Entries + * in the outermost ring are flushed first, followed by + * those in the next outermost ring, and so on until the + * innermost ring is flushed. See header comment on + * H5C_ring_t in H5Cprivate.h for a more detailed + * discussion. * - * JRM -- 8/30/15 + * JRM -- 8/30/15 * - * Modified function to call the free space manager - * settling functions. - * JRM -- 6/9/16 + * Modified function to call the free space manager + * settling functions. + * JRM -- 6/9/16 * *------------------------------------------------------------------------- */ @@ -1203,18 +1203,18 @@ herr_t H5C_flush_cache(H5F_t *f, unsigned flags) { #if H5C_DO_SANITY_CHECKS - int i; - uint32_t index_len = 0; - size_t index_size = (size_t)0; - size_t clean_index_size = (size_t)0; - size_t dirty_index_size = (size_t)0; - size_t slist_size = (size_t)0; - uint32_t slist_len = 0; + int i; + uint32_t index_len = 0; + size_t index_size = (size_t)0; + size_t clean_index_size = (size_t)0; + size_t dirty_index_size = (size_t)0; + size_t slist_size = (size_t)0; + uint32_t slist_len = 0; #endif /* H5C_DO_SANITY_CHECKS */ - H5C_ring_t ring; + H5C_ring_t ring; H5C_t * cache_ptr; hbool_t destroy; - herr_t ret_value = SUCCEED; + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(FAIL) @@ -1239,7 +1239,7 @@ H5C_flush_cache(H5F_t *f, unsigned flags) clean_index_size += cache_ptr->clean_index_ring_size[i]; dirty_index_size += cache_ptr->dirty_index_ring_size[i]; - slist_len += cache_ptr->slist_ring_len[i]; + slist_len += cache_ptr->slist_ring_len[i]; slist_size += cache_ptr->slist_ring_size[i]; } /* end for */ @@ -1269,45 +1269,45 @@ H5C_flush_cache(H5F_t *f, unsigned flags) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush invalidate failed") } /* end if */ else { - /* flush each ring, starting from the outermost ring and + /* flush each ring, starting from the outermost ring and * working inward. */ ring = H5C_RING_USER; - while(ring < H5C_RING_NTYPES) { + while(ring < H5C_RING_NTYPES) { /* Only call the free space manager settle routines when close * warning has been received. */ - if(cache_ptr->close_warning_received) { - switch(ring) { - case H5C_RING_USER: - break; + if(cache_ptr->close_warning_received) { + switch(ring) { + case H5C_RING_USER: + break; - case H5C_RING_RDFSM: + case H5C_RING_RDFSM: /* Settle raw data FSM */ - if(!cache_ptr->rdfsm_settled) - if(H5MF_settle_raw_data_fsm(f, &cache_ptr->rdfsm_settled) < 0) + if(!cache_ptr->rdfsm_settled) + if(H5MF_settle_raw_data_fsm(f, &cache_ptr->rdfsm_settled) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "RD FSM settle failed") - break; + break; - case H5C_RING_MDFSM: + case H5C_RING_MDFSM: /* Settle metadata FSM */ - if(!cache_ptr->mdfsm_settled) - if(H5MF_settle_meta_data_fsm(f, &cache_ptr->mdfsm_settled) < 0) + if(!cache_ptr->mdfsm_settled) + if(H5MF_settle_meta_data_fsm(f, &cache_ptr->mdfsm_settled) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "MD FSM settle failed") - break; + break; - case H5C_RING_SBE: - case H5C_RING_SB: - break; + case H5C_RING_SBE: + case H5C_RING_SB: + break; - default: + default: HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown ring?!?!") - break; - } /* end switch */ + break; + } /* end switch */ } /* end if */ - if(H5C__flush_ring(f, ring, flags) < 0) + if(H5C__flush_ring(f, ring, flags) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush ring failed") ring++; } /* end while */ @@ -1319,28 +1319,28 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_flush_cache() */ - + /*------------------------------------------------------------------------- * Function: H5C_flush_to_min_clean * - * Purpose: Flush dirty entries until the caches min clean size is - * attained. + * Purpose: Flush dirty entries until the caches min clean size is + * attained. * - * This function is used in the implementation of the - * metadata cache in PHDF5. To avoid "messages from the - * future", the cache on process 0 can't be allowed to - * flush entries until the other processes have reached - * the same point in the calculation. If this constraint - * is not met, it is possible that the other processes will - * read metadata generated at a future point in the - * computation. + * This function is used in the implementation of the + * metadata cache in PHDF5. To avoid "messages from the + * future", the cache on process 0 can't be allowed to + * flush entries until the other processes have reached + * the same point in the calculation. If this constraint + * is not met, it is possible that the other processes will + * read metadata generated at a future point in the + * computation. * * * Return: Non-negative on success/Negative on failure or if - * write is not permitted. + * write is not permitted. * * Programmer: John Mainzer - * 9/16/05 + * 9/16/05 * *------------------------------------------------------------------------- */ @@ -1348,8 +1348,8 @@ herr_t H5C_flush_to_min_clean(H5F_t * f) { H5C_t * cache_ptr; - hbool_t write_permitted; - herr_t ret_value = SUCCEED; + hbool_t write_permitted; + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(FAIL) @@ -1378,7 +1378,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_flush_to_min_clean() */ - + /*------------------------------------------------------------------------- * Function: H5C_insert_entry * @@ -1386,36 +1386,36 @@ done: * exist on disk yet, but it must have an address and disk * space reserved. * - * Observe that this function cannot occasion a read. + * Observe that this function cannot occasion a read. * * Return: Non-negative on success/Negative on failure * * Programmer: John Mainzer - * 6/2/04 + * 6/2/04 * *------------------------------------------------------------------------- */ herr_t H5C_insert_entry(H5F_t * f, const H5C_class_t * type, - haddr_t addr, - void * thing, + haddr_t addr, + void * thing, unsigned int flags) { H5C_t *cache_ptr; H5AC_ring_t ring = H5C_RING_UNDEFINED; - hbool_t insert_pinned; + hbool_t insert_pinned; hbool_t flush_last; #ifdef H5_HAVE_PARALLEL hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */ #endif /* H5_HAVE_PARALLEL */ hbool_t set_flush_marker; - hbool_t write_permitted = TRUE; - size_t empty_space; + hbool_t write_permitted = TRUE; + size_t empty_space; H5C_cache_entry_t *entry_ptr = NULL; H5C_cache_entry_t *test_entry_ptr; - hbool_t entry_tagged = FALSE; - herr_t ret_value = SUCCEED; /* Return value */ + hbool_t entry_tagged = FALSE; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1530,20 +1530,20 @@ H5C_insert_entry(H5F_t * f, #endif /* H5_HAVE_PARALLEL */ /* initialize cache image related fields */ - entry_ptr->include_in_image = FALSE; - entry_ptr->lru_rank = 0; - entry_ptr->image_dirty = FALSE; - entry_ptr->fd_parent_count = 0; - entry_ptr->fd_parent_addrs = NULL; - entry_ptr->fd_child_count = 0; - entry_ptr->fd_dirty_child_count = 0; - entry_ptr->image_fd_height = 0; - entry_ptr->prefetched = FALSE; - entry_ptr->prefetch_type_id = 0; - entry_ptr->age = 0; + entry_ptr->include_in_image = FALSE; + entry_ptr->lru_rank = 0; + entry_ptr->image_dirty = FALSE; + entry_ptr->fd_parent_count = 0; + entry_ptr->fd_parent_addrs = NULL; + entry_ptr->fd_child_count = 0; + entry_ptr->fd_dirty_child_count = 0; + entry_ptr->image_fd_height = 0; + entry_ptr->prefetched = FALSE; + entry_ptr->prefetch_type_id = 0; + entry_ptr->age = 0; entry_ptr->prefetched_dirty = FALSE; #ifndef NDEBUG /* debugging field */ - entry_ptr->serialization_count = 0; + entry_ptr->serialization_count = 0; #endif /* NDEBUG */ entry_ptr->tl_next = NULL; @@ -1569,11 +1569,11 @@ H5C_insert_entry(H5F_t * f, if(cache_ptr->evictions_enabled && (((cache_ptr->index_size + entry_ptr->size) > cache_ptr->max_cache_size) - || - (((empty_space + cache_ptr->clean_index_size) < cache_ptr->min_clean_size)))) { + || + (((empty_space + cache_ptr->clean_index_size) < cache_ptr->min_clean_size)))) { size_t space_needed; - if(empty_space <= entry_ptr->size) + if(empty_space <= entry_ptr->size) cache_ptr->cache_full = TRUE; if(cache_ptr->check_write_permitted != NULL) { @@ -1671,31 +1671,31 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_insert_entry() */ - + /*------------------------------------------------------------------------- * Function: H5C_mark_entry_dirty * - * Purpose: Mark a pinned or protected entry as dirty. The target entry - * MUST be either pinned or protected, and MAY be both. + * Purpose: Mark a pinned or protected entry as dirty. The target entry + * MUST be either pinned or protected, and MAY be both. * - * In the protected case, this call is the functional - * equivalent of setting the H5C__DIRTIED_FLAG on an unprotect - * call. + * In the protected case, this call is the functional + * equivalent of setting the H5C__DIRTIED_FLAG on an unprotect + * call. * - * In the pinned but not protected case, if the entry is not - * already dirty, the function places function marks the entry - * dirty and places it on the skip list. + * In the pinned but not protected case, if the entry is not + * already dirty, the function places function marks the entry + * dirty and places it on the skip list. * * Return: Non-negative on success/Negative on failure * * Programmer: John Mainzer * 5/15/06 * - * JRM -- 11/5/08 - * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY() to - * update the new clean_index_size and dirty_index_size - * fields of H5C_t in the case that the entry was clean - * prior to this call, and is pinned and not protected. + * JRM -- 11/5/08 + * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY() to + * update the new clean_index_size and dirty_index_size + * fields of H5C_t in the case that the entry was clean + * prior to this call, and is pinned and not protected. * *------------------------------------------------------------------------- */ @@ -1716,7 +1716,7 @@ H5C_mark_entry_dirty(void *thing) HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); if ( entry_ptr->is_protected ) { - HDassert( ! ((entry_ptr)->is_read_only) ); + HDassert( ! ((entry_ptr)->is_read_only) ); /* set the dirtied flag */ entry_ptr->dirtied = TRUE; @@ -1731,18 +1731,18 @@ H5C_mark_entry_dirty(void *thing) }/* end if */ } /* end if */ else if ( entry_ptr->is_pinned ) { - hbool_t was_clean; /* Whether the entry was previously clean */ - hbool_t image_was_up_to_date; + hbool_t was_clean; /* Whether the entry was previously clean */ + hbool_t image_was_up_to_date; /* Remember previous dirty status */ - was_clean = !entry_ptr->is_dirty; + was_clean = !entry_ptr->is_dirty; /* Check if image is up to date */ image_was_up_to_date = entry_ptr->image_up_to_date; /* Mark the entry as dirty if it isn't already */ entry_ptr->is_dirty = TRUE; - entry_ptr->image_up_to_date = FALSE; + entry_ptr->image_up_to_date = FALSE; /* Modify cache data structures */ if(was_clean) @@ -1779,15 +1779,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_mark_entry_dirty() */ - + /*------------------------------------------------------------------------- * Function: H5C_mark_entry_clean * - * Purpose: Mark a pinned entry as clean. The target entry MUST be pinned. + * Purpose: Mark a pinned entry as clean. The target entry MUST be pinned. * - * If the entry is not - * already clean, the function places function marks the entry - * clean and removes it from the skip list. + * If the entry is not + * already clean, the function places function marks the entry + * clean and removes it from the skip list. * * Return: Non-negative on success/Negative on failure * @@ -1816,7 +1816,7 @@ H5C_mark_entry_clean(void *_thing) if(entry_ptr->is_protected) HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "entry is protected") else if(entry_ptr->is_pinned) { - hbool_t was_dirty; /* Whether the entry was previously dirty */ + hbool_t was_dirty; /* Whether the entry was previously dirty */ /* Remember previous dirty status */ was_dirty = entry_ptr->is_dirty; @@ -1858,12 +1858,12 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_mark_entry_clean() */ - + /*------------------------------------------------------------------------- * Function: H5C_mark_entry_unserialized * - * Purpose: Mark a pinned or protected entry as unserialized. The target - * entry MUST be either pinned or protected, and MAY be both. + * Purpose: Mark a pinned or protected entry as unserialized. The target + * entry MUST be either pinned or protected, and MAY be both. * * Return: Non-negative on success/Negative on failure * @@ -1889,7 +1889,7 @@ H5C_mark_entry_unserialized(void *thing) /* Reset image_up_to_date */ if(entry->image_up_to_date) { - entry->image_up_to_date = FALSE; + entry->image_up_to_date = FALSE; if(entry->flush_dep_nparents > 0) if(H5C__mark_flush_dep_unserialized(entry) < 0) @@ -1903,12 +1903,12 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_mark_entry_unserialized() */ - + /*------------------------------------------------------------------------- * Function: H5C_mark_entry_serialized * - * Purpose: Mark a pinned entry as serialized. The target entry MUST be - * pinned. + * Purpose: Mark a pinned entry as serialized. The target entry MUST be + * pinned. * * Return: Non-negative on success/Negative on failure * @@ -1935,7 +1935,7 @@ H5C_mark_entry_serialized(void *_thing) else if(entry->is_pinned) { /* Check for entry changing status and do notifications, etc. */ if(!entry->image_up_to_date) { - /* Set the image_up_to_date flag */ + /* Set the image_up_to_date flag */ entry->image_up_to_date = TRUE; /* Propagate the serialize up the flush dependency chain, if appropriate */ @@ -1951,7 +1951,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_mark_entry_serialized() */ - + /*------------------------------------------------------------------------- * * Function: H5C_move_entry @@ -1967,14 +1967,14 @@ done: *------------------------------------------------------------------------- */ herr_t -H5C_move_entry(H5C_t * cache_ptr, +H5C_move_entry(H5C_t * cache_ptr, const H5C_class_t * type, - haddr_t old_addr, - haddr_t new_addr) + haddr_t old_addr, + haddr_t new_addr) { - H5C_cache_entry_t * entry_ptr = NULL; - H5C_cache_entry_t * test_entry_ptr = NULL; - herr_t ret_value = SUCCEED; /* Return value */ + H5C_cache_entry_t * entry_ptr = NULL; + H5C_cache_entry_t * test_entry_ptr = NULL; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -2044,15 +2044,15 @@ H5C_move_entry(H5C_t * cache_ptr, entry_ptr->addr = new_addr; if(!entry_ptr->destroy_in_progress) { - hbool_t was_dirty; /* Whether the entry was previously dirty */ + hbool_t was_dirty; /* Whether the entry was previously dirty */ /* Remember previous dirty status */ was_dirty = entry_ptr->is_dirty; /* Mark the entry as dirty if it isn't already */ - entry_ptr->is_dirty = TRUE; + entry_ptr->is_dirty = TRUE; - /* This shouldn't be needed, but it keeps the test code happy */ + /* This shouldn't be needed, but it keeps the test code happy */ if(entry_ptr->image_up_to_date) { entry_ptr->image_up_to_date = FALSE; if(entry_ptr->flush_dep_nparents > 0) @@ -2065,7 +2065,7 @@ H5C_move_entry(H5C_t * cache_ptr, H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL) /* Skip some actions if we're in the middle of flushing the entry */ - if(!entry_ptr->flush_in_progress) { + if(!entry_ptr->flush_in_progress) { /* Update the replacement policy for the entry */ H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, FAIL) @@ -2099,15 +2099,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_move_entry() */ - + /*------------------------------------------------------------------------- * Function: H5C_resize_entry * - * Purpose: Resize a pinned or protected entry. + * Purpose: Resize a pinned or protected entry. * - * Resizing an entry dirties it, so if the entry is not - * already dirty, the function places the entry on the - * skip list. + * Resizing an entry dirties it, so if the entry is not + * already dirty, the function places the entry on the + * skip list. * * Return: Non-negative on success/Negative on failure * @@ -2146,7 +2146,7 @@ H5C_resize_entry(void *thing, size_t new_size) /* update for change in entry size if necessary */ if ( entry_ptr->size != new_size ) { - hbool_t was_clean; + hbool_t was_clean; /* make note of whether the entry was clean to begin with */ was_clean = !entry_ptr->is_dirty; @@ -2170,7 +2170,7 @@ H5C_resize_entry(void *thing, size_t new_size) if ( cache_ptr->flash_size_increase_possible ) { if ( new_size > entry_ptr->size ) { - size_t size_increase; + size_t size_increase; size_increase = new_size - entry_ptr->size; @@ -2202,18 +2202,18 @@ H5C_resize_entry(void *thing, size_t new_size) #endif /* H5_HAVE_PARALLEL */ /* update statistics just before changing the entry size */ - H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size); + H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size); /* update the hash table */ - H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, \ + H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, \ new_size, entry_ptr, was_clean); /* if the entry is in the skip list, update that too */ if(entry_ptr->in_slist) - H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, new_size); + H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, new_size); - /* finally, update the entry size proper */ - entry_ptr->size = new_size; + /* finally, update the entry size proper */ + entry_ptr->size = new_size; if(!entry_ptr->in_slist) H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL) @@ -2247,19 +2247,19 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_resize_entry() */ - + /*------------------------------------------------------------------------- * Function: H5C_pin_protected_entry() * - * Purpose: Pin a protected cache entry. The entry must be protected - * at the time of call, and must be unpinned. + * Purpose: Pin a protected cache entry. The entry must be protected + * at the time of call, and must be unpinned. * * Return: Non-negative on success/Negative on failure * * Programmer: John Mainzer * 4/26/06 * - * Changes: Added extreme sanity checks on entry and exit. + * Changes: Added extreme sanity checks on entry and exit. * JRM -- 4/26/14 * *------------------------------------------------------------------------- @@ -2307,21 +2307,21 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_pin_protected_entry() */ - + /*------------------------------------------------------------------------- * Function: H5C_protect * * Purpose: If the target entry is not in the cache, load it. If - * necessary, attempt to evict one or more entries to keep - * the cache within its maximum size. + * necessary, attempt to evict one or more entries to keep + * the cache within its maximum size. * - * Mark the target entry as protected, and return its address - * to the caller. The caller must call H5C_unprotect() when - * finished with the entry. + * Mark the target entry as protected, and return its address + * to the caller. The caller must call H5C_unprotect() when + * finished with the entry. * - * While it is protected, the entry may not be either evicted - * or flushed -- nor may it be accessed by another call to - * H5C_protect. Any attempt to do so will result in a failure. + * While it is protected, the entry may not be either evicted + * or flushed -- nor may it be accessed by another call to + * H5C_protect. Any attempt to do so will result in a failure. * * Return: Success: Ptr to the desired entry * Failure: NULL @@ -2331,27 +2331,27 @@ done: *------------------------------------------------------------------------- */ void * -H5C_protect(H5F_t * f, +H5C_protect(H5F_t * f, const H5C_class_t * type, - haddr_t addr, + haddr_t addr, void * udata, - unsigned flags) + unsigned flags) { - H5C_t * cache_ptr; + H5C_t * cache_ptr; H5AC_ring_t ring = H5C_RING_UNDEFINED; - hbool_t hit; - hbool_t have_write_permitted = FALSE; - hbool_t read_only = FALSE; + hbool_t hit; + hbool_t have_write_permitted = FALSE; + hbool_t read_only = FALSE; hbool_t flush_last; #ifdef H5_HAVE_PARALLEL hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */ #endif /* H5_HAVE_PARALLEL */ - hbool_t write_permitted; + hbool_t write_permitted; hbool_t was_loaded = FALSE; /* Whether the entry was loaded as a result of the protect */ - size_t empty_space; - void * thing; - H5C_cache_entry_t * entry_ptr; - void * ret_value = NULL; /* Return value */ + size_t empty_space; + void * thing; + H5C_cache_entry_t * entry_ptr; + void * ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -2537,16 +2537,16 @@ H5C_protect(H5F_t * f, */ if ( ( cache_ptr->evictions_enabled ) && ( ( (cache_ptr->index_size + entry_ptr->size) > - cache_ptr->max_cache_size) - || - ( ( empty_space + cache_ptr->clean_index_size ) < - cache_ptr->min_clean_size ) - ) + cache_ptr->max_cache_size) + || + ( ( empty_space + cache_ptr->clean_index_size ) < + cache_ptr->min_clean_size ) + ) ) { size_t space_needed; - if(empty_space <= entry_ptr->size) + if(empty_space <= entry_ptr->size) cache_ptr->cache_full = TRUE; if(cache_ptr->check_write_permitted != NULL) { @@ -2607,7 +2607,7 @@ H5C_protect(H5F_t * f, * ******************************************* * * Set the flush_last field - * of the newly loaded entry before inserting it into the + * of the newly loaded entry before inserting it into the * index. Must do this, as the index tracked the number of * entries with the flush_last field set, but assumes that * the field will not change after insertion into the index. @@ -2640,24 +2640,24 @@ H5C_protect(H5F_t * f, HDassert(entry_ptr->type == type); if(entry_ptr->is_protected) { - if(read_only && entry_ptr->is_read_only) { - HDassert(entry_ptr->ro_ref_count > 0); - (entry_ptr->ro_ref_count)++; - } /* end if */ + if(read_only && entry_ptr->is_read_only) { + HDassert(entry_ptr->ro_ref_count > 0); + (entry_ptr->ro_ref_count)++; + } /* end if */ else HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Target already protected & not read only?!?") } /* end if */ else { - H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, NULL) + H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, NULL) - entry_ptr->is_protected = TRUE; + entry_ptr->is_protected = TRUE; - if ( read_only ) { - entry_ptr->is_read_only = TRUE; - entry_ptr->ro_ref_count = 1; - } /* end if */ + if ( read_only ) { + entry_ptr->is_read_only = TRUE; + entry_ptr->ro_ref_count = 1; + } /* end if */ - entry_ptr->dirtied = FALSE; + entry_ptr->dirtied = FALSE; } /* end else */ H5C__UPDATE_CACHE_HIT_RATE_STATS(cache_ptr, hit) @@ -2701,10 +2701,10 @@ H5C_protect(H5F_t * f, /* check to see if the cache is now oversized due to the cache * size reduction. If it is, try to evict enough entries to * bring the cache size down to the current maximum cache size. - * - * Also, if the min_clean_size requirement is not met, we - * should also call H5C__make_space_in_cache() to bring us - * into complience. + * + * Also, if the min_clean_size requirement is not met, we + * should also call H5C__make_space_in_cache() to bring us + * into complience. */ if(cache_ptr->index_size >= cache_ptr->max_cache_size) @@ -2713,11 +2713,11 @@ H5C_protect(H5F_t * f, empty_space = cache_ptr->max_cache_size - cache_ptr->index_size; if ( ( cache_ptr->index_size > cache_ptr->max_cache_size ) - || - ( ( empty_space + cache_ptr->clean_index_size ) < - cache_ptr->min_clean_size) ) { + || + ( ( empty_space + cache_ptr->clean_index_size ) < + cache_ptr->min_clean_size) ) { - if(cache_ptr->index_size > cache_ptr->max_cache_size) + if(cache_ptr->index_size > cache_ptr->max_cache_size) cache_ptr->cache_full = TRUE; if(H5C__make_space_in_cache(f, (size_t)0, write_permitted) < 0 ) @@ -2759,7 +2759,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_protect() */ - + /*------------------------------------------------------------------------- * * Function: H5C_reset_cache_hit_rate_stats() @@ -2775,37 +2775,37 @@ done: herr_t H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) if((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC)) HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry") - cache_ptr->cache_hits = 0; - cache_ptr->cache_accesses = 0; + cache_ptr->cache_hits = 0; + cache_ptr->cache_accesses = 0; done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_reset_cache_hit_rate_stats() */ - + /*------------------------------------------------------------------------- * Function: H5C_set_cache_auto_resize_config * - * Purpose: Set the cache automatic resize configuration to the - * provided values if they are in range, and fail if they - * are not. + * Purpose: Set the cache automatic resize configuration to the + * provided values if they are in range, and fail if they + * are not. * - * If the new configuration enables automatic cache resizing, - * coerce the cache max size and min clean size into agreement - * with the new policy and re-set the full cache hit rate - * stats. + * If the new configuration enables automatic cache resizing, + * coerce the cache max size and min clean size into agreement + * with the new policy and re-set the full cache hit rate + * stats. * * Return: SUCCEED on success, and FAIL on failure. * * Programmer: John Mainzer - * 10/8/04 + * 10/8/04 * *------------------------------------------------------------------------- */ @@ -2815,7 +2815,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, { size_t new_max_cache_size; size_t new_min_clean_size; - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -2899,7 +2899,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, if(config_ptr->max_size == config_ptr->min_size) { cache_ptr->size_increase_possible = FALSE; - cache_ptr->flash_size_increase_possible = FALSE; + cache_ptr->flash_size_increase_possible = FALSE; cache_ptr->size_decrease_possible = FALSE; } /* end if */ @@ -2934,7 +2934,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, /* since new_min_clean_size is of type size_t, we have * - * ( 0 <= new_min_clean_size ) + * ( 0 <= new_min_clean_size ) * * by definition. */ @@ -2994,7 +2994,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_set_cache_auto_resize_config() */ - + /*------------------------------------------------------------------------- * Function: H5C_set_evictions_enabled() * @@ -3026,7 +3026,7 @@ H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled) */ if((evictions_enabled != TRUE) && ((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) || - (cache_ptr->resize_ctl.decr_mode != H5C_decr__off))) + (cache_ptr->resize_ctl.decr_mode != H5C_decr__off))) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't disable evictions when auto resize enabled") cache_ptr->evictions_enabled = evictions_enabled; @@ -3035,27 +3035,27 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_set_evictions_enabled() */ - + /*------------------------------------------------------------------------- * * Function: H5C_set_slist_enabled() * * Purpose: Enable or disable the slist as directed. * - * The slist (skip list) is an address ordered list of - * dirty entries in the metadata cache. However, this + * The slist (skip list) is an address ordered list of + * dirty entries in the metadata cache. However, this * list is only needed during flush and close, where we - * use it to write entries in more or less increasing - * address order. + * use it to write entries in more or less increasing + * address order. * * This function sets up and enables further operations - * on the slist, or disable the slist. This in turn - * allows us to avoid the overhead of maintaining the + * on the slist, or disable the slist. This in turn + * allows us to avoid the overhead of maintaining the * slist when it is not needed. * * - * If the slist_enabled parameter is TRUE, the function - * + * If the slist_enabled parameter is TRUE, the function + * * 1) Verifies that the slist is empty. * * 2) Scans the index list, and inserts all dirty entries @@ -3063,7 +3063,7 @@ done: * * 3) Sets cache_ptr->slist_enabled = TRUE. * - * Note that the clear_slist parameter is ignored if + * Note that the clear_slist parameter is ignored if * the slist_enabed parameter is TRUE. * * @@ -3077,7 +3077,7 @@ done: * Thus shutdown proceeds as follows: * * 1) Test to see if the slist is empty. If it is, proceed - * to step 3. + * to step 3. * * 2) Test to see if the clear_slist parameter is TRUE. * @@ -3086,7 +3086,7 @@ done: * If it isn't, throw an error. * * 3) set cache_ptr->slist_enabled = FALSE. - * + * * Return: SUCCEED on success, and FAIL on failure. * * Programmer: John Mainzer @@ -3099,7 +3099,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, +H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_slist) { H5C_cache_entry_t * entry_ptr; @@ -3129,14 +3129,14 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, } - /* set cache_ptr->slist_enabled to TRUE so that the slist + /* set cache_ptr->slist_enabled to TRUE so that the slist * mainenance macros will be enabled. */ cache_ptr->slist_enabled = TRUE; /* scan the index list and insert all dirty entries in the slist */ - entry_ptr = cache_ptr->il_head; + entry_ptr = cache_ptr->il_head; while ( entry_ptr != NULL ) { @@ -3150,10 +3150,10 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, entry_ptr = entry_ptr->il_next; } - /* we don't maintain a dirty index len, so we can't do a cross + /* we don't maintain a dirty index len, so we can't do a cross * check against it. Note that there is no point in cross checking * against the dirty LRU size, as the dirty LRU may not be maintained, - * and in any case, there is no requirement that all dirty entries + * and in any case, there is no requirement that all dirty entries * will reside on the dirty LRU. */ HDassert( cache_ptr->dirty_index_size == cache_ptr->slist_size ); @@ -3184,7 +3184,7 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, node_ptr = H5SL_first(cache_ptr->slist_ptr); } } else { - + HDassert(FALSE); HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist not empty (2)?") } @@ -3201,19 +3201,19 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, HDassert(cache_ptr->slist_enabled); #endif /* H5C__SLIST_OPT_ENABLED is FALSE */ - + done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_set_slist_enabled() */ - + /*------------------------------------------------------------------------- * Function: H5C_unpin_entry() * - * Purpose: Unpin a cache entry. The entry can be either protected or - * unprotected at the time of call, but must be pinned. + * Purpose: Unpin a cache entry. The entry can be either protected or + * unprotected at the time of call, but must be pinned. * * Return: Non-negative on success/Negative on failure * @@ -3263,24 +3263,24 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_unpin_entry() */ - + /*------------------------------------------------------------------------- * Function: H5C_unprotect * - * Purpose: Undo an H5C_protect() call -- specifically, mark the - * entry as unprotected, remove it from the protected list, - * and give it back to the replacement policy. + * Purpose: Undo an H5C_protect() call -- specifically, mark the + * entry as unprotected, remove it from the protected list, + * and give it back to the replacement policy. * - * The TYPE and ADDR arguments must be the same as those in - * the corresponding call to H5C_protect() and the THING - * argument must be the value returned by that call to - * H5C_protect(). + * The TYPE and ADDR arguments must be the same as those in + * the corresponding call to H5C_protect() and the THING + * argument must be the value returned by that call to + * H5C_protect(). * * Return: Non-negative on success/Negative on failure * - * If the deleted flag is TRUE, simply remove the target entry - * from the cache, clear it, and free it without writing it to - * disk. + * If the deleted flag is TRUE, simply remove the target entry + * from the cache, clear it, and free it without writing it to + * disk. * * Return: Non-negative on success/Negative on failure * @@ -3359,28 +3359,28 @@ done: * * * JRM -- 5/8/20 - * Updated for the possibility that the slist will be + * Updated for the possibility that the slist will be * disabled. * *------------------------------------------------------------------------- */ herr_t -H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) +H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) { H5C_t * cache_ptr; - hbool_t deleted; - hbool_t dirtied; + hbool_t deleted; + hbool_t dirtied; hbool_t set_flush_marker; - hbool_t pin_entry; - hbool_t unpin_entry; - hbool_t free_file_space; - hbool_t take_ownership; - hbool_t was_clean; + hbool_t pin_entry; + hbool_t unpin_entry; + hbool_t free_file_space; + hbool_t take_ownership; + hbool_t was_clean; #ifdef H5_HAVE_PARALLEL - hbool_t clear_entry = FALSE; + hbool_t clear_entry = FALSE; #endif /* H5_HAVE_PARALLEL */ - H5C_cache_entry_t * entry_ptr; - H5C_cache_entry_t * test_entry_ptr; + H5C_cache_entry_t * entry_ptr; + H5C_cache_entry_t * test_entry_ptr; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -3542,19 +3542,19 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) /* Update index for newly dirtied entry */ H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr) - /* If the entry's type has a 'notify' callback send a - * 'entry dirtied' notice now that the entry is fully + /* If the entry's type has a 'notify' callback send a + * 'entry dirtied' notice now that the entry is fully * integrated into the cache. */ if ( ( entry_ptr->type->notify ) && - ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED, + ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED, entry_ptr) < 0 ) ) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \ "can't notify client about entry dirty flag set") /* Propagate the flush dep dirty flag up the flush dependency chain - * if appropriate + * if appropriate */ if ( entry_ptr->flush_dep_nparents > 0 ) { @@ -3567,19 +3567,19 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) /* Check for newly clean entry */ else if ( ! was_clean && ! entry_ptr->is_dirty ) { - /* If the entry's type has a 'notify' callback send a - * 'entry cleaned' notice now that the entry is fully + /* If the entry's type has a 'notify' callback send a + * 'entry cleaned' notice now that the entry is fully * integrated into the cache. */ if ( ( entry_ptr->type->notify ) && - ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED, + ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED, entry_ptr) < 0 ) ) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \ "can't notify client about entry dirty flag cleared") /* Propagate the flush dep clean flag up the flush dependency chain - * if appropriate + * if appropriate */ if ( entry_ptr->flush_dep_nparents > 0 ) { @@ -3587,8 +3587,8 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \ "Can't propagate flush dep dirty flag") - - } + + } } /* end else-if */ /* Pin or unpin the entry as requested. */ @@ -3625,7 +3625,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) if ( !entry_ptr->in_slist ) { - /* this is a no-op if cache_ptr->slist_enabled is FALSE */ + /* this is a no-op if cache_ptr->slist_enabled is FALSE */ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL) } } /* end if */ @@ -3688,7 +3688,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) /* verify that the target entry is in the cache. */ H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL) - if ( test_entry_ptr == NULL ) + if ( test_entry_ptr == NULL ) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \ "entry not in hash table?!?") @@ -3698,8 +3698,8 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \ "hash table contains multiple entries for addr?!?") - if ( H5C__flush_single_entry(f, entry_ptr, - H5C__FLUSH_CLEAR_ONLY_FLAG | + if ( H5C__flush_single_entry(f, entry_ptr, + H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \ "Can't clear entry") @@ -3725,7 +3725,7 @@ done: } /* H5C_unprotect() */ - + /*------------------------------------------------------------------------- * * Function: H5C_unsettle_entry_ring @@ -3769,36 +3769,36 @@ H5C_unsettle_entry_ring(void *_entry) HDassert(cache->magic == H5C__H5C_T_MAGIC); switch(entry->ring) { - case H5C_RING_USER: + case H5C_RING_USER: /* Do nothing */ - break; - - case H5C_RING_RDFSM: - if(cache->rdfsm_settled) { - if(cache->flush_in_progress || cache->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") - cache->rdfsm_settled = FALSE; - } /* end if */ - break; - - case H5C_RING_MDFSM: - if(cache->mdfsm_settled) { - if(cache->flush_in_progress || cache->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") - cache->mdfsm_settled = FALSE; - } /* end if */ - break; - - default: - HDassert(FALSE); /* this should be un-reachable */ - break; + break; + + case H5C_RING_RDFSM: + if(cache->rdfsm_settled) { + if(cache->flush_in_progress || cache->close_warning_received) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") + cache->rdfsm_settled = FALSE; + } /* end if */ + break; + + case H5C_RING_MDFSM: + if(cache->mdfsm_settled) { + if(cache->flush_in_progress || cache->close_warning_received) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") + cache->mdfsm_settled = FALSE; + } /* end if */ + break; + + default: + HDassert(FALSE); /* this should be un-reachable */ + break; } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_unsettle_entry_ring() */ - + /*------------------------------------------------------------------------- * Function: H5C_unsettle_ring() * @@ -3856,24 +3856,24 @@ H5C_unsettle_ring(H5F_t * f, H5C_ring_t ring) } /* end if */ break; - default: - HDassert(FALSE); /* this should be un-reachable */ - break; + default: + HDassert(FALSE); /* this should be un-reachable */ + break; } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_unsettle_ring() */ - + /*------------------------------------------------------------------------- * Function: H5C_validate_resize_config() * - * Purpose: Run a sanity check on the specified sections of the - * provided instance of struct H5C_auto_size_ctl_t. + * Purpose: Run a sanity check on the specified sections of the + * provided instance of struct H5C_auto_size_ctl_t. * - * Do nothing and return SUCCEED if no errors are detected, - * and flag an error and return FAIL otherwise. + * Do nothing and return SUCCEED if no errors are detected, + * and flag an error and return FAIL otherwise. * * Return: Non-negative on success/Negative on failure * @@ -4025,15 +4025,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_validate_resize_config() */ - + /*------------------------------------------------------------------------- * Function: H5C_create_flush_dependency() * - * Purpose: Initiates a parent<->child entry flush dependency. The parent + * Purpose: Initiates a parent<->child entry flush dependency. The parent * entry must be pinned or protected at the time of call, and must * have all dependencies removed before the cache can shut down. * - * Note: Flush dependencies in the cache indicate that a child entry + * Note: Flush dependencies in the cache indicate that a child entry * must be flushed to the file before its parent. (This is * currently used to implement Single-Writer/Multiple-Reader (SWMR) * I/O access for data structures in the file). @@ -4052,7 +4052,7 @@ herr_t H5C_create_flush_dependency(void * parent_thing, void * child_thing) { H5C_t * cache_ptr; - H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */ + H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */ H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child thing's entry */ herr_t ret_value = SUCCEED; /* Return value */ @@ -4169,11 +4169,11 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_create_flush_dependency() */ - + /*------------------------------------------------------------------------- * Function: H5C_destroy_flush_dependency() * - * Purpose: Terminates a parent<-> child entry flush dependency. The + * Purpose: Terminates a parent<-> child entry flush dependency. The * parent entry must be pinned. * * Return: Non-negative on success/Negative on failure @@ -4187,8 +4187,8 @@ herr_t H5C_destroy_flush_dependency(void *parent_thing, void * child_thing) { H5C_t * cache_ptr; - H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent entry */ - H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child entry */ + H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent entry */ + H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child entry */ unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -4286,16 +4286,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_destroy_flush_dependency() */ - + /*************************************************************************/ /**************************** Private Functions: *************************/ /*************************************************************************/ - + /*------------------------------------------------------------------------- * Function: H5C__pin_entry_from_client() * - * Purpose: Internal routine to pin a cache entry from a client action. + * Purpose: Internal routine to pin a cache entry from a client action. * * Return: Non-negative on success/Negative on failure * @@ -4340,11 +4340,11 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__pin_entry_from_client() */ - + /*------------------------------------------------------------------------- * Function: H5C__unpin_entry_real() * - * Purpose: Internal routine to unpin a cache entry. + * Purpose: Internal routine to unpin a cache entry. * * Return: Non-negative on success/Negative on failure * @@ -4386,11 +4386,11 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__unpin_entry_real() */ - + /*------------------------------------------------------------------------- * Function: H5C__unpin_entry_from_client() * - * Purpose: Internal routine to unpin a cache entry from a client action. + * Purpose: Internal routine to unpin a cache entry from a client action. * * Return: Non-negative on success/Negative on failure * @@ -4431,18 +4431,18 @@ done: /*------------------------------------------------------------------------- * - * Function: H5C__auto_adjust_cache_size + * Function: H5C__auto_adjust_cache_size * - * Purpose: Obtain the current full cache hit rate, and compare it - * with the hit rate thresholds for modifying cache size. - * If one of the thresholds has been crossed, adjusts the - * size of the cache accordingly. + * Purpose: Obtain the current full cache hit rate, and compare it + * with the hit rate thresholds for modifying cache size. + * If one of the thresholds has been crossed, adjusts the + * size of the cache accordingly. * - * The function then resets the full cache hit rate - * statistics, and exits. + * The function then resets the full cache hit rate + * statistics, and exits. * * Return: Non-negative on success/Negative on failure or if there was - * an attempt to flush a protected item. + * an attempt to flush a protected item. * * * Programmer: John Mainzer, 10/7/04 @@ -4452,16 +4452,16 @@ done: static herr_t H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted) { - H5C_t * cache_ptr = f->shared->cache; - hbool_t reentrant_call = FALSE; - hbool_t inserted_epoch_marker = FALSE; - size_t new_max_cache_size = 0; - size_t old_max_cache_size = 0; - size_t new_min_clean_size = 0; - size_t old_min_clean_size = 0; - double hit_rate; - enum H5C_resize_status status = in_spec; /* will change if needed */ - herr_t ret_value = SUCCEED; /* Return value */ + H5C_t * cache_ptr = f->shared->cache; + hbool_t reentrant_call = FALSE; + hbool_t inserted_epoch_marker = FALSE; + size_t new_max_cache_size = 0; + size_t old_max_cache_size = 0; + size_t new_min_clean_size = 0; + size_t old_min_clean_size = 0; + double hit_rate; + enum H5C_resize_status status = in_spec; /* will change if needed */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -4682,9 +4682,9 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted) /* new_min_clean_size is of size_t, and thus must be non-negative. * Hence we have * - * ( 0 <= new_min_clean_size ). + * ( 0 <= new_min_clean_size ). * - * by definition. + * by definition. */ HDassert( new_min_clean_size <= new_max_cache_size ); HDassert( (cache_ptr->resize_ctl).min_size <= new_max_cache_size ); @@ -4702,8 +4702,8 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted) cache_ptr->size_decreased = TRUE; } - /* update flash cache size increase fields as appropriate */ - if ( cache_ptr->flash_size_increase_possible ) { + /* update flash cache size increase fields as appropriate */ + if ( cache_ptr->flash_size_increase_possible ) { switch ( (cache_ptr->resize_ctl).flash_incr_mode ) { @@ -4751,17 +4751,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__auto_adjust_cache_size() */ - + /*------------------------------------------------------------------------- * * Function: H5C__autoadjust__ageout * * Purpose: Implement the ageout automatic cache size decrement - * algorithm. Note that while this code evicts aged out - * entries, the code does not change the maximum cache size. - * Instead, the function simply computes the new value (if - * any change is indicated) and reports this value in - * *new_max_cache_size_ptr. + * algorithm. Note that while this code evicts aged out + * entries, the code does not change the maximum cache size. + * Instead, the function simply computes the new value (if + * any change is indicated) and reports this value in + * *new_max_cache_size_ptr. * * Return: Non-negative on success/Negative on failure or if there was * an attempt to flush a protected item. @@ -4776,8 +4776,8 @@ H5C__autoadjust__ageout(H5F_t * f, double hit_rate, enum H5C_resize_status * sta size_t * new_max_cache_size_ptr, hbool_t write_permitted) { H5C_t * cache_ptr = f->shared->cache; - size_t test_size; - herr_t ret_value = SUCCEED; /* Return value */ + size_t test_size; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -4860,16 +4860,16 @@ done: } /* H5C__autoadjust__ageout() */ - + /*------------------------------------------------------------------------- * * Function: H5C__autoadjust__ageout__cycle_epoch_marker * * Purpose: Remove the oldest epoch marker from the LRU list, - * and reinsert it at the head of the LRU list. Also - * remove the epoch marker's index from the head of the - * ring buffer, and re-insert it at the tail of the ring - * buffer. + * and reinsert it at the head of the LRU list. Also + * remove the epoch marker's index from the head of the + * ring buffer, and re-insert it at the tail of the ring + * buffer. * * Return: SUCCEED on success/FAIL on failure. * @@ -4944,37 +4944,37 @@ done: } /* H5C__autoadjust__ageout__cycle_epoch_marker() */ - + /*------------------------------------------------------------------------- * * Function: H5C__autoadjust__ageout__evict_aged_out_entries * * Purpose: Evict clean entries in the cache that haven't - * been accessed for at least + * been accessed for at least * (cache_ptr->resize_ctl).epochs_before_eviction epochs, - * and flush dirty entries that haven't been accessed for - * that amount of time. + * and flush dirty entries that haven't been accessed for + * that amount of time. * - * Depending on configuration, the function will either - * flush or evict all such entries, or all such entries it - * encounters until it has freed the maximum amount of space - * allowed under the maximum decrement. + * Depending on configuration, the function will either + * flush or evict all such entries, or all such entries it + * encounters until it has freed the maximum amount of space + * allowed under the maximum decrement. * - * If we are running in parallel mode, writes may not be - * permitted. If so, the function simply skips any dirty - * entries it may encounter. + * If we are running in parallel mode, writes may not be + * permitted. If so, the function simply skips any dirty + * entries it may encounter. * - * The function makes no attempt to maintain the minimum - * clean size, as there is no guarantee that the cache size - * will be changed. + * The function makes no attempt to maintain the minimum + * clean size, as there is no guarantee that the cache size + * will be changed. * - * If there is no cache size change, the minimum clean size - * constraint will be met through a combination of clean - * entries and free space in the cache. + * If there is no cache size change, the minimum clean size + * constraint will be met through a combination of clean + * entries and free space in the cache. * - * If there is a cache size reduction, the minimum clean size - * will be re-calculated, and will be enforced the next time - * we have to make space in the cache. + * If there is a cache size reduction, the minimum clean size + * will be re-calculated, and will be enforced the next time + * we have to make space in the cache. * * Observe that this function cannot occasion a read. * @@ -4987,10 +4987,10 @@ done: static herr_t H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitted) { - H5C_t * cache_ptr = f->shared->cache; - size_t eviction_size_limit; - size_t bytes_evicted = 0; - hbool_t prev_is_dirty = FALSE; + H5C_t * cache_ptr = f->shared->cache; + size_t eviction_size_limit; + size_t bytes_evicted = 0; + hbool_t prev_is_dirty = FALSE; hbool_t restart_scan; H5C_cache_entry_t * entry_ptr; H5C_cache_entry_t * next_ptr; @@ -5034,10 +5034,10 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte HDassert( ! (entry_ptr->is_read_only) ); HDassert( (entry_ptr->ro_ref_count) == 0 ); - next_ptr = entry_ptr->next; + next_ptr = entry_ptr->next; prev_ptr = entry_ptr->prev; - if(prev_ptr != NULL) + if(prev_ptr != NULL) prev_is_dirty = prev_ptr->is_dirty; if(entry_ptr->is_dirty ) { @@ -5082,23 +5082,23 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte if(prev_ptr != NULL) { if(skipping_entry) entry_ptr = prev_ptr; - else if(restart_scan || (prev_ptr->is_dirty != prev_is_dirty) + else if(restart_scan || (prev_ptr->is_dirty != prev_is_dirty) || (prev_ptr->next != next_ptr) || (prev_ptr->is_protected) || (prev_ptr->is_pinned)) { /* Something has happened to the LRU -- start over - * from the tail. + * from the tail. */ restart_scan = FALSE; entry_ptr = cache_ptr->LRU_tail_ptr; - H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) + H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) } /* end else-if */ else entry_ptr = prev_ptr; - } /* end if */ + } /* end if */ else - entry_ptr = NULL; + entry_ptr = NULL; } /* end while */ /* for now at least, don't bother to maintain the minimum clean size, @@ -5146,10 +5146,10 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte /* just skip the entry if it is dirty, as we can't do * anything with it now since we can't write. - * - * Since all entries are clean, serialize() will not be called, - * and thus we needn't test to see if the LRU has been changed - * out from under us. + * + * Since all entries are clean, serialize() will not be called, + * and thus we needn't test to see if the LRU has been changed + * out from under us. */ entry_ptr = prev_ptr; } /* end while */ @@ -5162,14 +5162,14 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__autoadjust__ageout__evict_aged_out_entries() */ - + /*------------------------------------------------------------------------- * * Function: H5C__autoadjust__ageout__insert_new_marker * * Purpose: Find an unused marker cache entry, mark it as used, and - * insert it at the head of the LRU list. Also add the - * marker's index in the epoch_markers array. + * insert it at the head of the LRU list. Also add the + * marker's index in the epoch_markers array. * * Return: SUCCEED on success/FAIL on failure. * @@ -5233,13 +5233,13 @@ done: } /* H5C__autoadjust__ageout__insert_new_marker() */ - + /*------------------------------------------------------------------------- * * Function: H5C__autoadjust__ageout__remove_all_markers * * Purpose: Remove all epoch markers from the LRU list and mark them - * as inactive. + * as inactive. * * Return: SUCCEED on success/FAIL on failure. * @@ -5308,15 +5308,15 @@ done: } /* H5C__autoadjust__ageout__remove_all_markers() */ - + /*------------------------------------------------------------------------- * * Function: H5C__autoadjust__ageout__remove_excess_markers * * Purpose: Remove epoch markers from the end of the LRU list and - * mark them as inactive until the number of active markers - * equals the the current value of - * (cache_ptr->resize_ctl).epochs_before_eviction. + * mark them as inactive until the number of active markers + * equals the the current value of + * (cache_ptr->resize_ctl).epochs_before_eviction. * * Return: SUCCEED on success/FAIL on failure. * @@ -5327,9 +5327,9 @@ done: static herr_t H5C__autoadjust__ageout__remove_excess_markers(H5C_t * cache_ptr) { - int ring_buf_index; - int i; - herr_t ret_value = SUCCEED; /* Return value */ + int ring_buf_index; + int i; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -5386,7 +5386,7 @@ done: } /* H5C__autoadjust__ageout__remove_excess_markers() */ - + /*------------------------------------------------------------------------- * * Function: H5C__flash_increase_cache_size @@ -5448,7 +5448,7 @@ H5C__flash_increase_cache_size(H5C_t * cache_ptr, HDassert( (cache_ptr->max_cache_size - cache_ptr->index_size) < space_needed ); space_needed -= cache_ptr->max_cache_size - - cache_ptr->index_size; + cache_ptr->index_size; } space_needed = (size_t)(((double)space_needed) * @@ -5504,9 +5504,9 @@ H5C__flash_increase_cache_size(H5C_t * cache_ptr, } /* note that we don't cycle the epoch markers. We can - * argue either way as to whether we should, but for now - * we don't. - */ + * argue either way as to whether we should, but for now + * we don't. + */ if ( (cache_ptr->resize_ctl).rpt_fcn != NULL ) { @@ -5538,37 +5538,37 @@ done: } /* H5C__flash_increase_cache_size() */ - + /*------------------------------------------------------------------------- * * Function: H5C__flush_invalidate_cache * - * Purpose: Flush and destroy the entries contained in the target - * cache. + * Purpose: Flush and destroy the entries contained in the target + * cache. * - * If the cache contains protected entries, the function will - * fail, as protected entries cannot be either flushed or - * destroyed. However all unprotected entries should be - * flushed and destroyed before the function returns failure. + * If the cache contains protected entries, the function will + * fail, as protected entries cannot be either flushed or + * destroyed. However all unprotected entries should be + * flushed and destroyed before the function returns failure. * - * While pinned entries can usually be flushed, they cannot - * be destroyed. However, they should be unpinned when all - * the entries that reference them have been destroyed (thus - * reduding the pinned entry's reference count to 0, allowing - * it to be unpinned). + * While pinned entries can usually be flushed, they cannot + * be destroyed. However, they should be unpinned when all + * the entries that reference them have been destroyed (thus + * reduding the pinned entry's reference count to 0, allowing + * it to be unpinned). * - * If pinned entries are present, the function makes repeated - * passes through the cache, flushing all dirty entries - * (including the pinned dirty entries where permitted) and - * destroying all unpinned entries. This process is repeated - * until either the cache is empty, or the number of pinned - * entries stops decreasing on each pass. + * If pinned entries are present, the function makes repeated + * passes through the cache, flushing all dirty entries + * (including the pinned dirty entries where permitted) and + * destroying all unpinned entries. This process is repeated + * until either the cache is empty, or the number of pinned + * entries stops decreasing on each pass. * * Return: Non-negative on success/Negative on failure or if there was - * a request to flush all items and something was protected. + * a request to flush all items and something was protected. * * Programmer: John Mainzer - * 3/24/065 + * 3/24/065 * * Modifications: * @@ -5589,7 +5589,7 @@ done: * Note that this is a pretty bad scenario if it ever * happens. The code I have added should allow us to * handle the situation under all but the worst conditions, - * but one can argue that we should just scream and die if + * but one can argue that we should just scream and die if * we ever detect the condition. * * -- JRM 10/13/07 @@ -5598,15 +5598,15 @@ done: * * * Added support for the H5C__EVICT_ALLOW_LAST_PINS_FLAG. - * This flag is used to flush and evict all entries in + * This flag is used to flush and evict all entries in * the metadata cache that are not pinned -- typically, * everything other than the superblock. * * ??? -- ??/??/?? * - * Added sanity checks to verify that the skip list is - * enabled on entry. On the face of it, it would make - * sense to enable the slist on entry, and disable it + * Added sanity checks to verify that the skip list is + * enabled on entry. On the face of it, it would make + * sense to enable the slist on entry, and disable it * on exit, as this function is not called repeatedly. * However, since this function can be called from * H5C_flush_cache(), this would create cases in the test @@ -5620,9 +5620,9 @@ done: static herr_t H5C__flush_invalidate_cache(H5F_t *f, unsigned flags) { - H5C_t * cache_ptr; - H5C_ring_t ring; - herr_t ret_value = SUCCEED; + H5C_t * cache_ptr; + H5C_ring_t ring; + herr_t ret_value = SUCCEED; FUNC_ENTER_STATIC @@ -5636,13 +5636,13 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags) #if H5C_DO_SANITY_CHECKS { - int32_t i; - uint32_t index_len = 0; - uint32_t slist_len = 0; - size_t index_size = (size_t)0; - size_t clean_index_size = (size_t)0; - size_t dirty_index_size = (size_t)0; - size_t slist_size = (size_t)0; + int32_t i; + uint32_t index_len = 0; + uint32_t slist_len = 0; + size_t index_size = (size_t)0; + size_t clean_index_size = (size_t)0; + size_t dirty_index_size = (size_t)0; + size_t slist_size = (size_t)0; HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0); HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0); @@ -5690,7 +5690,7 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags) if(H5C__flush_invalidate_ring(f, ring, flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush invalidate ring failed") ring++; @@ -5749,7 +5749,7 @@ done: } /* H5C__flush_invalidate_cache() */ - + /*------------------------------------------------------------------------- * Function: H5C__flush_invalidate_ring * @@ -5785,7 +5785,7 @@ done: * 9/1/15 * * Changes: Added support for the H5C__EVICT_ALLOW_LAST_PINS_FLAG. - * This flag is used to flush and evict all entries in + * This flag is used to flush and evict all entries in * the metadata cache that are not pinned -- typically, * everything other than the superblock. * @@ -5793,7 +5793,7 @@ done: * * A recent optimization turns off the slist unless a flush * is in progress. This should not effect this function, as - * it is only called during a flush. Added an assertion to + * it is only called during a flush. Added an assertion to * verify this. * * JRM -- 5/6/20 @@ -6017,7 +6017,7 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags) */ if ( ( ( !entry_ptr->flush_me_last ) || ( ( entry_ptr->flush_me_last ) && - ( cache_ptr->num_last_entries >= cache_ptr->slist_len ) ) + ( cache_ptr->num_last_entries >= cache_ptr->slist_len ) ) ) && ( entry_ptr->flush_dep_nchildren == 0 ) && ( entry_ptr->ring == ring ) ) { @@ -6032,7 +6032,7 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags) } /* end if */ else if ( entry_ptr->is_pinned ) { - if ( H5C__flush_single_entry(f, entry_ptr, + if ( H5C__flush_single_entry(f, entry_ptr, H5C__DURING_FLUSH_FLAG) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ @@ -6055,13 +6055,13 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags) } /* end else-if */ else { - if ( H5C__flush_single_entry(f, entry_ptr, - (cooked_flags | - H5C__DURING_FLUSH_FLAG | + if ( H5C__flush_single_entry(f, entry_ptr, + (cooked_flags | + H5C__DURING_FLUSH_FLAG | H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) ) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "dirty entry flush destroy failed") if ( cache_ptr->slist_changed ) { @@ -6093,12 +6093,12 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags) if ( node_ptr == NULL ) { - HDassert(cache_ptr->slist_len == - (uint32_t)((int32_t)initial_slist_len + + HDassert(cache_ptr->slist_len == + (uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase)); - HDassert(cache_ptr->slist_size == - (size_t)((ssize_t)initial_slist_size + + HDassert(cache_ptr->slist_size == + (size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase)); } /* end if */ #endif /* H5C_DO_SANITY_CHECKS */ @@ -6134,11 +6134,11 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags) HDassert((next_entry_ptr == NULL) || (next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC)); - if ( ( ( ! entry_ptr->flush_me_last ) || - ( entry_ptr->flush_me_last && - ( cache_ptr->num_last_entries >= cache_ptr->slist_len ) ) - ) && - ( entry_ptr->flush_dep_nchildren == 0 ) && + if ( ( ( ! entry_ptr->flush_me_last ) || + ( entry_ptr->flush_me_last && + ( cache_ptr->num_last_entries >= cache_ptr->slist_len ) ) + ) && + ( entry_ptr->flush_dep_nchildren == 0 ) && ( entry_ptr->ring == ring ) ) { if ( entry_ptr->is_protected ) { @@ -6184,10 +6184,10 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags) */ cache_ptr->entry_watched_for_removal = next_entry_ptr; - if ( H5C__flush_single_entry(f, entry_ptr, - (cooked_flags | - H5C__DURING_FLUSH_FLAG | - H5C__FLUSH_INVALIDATE_FLAG | + if ( H5C__flush_single_entry(f, entry_ptr, + (cooked_flags | + H5C__DURING_FLUSH_FLAG | + H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG)) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ @@ -6201,8 +6201,8 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags) * if this results in the size of the pinned entry * failing to decline during the pass. */ - if ( ( ( NULL != next_entry_ptr ) && - ( NULL == cache_ptr->entry_watched_for_removal ) + if ( ( ( NULL != next_entry_ptr ) && + ( NULL == cache_ptr->entry_watched_for_removal ) ) || ( cache_ptr->entries_loaded_counter > 0 ) || ( cache_ptr->entries_inserted_counter > 0 ) || @@ -6254,7 +6254,7 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags) /* Check if the number of pinned entries in the ring is positive, and * it is not declining. Scream and die if so. */ - if ( ( cur_ring_pel_len > 0 ) && + if ( ( cur_ring_pel_len > 0 ) && ( cur_ring_pel_len >= old_ring_pel_len ) ) { /* Don't error if allowed to have pinned entries remaining */ @@ -6271,7 +6271,7 @@ H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags) HDassert(protected_entries == cache_ptr->pl_len); - if ( ( protected_entries > 0 ) && + if ( ( protected_entries > 0 ) && ( protected_entries == cache_ptr->index_len ) ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ @@ -6312,7 +6312,7 @@ done: } /* H5C__flush_invalidate_ring() */ - + /*------------------------------------------------------------------------- * * Function: H5C__flush_ring @@ -6338,7 +6338,7 @@ done: * * Changes: A recent optimization turns off the slist unless a flush * is in progress. This should not effect this function, as - * it is only called during a flush. Added an assertion to + * it is only called during a flush. Added an assertion to * verify this. * * JRM -- 5/6/20 @@ -6350,21 +6350,21 @@ static herr_t H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) { H5C_t * cache_ptr = f->shared->cache; - hbool_t flushed_entries_last_pass; - hbool_t flush_marked_entries; - hbool_t ignore_protected; - hbool_t tried_to_flush_protected_entry = FALSE; - hbool_t restart_slist_scan; - uint32_t protected_entries = 0; - H5SL_node_t * node_ptr = NULL; - H5C_cache_entry_t * entry_ptr = NULL; - H5C_cache_entry_t * next_entry_ptr = NULL; + hbool_t flushed_entries_last_pass; + hbool_t flush_marked_entries; + hbool_t ignore_protected; + hbool_t tried_to_flush_protected_entry = FALSE; + hbool_t restart_slist_scan; + uint32_t protected_entries = 0; + H5SL_node_t * node_ptr = NULL; + H5C_cache_entry_t * entry_ptr = NULL; + H5C_cache_entry_t * next_entry_ptr = NULL; #if H5C_DO_SANITY_CHECKS - uint32_t initial_slist_len = 0; + uint32_t initial_slist_len = 0; size_t initial_slist_size = 0; #endif /* H5C_DO_SANITY_CHECKS */ int i; - herr_t ret_value = SUCCEED; + herr_t ret_value = SUCCEED; FUNC_ENTER_STATIC @@ -6381,7 +6381,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) ( H5C__validate_pinned_entry_list(cache_ptr ) < 0 ) || ( H5C__validate_lru_list(cache_ptr) < 0 ) ) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ @@ -6550,15 +6550,15 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) next_entry_ptr = NULL; } - if ( ( ! flush_marked_entries || entry_ptr->flush_marker ) && + if ( ( ! flush_marked_entries || entry_ptr->flush_marker ) && ( ( ! entry_ptr->flush_me_last ) || - ( ( entry_ptr->flush_me_last ) && + ( ( entry_ptr->flush_me_last ) && ( ( cache_ptr->num_last_entries >= cache_ptr->slist_len )|| ( flush_marked_entries && entry_ptr->flush_marker ) ) ) - ) && - ( ( entry_ptr->flush_dep_nchildren == 0 ) || - ( entry_ptr->flush_dep_ndirty_children == 0 ) ) && + ) && + ( ( entry_ptr->flush_dep_nchildren == 0 ) || + ( entry_ptr->flush_dep_ndirty_children == 0 ) ) && ( entry_ptr->ring == ring ) ) { HDassert(entry_ptr->flush_dep_nunser_children == 0); @@ -6575,7 +6575,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) } /* end if */ else { - if ( H5C__flush_single_entry(f, entry_ptr, + if ( H5C__flush_single_entry(f, entry_ptr, (flags | H5C__DURING_FLUSH_FLAG)) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ @@ -6614,7 +6614,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) HDassert(protected_entries <= cache_ptr->pl_len); - if ( ( ( cache_ptr->pl_len > 0 ) && ( ! ignore_protected ) ) || + if ( ( ( cache_ptr->pl_len > 0 ) && ( ! ignore_protected ) ) || ( tried_to_flush_protected_entry ) ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ @@ -6635,7 +6635,7 @@ done: } /* H5C__flush_ring() */ - + /*------------------------------------------------------------------------- * * Function: H5C__flush_single_entry @@ -6718,10 +6718,10 @@ done: * * * JRM -- 5/8/20 - * Updated sanity checks for the possibility that the slist + * Updated sanity checks for the possibility that the slist * is disabled. * - * Also updated main comment to conform more closely with + * Also updated main comment to conform more closely with * the current state of the code. * *------------------------------------------------------------------------- @@ -6762,7 +6762,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) clear_only = ((flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0); free_file_space = ((flags & H5C__FREE_FILE_SPACE_FLAG) != 0); take_ownership = ((flags & H5C__TAKE_OWNERSHIP_FLAG) != 0); - del_from_slist_on_destroy = + del_from_slist_on_destroy = ((flags & H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) != 0); during_flush = ((flags & H5C__DURING_FLUSH_FLAG) != 0); generate_image = ((flags & H5C__GENERATE_IMAGE_FLAG) != 0); @@ -6799,9 +6799,9 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) * Set suppress_image_entry_writes to TRUE if indicated by the * image_ctl flags. */ - if ( ( cache_ptr->close_warning_received ) && - ( cache_ptr->image_ctl.generate_image ) && - ( cache_ptr->num_entries_in_image > 0 ) && + if ( ( cache_ptr->close_warning_received ) && + ( cache_ptr->image_ctl.generate_image ) && + ( cache_ptr->num_entries_in_image > 0 ) && ( cache_ptr->image_entries != NULL ) ) { /* Sanity checks */ @@ -6820,8 +6820,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) } /* end if */ } /* end if */ - /* run initial sanity checks */ -#if H5C_DO_SANITY_CHECKS + /* run initial sanity checks */ +#if H5C_DO_SANITY_CHECKS if ( cache_ptr->slist_enabled ) { if ( entry_ptr->in_slist ) { @@ -6891,14 +6891,14 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) if ( NULL == entry_ptr->image_ptr ) { - if ( NULL == (entry_ptr->image_ptr = + if ( NULL == (entry_ptr->image_ptr = H5MM_malloc(entry_ptr->size + H5C_IMAGE_EXTRA_SPACE)) ) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, \ "memory allocation failed for on disk image buffer") #if H5C_DO_MEMORY_SANITY_CHECKS - H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, + H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); #endif /* H5C_DO_MEMORY_SANITY_CHECKS */ @@ -6929,7 +6929,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) HDassert(entry_ptr->is_dirty); #if H5C_DO_SANITY_CHECKS - if ( ( cache_ptr->check_write_permitted ) && + if ( ( cache_ptr->check_write_permitted ) && ( ! ( cache_ptr->write_permitted ) ) ) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ @@ -6943,8 +6943,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) * H5AC__CLASS_SKIP_WRITES is set in the entry's type. This * flag should only be used in test code */ - if ( ( ( ! suppress_image_entry_writes ) || - ( ! entry_ptr->include_in_image ) ) && + if ( ( ( ! suppress_image_entry_writes ) || + ( ! entry_ptr->include_in_image ) ) && ( ( (entry_ptr->type->flags) & H5C__CLASS_SKIP_WRITES) == 0 ) ) { H5FD_mem_t mem_type = H5FD_MEM_DEFAULT; @@ -6952,7 +6952,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) #ifdef H5_HAVE_PARALLEL if ( cache_ptr->coll_write_list ) { - if ( H5SL_insert(cache_ptr->coll_write_list, entry_ptr, + if ( H5SL_insert(cache_ptr->coll_write_list, entry_ptr, &entry_ptr->addr) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, \ @@ -6975,7 +6975,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) mem_type = entry_ptr->type->mem_type; } - if ( H5F_block_write(f, mem_type, entry_ptr->addr, + if ( H5F_block_write(f, mem_type, entry_ptr->addr, entry_ptr->size, entry_ptr->image_ptr) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ @@ -6991,7 +6991,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) * just flushed the entry. */ if ( ( entry_ptr->type->notify ) && - ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH, + ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH, entry_ptr) < 0 ) ) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \ @@ -7052,8 +7052,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) * to be removed from the cache, send a 'before eviction' notice while * the entry is still fully integrated in the cache. */ - if ( ( entry_ptr->type->notify ) && - ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT, + if ( ( entry_ptr->type->notify ) && + ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT, entry_ptr) < 0 ) ) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \ @@ -7136,19 +7136,19 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) /* Check for entry changing status and do notifications, etc. */ if ( was_dirty ) { - /* If the entry's type has a 'notify' callback send a - * 'entry cleaned' notice now that the entry is fully + /* If the entry's type has a 'notify' callback send a + * 'entry cleaned' notice now that the entry is fully * integrated into the cache. */ if ( ( entry_ptr->type->notify ) && - ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED, + ( (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED, entry_ptr) < 0 ) ) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, \ "can't notify client about entry dirty flag cleared") - /* Propagate the clean flag up the flush dependency chain - * if appropriate + /* Propagate the clean flag up the flush dependency chain + * if appropriate */ if ( entry_ptr->flush_dep_ndirty_children != 0 ) { @@ -7169,7 +7169,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) entry_ptr->flush_in_progress = FALSE; /* capture the cache entry address for the log_flush call at the - * end before the entry_ptr gets freed + * end before the entry_ptr gets freed */ entry_addr = entry_ptr->addr; @@ -7251,7 +7251,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) } /* Release the space on disk */ - if ( H5MF_xfree(f, entry_ptr->type->mem_type, + if ( H5MF_xfree(f, entry_ptr->type->mem_type, entry_ptr->addr, fsf_size) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, \ @@ -7294,8 +7294,8 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) /* Reset dirty flag */ entry_ptr->is_dirty = FALSE; - /* If the entry's type has a 'notify' callback send a - * 'entry cleaned' notice now that the entry is fully + /* If the entry's type has a 'notify' callback send a + * 'entry cleaned' notice now that the entry is fully * integrated into the cache. */ if ( ( entry_ptr->type->notify ) && @@ -7344,10 +7344,10 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) HDassert(!destroy); HDassert(entry_ptr->image_ptr); - if ( ( f->shared->page_buf ) && + if ( ( f->shared->page_buf ) && ( f->shared->page_buf->page_size >= entry_ptr->size ) ) { - if ( H5PB_update_entry(f->shared->page_buf, entry_ptr->addr, + if ( H5PB_update_entry(f->shared->page_buf, entry_ptr->addr, entry_ptr->size, entry_ptr->image_ptr) > 0 ) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ @@ -7357,7 +7357,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) if ( cache_ptr->log_flush ) { - if ( (cache_ptr->log_flush)(cache_ptr, entry_addr, + if ( (cache_ptr->log_flush)(cache_ptr, entry_addr, was_dirty, flags) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ @@ -7377,7 +7377,7 @@ done: } /* H5C__flush_single_entry() */ - + /*------------------------------------------------------------------------- * * Function: H5C__verify_len_eoa @@ -7404,8 +7404,8 @@ H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr, size_t *len, hbool_t actual) { H5FD_mem_t cooked_type; /* Modified type, accounting for switching global heaps */ - haddr_t eoa; /* End-of-allocation in the file */ - herr_t ret_value = SUCCEED; /* Return value */ + haddr_t eoa; /* End-of-allocation in the file */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -7419,29 +7419,29 @@ H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr, /* Get the file's end-of-allocation value */ eoa = H5F_get_eoa(f, cooked_type); if(!H5F_addr_defined(eoa)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid EOA address for file") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid EOA address for file") /* Check for bad address in general */ if(H5F_addr_gt(addr, eoa)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "address of object past end of allocation") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "address of object past end of allocation") /* Check if the amount of data to read will be past the EOA */ if(H5F_addr_gt((addr + *len), eoa)) { - if(actual) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "actual len exceeds EOA") - else - /* Trim down the length of the metadata */ - *len = (size_t)(eoa - addr); + if(actual) + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "actual len exceeds EOA") + else + /* Trim down the length of the metadata */ + *len = (size_t)(eoa - addr); } /* end if */ if(*len <= 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "len not positive after adjustment for EOA") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "len not positive after adjustment for EOA") done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__verify_len_eoa() */ - + /*------------------------------------------------------------------------- * * Function: H5C__load_entry @@ -7680,7 +7680,7 @@ H5C__load_entry(H5F_t * f, * * In the following assert: * - * HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) ); + * HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) ); * * note that type ids 5 & 6 are associated with object headers in the * metadata cache. @@ -7700,7 +7700,7 @@ H5C__load_entry(H5F_t * f, entry->image_ptr = image; entry->image_up_to_date = !dirty; entry->type = type; - entry->is_dirty = dirty; + entry->is_dirty = dirty; entry->dirtied = FALSE; entry->is_protected = FALSE; entry->is_read_only = FALSE; @@ -7728,7 +7728,7 @@ H5C__load_entry(H5F_t * f, entry->ht_next = NULL; entry->ht_prev = NULL; entry->il_next = NULL; - entry->il_prev = NULL; + entry->il_prev = NULL; entry->next = NULL; entry->prev = NULL; @@ -7781,28 +7781,28 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__load_entry() */ - + /*------------------------------------------------------------------------- * * Function: H5C__make_space_in_cache * * Purpose: Attempt to evict cache entries until the index_size - * is at least needed_space below max_cache_size. + * is at least needed_space below max_cache_size. * - * In passing, also attempt to bring cLRU_list_size to a - * value greater than min_clean_size. + * In passing, also attempt to bring cLRU_list_size to a + * value greater than min_clean_size. * - * Depending on circumstances, both of these goals may - * be impossible, as in parallel mode, we must avoid generating - * a write as part of a read (to avoid deadlock in collective - * I/O), and in all cases, it is possible (though hopefully - * highly unlikely) that the protected list may exceed the - * maximum size of the cache. + * Depending on circumstances, both of these goals may + * be impossible, as in parallel mode, we must avoid generating + * a write as part of a read (to avoid deadlock in collective + * I/O), and in all cases, it is possible (though hopefully + * highly unlikely) that the protected list may exceed the + * maximum size of the cache. * - * Thus the function simply does its best, returning success - * unless an error is encountered. + * Thus the function simply does its best, returning success + * unless an error is encountered. * - * Observe that this function cannot occasion a read. + * Observe that this function cannot occasion a read. * * Return: Non-negative on success/Negative on failure. * @@ -7811,26 +7811,26 @@ done: *------------------------------------------------------------------------- */ herr_t -H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted) +H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted) { - H5C_t * cache_ptr = f->shared->cache; + H5C_t * cache_ptr = f->shared->cache; #if H5C_COLLECT_CACHE_STATS int32_t clean_entries_skipped = 0; int32_t dirty_pf_entries_skipped = 0; int32_t total_entries_scanned = 0; #endif /* H5C_COLLECT_CACHE_STATS */ - uint32_t entries_examined = 0; - uint32_t initial_list_len; - size_t empty_space; + uint32_t entries_examined = 0; + uint32_t initial_list_len; + size_t empty_space; hbool_t reentrant_call = FALSE; - hbool_t prev_is_dirty = FALSE; + hbool_t prev_is_dirty = FALSE; hbool_t didnt_flush_entry = FALSE; - hbool_t restart_scan; - H5C_cache_entry_t * entry_ptr; - H5C_cache_entry_t * prev_ptr; - H5C_cache_entry_t * next_ptr; - uint32_t num_corked_entries = 0; - herr_t ret_value = SUCCEED; /* Return value */ + hbool_t restart_scan; + H5C_cache_entry_t * entry_ptr; + H5C_cache_entry_t * prev_ptr; + H5C_cache_entry_t * next_ptr; + uint32_t num_corked_entries = 0; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -7857,47 +7857,47 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted) initial_list_len = cache_ptr->LRU_list_len; entry_ptr = cache_ptr->LRU_tail_ptr; - if(cache_ptr->index_size >= cache_ptr->max_cache_size) - empty_space = 0; - else - empty_space = cache_ptr->max_cache_size - cache_ptr->index_size; + if(cache_ptr->index_size >= cache_ptr->max_cache_size) + empty_space = 0; + else + empty_space = cache_ptr->max_cache_size - cache_ptr->index_size; while ( ( ( (cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size ) - || - ( - ( empty_space + cache_ptr->clean_index_size ) - < - ( cache_ptr->min_clean_size ) + || + ( + ( empty_space + cache_ptr->clean_index_size ) + < + ( cache_ptr->min_clean_size ) ) - ) + ) && ( entries_examined <= (2 * initial_list_len) ) && ( entry_ptr != NULL ) ) { - HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); HDassert( !(entry_ptr->is_protected) ); HDassert( ! (entry_ptr->is_read_only) ); HDassert( (entry_ptr->ro_ref_count) == 0 ); - next_ptr = entry_ptr->next; + next_ptr = entry_ptr->next; prev_ptr = entry_ptr->prev; - if(prev_ptr != NULL) - prev_is_dirty = prev_ptr->is_dirty; + if(prev_ptr != NULL) + prev_is_dirty = prev_ptr->is_dirty; - if(entry_ptr->is_dirty && + if(entry_ptr->is_dirty && (entry_ptr->tag_info && entry_ptr->tag_info->corked)) { /* Skip "dirty" corked entries. */ - ++num_corked_entries; + ++num_corked_entries; didnt_flush_entry = TRUE; - } else if ( ( (entry_ptr->type)->id != H5AC_EPOCH_MARKER_ID ) && + } else if ( ( (entry_ptr->type)->id != H5AC_EPOCH_MARKER_ID ) && ( ! entry_ptr->flush_in_progress ) && ( ! entry_ptr->prefetched_dirty ) ) { @@ -7914,7 +7914,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted) } #endif /* H5C_COLLECT_CACHE_STATS */ - /* reset entries_removed_counter and + /* reset entries_removed_counter and * last_entry_removed_ptr prior to the call to * H5C__flush_single_entry() so that we can spot * unexpected removals of entries from the cache, @@ -7928,7 +7928,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted) if(H5C__flush_single_entry(f, entry_ptr, H5C__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry") - if ( ( cache_ptr->entries_removed_counter > 1 ) || + if ( ( cache_ptr->entries_removed_counter > 1 ) || ( cache_ptr->last_entry_removed_ptr == prev_ptr ) ) restart_scan = TRUE; @@ -7970,63 +7970,63 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted) #endif /* H5C_COLLECT_CACHE_STATS */ } - if ( prev_ptr != NULL ) { + if ( prev_ptr != NULL ) { - if ( didnt_flush_entry ) { + if ( didnt_flush_entry ) { - /* epoch markers don't get flushed, and we don't touch + /* epoch markers don't get flushed, and we don't touch * entries that are in the process of being flushed. * Hence no need for sanity checks, as we haven't * flushed anything. Thus just set entry_ptr to prev_ptr * and go on. - */ + */ entry_ptr = prev_ptr; - } else if ( ( restart_scan ) + } else if ( ( restart_scan ) || ( prev_ptr->is_dirty != prev_is_dirty ) - || - ( prev_ptr->next != next_ptr ) - || - ( prev_ptr->is_protected ) - || - ( prev_ptr->is_pinned ) ) { - - /* something has happened to the LRU -- start over - * from the tail. - */ + || + ( prev_ptr->next != next_ptr ) + || + ( prev_ptr->is_protected ) + || + ( prev_ptr->is_pinned ) ) { + + /* something has happened to the LRU -- start over + * from the tail. + */ restart_scan = FALSE; - entry_ptr = cache_ptr->LRU_tail_ptr; - H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) + entry_ptr = cache_ptr->LRU_tail_ptr; + H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) - } else { + } else { - entry_ptr = prev_ptr; + entry_ptr = prev_ptr; - } - } else { + } + } else { - entry_ptr = NULL; + entry_ptr = NULL; - } + } - entries_examined++; + entries_examined++; - if ( cache_ptr->index_size >= cache_ptr->max_cache_size ) { + if ( cache_ptr->index_size >= cache_ptr->max_cache_size ) { - empty_space = 0; + empty_space = 0; - } else { + } else { - empty_space = cache_ptr->max_cache_size - cache_ptr->index_size; + empty_space = cache_ptr->max_cache_size - cache_ptr->index_size; - } + } - HDassert( cache_ptr->index_size == - (cache_ptr->clean_index_size + - cache_ptr->dirty_index_size) ); + HDassert( cache_ptr->index_size == + (cache_ptr->clean_index_size + + cache_ptr->dirty_index_size) ); - } + } #if H5C_COLLECT_CACHE_STATS cache_ptr->calls_to_msic++; @@ -8050,19 +8050,19 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted) #endif /* H5C_COLLECT_CACHE_STATS */ - /* NEED: work on a better assert for corked entries */ - HDassert( ( entries_examined > (2 * initial_list_len) ) || - ( (cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) > - cache_ptr->max_cache_size ) || - ( ( cache_ptr->clean_index_size + empty_space ) - >= cache_ptr->min_clean_size ) || - ( ( num_corked_entries ))); + /* NEED: work on a better assert for corked entries */ + HDassert( ( entries_examined > (2 * initial_list_len) ) || + ( (cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) > + cache_ptr->max_cache_size ) || + ( ( cache_ptr->clean_index_size + empty_space ) + >= cache_ptr->min_clean_size ) || + ( ( num_corked_entries ))); #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS HDassert( ( entries_examined > (2 * initial_list_len) ) || - ( cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size ) ); + ( cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size ) ); HDassert( ( entries_examined > (2 * initial_list_len) ) || - ( cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size ) ); + ( cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size ) ); #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ @@ -8102,14 +8102,14 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted) } /* end if */ - /* we are scanning the clean LRU, so the serialize function - * will not be called on any entry -- thus there is no - * concern about the list being modified out from under - * this function. - */ + /* we are scanning the clean LRU, so the serialize function + * will not be called on any entry -- thus there is no + * concern about the list being modified out from under + * this function. + */ entry_ptr = prev_ptr; - entries_examined++; + entries_examined++; } #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ } @@ -8124,16 +8124,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__make_space_in_cache() */ - + /*------------------------------------------------------------------------- * * Function: H5C__validate_lru_list * * Purpose: Debugging function that scans the LRU list for errors. * - * If an error is detected, the function generates a - * diagnostic and returns FAIL. If no error is detected, - * the function returns SUCCEED. + * If an error is detected, the function generates a + * diagnostic and returns FAIL. If no error is detected, + * the function returns SUCCEED. * * Return: FAIL if error is detected, SUCCEED otherwise. * @@ -8147,8 +8147,8 @@ H5C__validate_lru_list(H5C_t * cache_ptr) { int32_t len = 0; size_t size = 0; - H5C_cache_entry_t * entry_ptr = NULL; - herr_t ret_value = SUCCEED; /* Return value */ + H5C_cache_entry_t * entry_ptr = NULL; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -8202,7 +8202,7 @@ done: } /* H5C__validate_lru_list() */ #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - + /*------------------------------------------------------------------------- * * Function: H5C__validate_pinned_entry_list @@ -8210,9 +8210,9 @@ done: * Purpose: Debugging function that scans the pinned entry list for * errors. * - * If an error is detected, the function generates a - * diagnostic and returns FAIL. If no error is detected, - * the function returns SUCCEED. + * If an error is detected, the function generates a + * diagnostic and returns FAIL. If no error is detected, + * the function returns SUCCEED. * * Return: FAIL if error is detected, SUCCEED otherwise. * @@ -8226,8 +8226,8 @@ H5C__validate_pinned_entry_list(H5C_t * cache_ptr) { int32_t len = 0; size_t size = 0; - H5C_cache_entry_t * entry_ptr = NULL; - herr_t ret_value = SUCCEED; /* Return value */ + H5C_cache_entry_t * entry_ptr = NULL; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -8286,7 +8286,7 @@ done: } /* H5C__validate_pinned_entry_list() */ #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - + /*------------------------------------------------------------------------- * * Function: H5C__validate_protected_entry_list @@ -8294,9 +8294,9 @@ done: * Purpose: Debugging function that scans the protected entry list for * errors. * - * If an error is detected, the function generates a - * diagnostic and returns FAIL. If no error is detected, - * the function returns SUCCEED. + * If an error is detected, the function generates a + * diagnostic and returns FAIL. If no error is detected, + * the function returns SUCCEED. * * Return: FAIL if error is detected, SUCCEED otherwise. * @@ -8310,8 +8310,8 @@ H5C__validate_protected_entry_list(H5C_t * cache_ptr) { int32_t len = 0; size_t size = 0; - H5C_cache_entry_t * entry_ptr = NULL; - herr_t ret_value = SUCCEED; /* Return value */ + H5C_cache_entry_t * entry_ptr = NULL; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -8370,17 +8370,17 @@ done: } /* H5C__validate_protected_entry_list() */ #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - + /*------------------------------------------------------------------------- * * Function: H5C__entry_in_skip_list * * Purpose: Debugging function that scans skip list to see if it - * is in present. We need this, as it is possible for - * an entry to be in the skip list twice. + * is in present. We need this, as it is possible for + * an entry to be in the skip list twice. * * Return: FALSE if the entry is not in the skip list, and TRUE - * if it is. + * if it is. * * Programmer: John Mainzer, 11/1/14 * @@ -8404,22 +8404,22 @@ H5C__entry_in_skip_list(H5C_t * cache_ptr, H5C_cache_entry_t *target_ptr) entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); - HDassert(entry_ptr); - HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(entry_ptr); + HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); HDassert(entry_ptr->is_dirty); HDassert(entry_ptr->in_slist); if(entry_ptr == target_ptr) - in_slist = TRUE; - else - node_ptr = H5SL_next(node_ptr); + in_slist = TRUE; + else + node_ptr = H5SL_next(node_ptr); } return(in_slist); } /* H5C__entry_in_skip_list() */ #endif /* H5C_DO_SLIST_SANITY_CHECKS */ - + /*------------------------------------------------------------------------- * * Function: H5C__flush_marked_entries @@ -8431,11 +8431,11 @@ H5C__entry_in_skip_list(H5C_t * cache_ptr, H5C_cache_entry_t *target_ptr) * Programmer: Mike McGreevy * November 3, 2010 * - * Changes: Modified function to setup the slist before calling + * Changes: Modified function to setup the slist before calling * H%C_flush_cache(), and take it down afterwards. Note - * that the slist need not be empty after the call to - * H5C_flush_cache() since we are only flushing marked - * entries. Thus must set the clear_slist parameter + * that the slist need not be empty after the call to + * H5C_flush_cache() since we are only flushing marked + * entries. Thus must set the clear_slist parameter * of H5C_set_slist_enabled to TRUE. * * JRM -- 5/6/20 @@ -8461,13 +8461,13 @@ H5C__flush_marked_entries(H5F_t * f) /* Flush all marked entries */ - if ( H5C_flush_cache(f, H5C__FLUSH_MARKED_ENTRIES_FLAG | + if ( H5C_flush_cache(f, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache") /* Disable the slist. Set the clear_slist parameter to TRUE - * since we called H5C_flush_cache() with the + * since we called H5C_flush_cache() with the * H5C__FLUSH_MARKED_ENTRIES_FLAG. */ if ( H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0 ) @@ -8480,34 +8480,34 @@ done: } /* H5C__flush_marked_entries */ - + /*------------------------------------------------------------------------- * * Function: H5C_cork * * Purpose: To cork/uncork/get cork status of an object depending on "action": - * H5C__SET_CORK: - * To cork the object - * Return error if the object is already corked - * H5C__UNCORK: - * To uncork the obejct - * Return error if the object is not corked - * H5C__GET_CORKED: - * To retrieve the cork status of an object in - * the parameter "corked" + * H5C__SET_CORK: + * To cork the object + * Return error if the object is already corked + * H5C__UNCORK: + * To uncork the obejct + * Return error if the object is not corked + * H5C__GET_CORKED: + * To retrieve the cork status of an object in + * the parameter "corked" * * Return: Success: Non-negative * Failure: Negative * * Programmer: Vailin Choi - * January 2014 + * January 2014 * *------------------------------------------------------------------------- */ herr_t H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked) { - H5C_tag_info_t *tag_info; /* Points to a tag info struct */ + H5C_tag_info_t *tag_info; /* Points to a tag info struct */ herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI_NOINIT @@ -8590,7 +8590,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_cork() */ - + /*------------------------------------------------------------------------- * Function: H5C__mark_flush_dep_dirty() * @@ -8619,11 +8619,11 @@ H5C__mark_flush_dep_dirty(H5C_cache_entry_t * entry) /* Iterate over the parent entries, if any */ for(u = 0; u < entry->flush_dep_nparents; u++) { - /* Sanity check */ - HDassert(entry->flush_dep_parent[u]->flush_dep_ndirty_children < entry->flush_dep_parent[u]->flush_dep_nchildren); + /* Sanity check */ + HDassert(entry->flush_dep_parent[u]->flush_dep_ndirty_children < entry->flush_dep_parent[u]->flush_dep_nchildren); - /* Adjust the parent's number of dirty children */ - entry->flush_dep_parent[u]->flush_dep_ndirty_children++; + /* Adjust the parent's number of dirty children */ + entry->flush_dep_parent[u]->flush_dep_ndirty_children++; /* If the parent has a 'notify' callback, send a 'child entry dirtied' notice */ if(entry->flush_dep_parent[u]->type->notify && @@ -8635,7 +8635,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__mark_flush_dep_dirty() */ - + /*------------------------------------------------------------------------- * Function: H5C__mark_flush_dep_clean() * @@ -8667,11 +8667,11 @@ H5C__mark_flush_dep_clean(H5C_cache_entry_t * entry) * dependency - QAK, 2017/08/12 */ for(i = ((int)entry->flush_dep_nparents) - 1; i >= 0; i--) { - /* Sanity check */ - HDassert(entry->flush_dep_parent[i]->flush_dep_ndirty_children > 0); + /* Sanity check */ + HDassert(entry->flush_dep_parent[i]->flush_dep_ndirty_children > 0); - /* Adjust the parent's number of dirty children */ - entry->flush_dep_parent[i]->flush_dep_ndirty_children--; + /* Adjust the parent's number of dirty children */ + entry->flush_dep_parent[i]->flush_dep_ndirty_children--; /* If the parent has a 'notify' callback, send a 'child entry cleaned' notice */ if(entry->flush_dep_parent[i]->type->notify && @@ -8683,13 +8683,13 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__mark_flush_dep_clean() */ - + /*------------------------------------------------------------------------- * Function: H5C__mark_flush_dep_serialized() * * Purpose: Decrement the flush_dep_nunser_children fields of all the - * target entry's flush dependency parents in response to - * the target entry becoming serialized. + * target entry's flush dependency parents in response to + * the target entry becoming serialized. * * Return: Non-negative on success/Negative on failure * @@ -8714,7 +8714,7 @@ H5C__mark_flush_dep_serialized(H5C_cache_entry_t * entry_ptr) * dependency - QAK, 2017/08/12 */ for(i = ((int)entry_ptr->flush_dep_nparents) - 1; i >= 0; i--) { - /* Sanity checks */ + /* Sanity checks */ HDassert(entry_ptr->flush_dep_parent); HDassert(entry_ptr->flush_dep_parent[i]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); HDassert(entry_ptr->flush_dep_parent[i]->flush_dep_nunser_children > 0); @@ -8732,7 +8732,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__mark_flush_dep_serialized() */ - + /*------------------------------------------------------------------------- * Function: H5C__mark_flush_dep_unserialized() * @@ -8779,7 +8779,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__mark_flush_dep_unserialized() */ - + #ifndef NDEBUG /*------------------------------------------------------------------------- * Function: H5C__assert_flush_dep_nocycle() @@ -8813,46 +8813,46 @@ H5C__assert_flush_dep_nocycle(const H5C_cache_entry_t * entry, /* Iterate over entry's parents (if any) */ for(u = 0; u < entry->flush_dep_nparents; u++) - H5C__assert_flush_dep_nocycle(entry->flush_dep_parent[u], base_entry); + H5C__assert_flush_dep_nocycle(entry->flush_dep_parent[u], base_entry); FUNC_LEAVE_NOAPI_VOID } /* H5C__assert_flush_dep_nocycle() */ #endif /* NDEBUG */ - + /*------------------------------------------------------------------------- * Function: H5C__serialize_cache * - * Purpose: Serialize (i.e. construct an on disk image) for all entries - * in the metadata cache including clean entries. + * Purpose: Serialize (i.e. construct an on disk image) for all entries + * in the metadata cache including clean entries. * - * Note that flush dependencies and "flush me last" flags - * must be observed in the serialization process. + * Note that flush dependencies and "flush me last" flags + * must be observed in the serialization process. * - * Note also that entries may be loaded, flushed, evicted, - * expunged, relocated, resized, or removed from the cache - * during this process, just as these actions may occur during - * a regular flush. + * Note also that entries may be loaded, flushed, evicted, + * expunged, relocated, resized, or removed from the cache + * during this process, just as these actions may occur during + * a regular flush. * - * However, we are given that the cache will contain no protected - * entries on entry to this routine (although entries may be - * briefly protected and then unprotected during the serialize - * process). + * However, we are given that the cache will contain no protected + * entries on entry to this routine (although entries may be + * briefly protected and then unprotected during the serialize + * process). * - * The objective of this routine is serialize all entries and - * to force all entries into their actual locations on disk. + * The objective of this routine is serialize all entries and + * to force all entries into their actual locations on disk. * - * The initial need for this routine is to settle all entries - * in the cache prior to construction of the metadata cache - * image so that the size of the cache image can be calculated. - * However, I gather that other uses for the routine are - * under consideration. + * The initial need for this routine is to settle all entries + * in the cache prior to construction of the metadata cache + * image so that the size of the cache image can be calculated. + * However, I gather that other uses for the routine are + * under consideration. * * Return: Non-negative on success/Negative on failure or if there was - * a request to flush all items and something was protected. + * a request to flush all items and something was protected. * * Programmer: John Mainzer - * 7/22/15 + * 7/22/15 * *------------------------------------------------------------------------- */ @@ -8928,9 +8928,9 @@ H5C__serialize_cache(H5F_t *f) scan_ptr = cache_ptr->il_head; while(scan_ptr != NULL) { - HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - scan_ptr->serialization_count = 0; - scan_ptr = scan_ptr->il_next; + HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + scan_ptr->serialization_count = 0; + scan_ptr = scan_ptr->il_next; } /* end while */ } /* end block */ #endif /* NDEBUG */ @@ -8949,7 +8949,7 @@ H5C__serialize_cache(H5F_t *f) */ ring = H5C_RING_USER; while(ring < H5C_RING_NTYPES) { - HDassert(cache_ptr->close_warning_received); + HDassert(cache_ptr->close_warning_received); switch(ring) { case H5C_RING_USER: break; @@ -8993,10 +8993,10 @@ H5C__serialize_cache(H5F_t *f) scan_ptr = cache_ptr->il_head; while(scan_ptr != NULL) { - HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - HDassert(scan_ptr->serialization_count <= 1); + HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(scan_ptr->serialization_count <= 1); - scan_ptr = scan_ptr->il_next; + scan_ptr = scan_ptr->il_next; } /* end while */ } /* end block */ #endif /* NDEBUG */ @@ -9006,7 +9006,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__serialize_cache() */ - + /*------------------------------------------------------------------------- * Function: H5C__serialize_ring * @@ -9017,16 +9017,16 @@ done: * If the cache contains protected entries in the specified * ring, the function will fail, as protected entries cannot * be serialized. However all unprotected entries in the - * target ring should be serialized before the function - * returns failure. + * target ring should be serialized before the function + * returns failure. * * If flush dependencies appear in the target ring, the * function makes repeated passes through the index list - * serializing entries in flush dependency order. + * serializing entries in flush dependency order. * - * All entries outside the H5C_RING_SBE are marked for - * inclusion in the cache image. Entries in H5C_RING_SBE - * and below are marked for exclusion from the image. + * All entries outside the H5C_RING_SBE are marked for + * inclusion in the cache image. Entries in H5C_RING_SBE + * and below are marked for exclusion from the image. * * Return: Non-negative on success/Negative on failure or if there was * a request to flush all items and something was protected. @@ -9039,7 +9039,7 @@ done: static herr_t H5C__serialize_ring(H5F_t *f, H5C_ring_t ring) { - hbool_t done = FALSE; + hbool_t done = FALSE; H5C_t * cache_ptr; H5C_cache_entry_t * entry_ptr; herr_t ret_value = SUCCEED; @@ -9138,45 +9138,45 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring) * and serialize callbacks. */ cache_ptr->entries_loaded_counter = 0; - cache_ptr->entries_inserted_counter = 0; + cache_ptr->entries_inserted_counter = 0; cache_ptr->entries_relocated_counter = 0; - done = TRUE; /* set to FALSE if any activity in inner loop */ - entry_ptr = cache_ptr->il_head; - while(entry_ptr != NULL) { - HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + done = TRUE; /* set to FALSE if any activity in inner loop */ + entry_ptr = cache_ptr->il_head; + while(entry_ptr != NULL) { + HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - /* Verify that either the entry is already serialized, or + /* Verify that either the entry is already serialized, or * that it is assigned to either the target or an inner * ring. */ HDassert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date)); - /* Skip flush me last entries or inner ring entries */ - if(!entry_ptr->flush_me_last && entry_ptr->ring == ring) { + /* Skip flush me last entries or inner ring entries */ + if(!entry_ptr->flush_me_last && entry_ptr->ring == ring) { - /* if we encounter an unserialized entry in the current + /* if we encounter an unserialized entry in the current * ring that is not marked flush me last, we are not done. */ - if(!entry_ptr->image_up_to_date) - done = FALSE; + if(!entry_ptr->image_up_to_date) + done = FALSE; - /* Serialize the entry if its image is not up to date + /* Serialize the entry if its image is not up to date * and it has no unserialized flush dependency children. */ - if(!entry_ptr->image_up_to_date && entry_ptr->flush_dep_nunser_children == 0) { - HDassert(entry_ptr->serialization_count == 0); + if(!entry_ptr->image_up_to_date && entry_ptr->flush_dep_nunser_children == 0) { + HDassert(entry_ptr->serialization_count == 0); - /* Serialize the entry */ - if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed") + /* Serialize the entry */ + if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed") HDassert(entry_ptr->flush_dep_nunser_children == 0); - HDassert(entry_ptr->serialization_count == 0); + HDassert(entry_ptr->serialization_count == 0); #ifndef NDEBUG /* Increment serialization counter (to detect multiple serializations) */ - entry_ptr->serialization_count++; + entry_ptr->serialization_count++; #endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -9192,7 +9192,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring) /* Reset the counters */ cache_ptr->entries_loaded_counter = 0; - cache_ptr->entries_inserted_counter = 0; + cache_ptr->entries_inserted_counter = 0; cache_ptr->entries_relocated_counter = 0; /* Restart scan */ @@ -9200,8 +9200,8 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring) } /* end if */ else /* Advance to next entry */ - entry_ptr = entry_ptr->il_next; - } /* while ( entry_ptr != NULL ) */ + entry_ptr = entry_ptr->il_next; + } /* while ( entry_ptr != NULL ) */ } /* while ( ! done ) */ @@ -9210,7 +9210,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring) * and serialize callbacks. */ cache_ptr->entries_loaded_counter = 0; - cache_ptr->entries_inserted_counter = 0; + cache_ptr->entries_inserted_counter = 0; cache_ptr->entries_relocated_counter = 0; /* At this point, all entries not marked "flush me last" and in @@ -9221,43 +9221,43 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring) */ entry_ptr = cache_ptr->il_head; while(entry_ptr != NULL) { - HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - HDassert(entry_ptr->ring > H5C_RING_UNDEFINED); + HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(entry_ptr->ring > H5C_RING_UNDEFINED); HDassert(entry_ptr->ring < H5C_RING_NTYPES); HDassert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date)); - if(entry_ptr->ring == ring) { - if(entry_ptr->flush_me_last) { - if(!entry_ptr->image_up_to_date) { - HDassert(entry_ptr->serialization_count == 0); + if(entry_ptr->ring == ring) { + if(entry_ptr->flush_me_last) { + if(!entry_ptr->image_up_to_date) { + HDassert(entry_ptr->serialization_count == 0); HDassert(entry_ptr->flush_dep_nunser_children == 0); - /* Serialize the entry */ - if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed") + /* Serialize the entry */ + if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed") /* Check for the cache changing */ if((cache_ptr->entries_loaded_counter > 0) || (cache_ptr->entries_inserted_counter > 0) || (cache_ptr->entries_relocated_counter > 0)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "flush_me_last entry serialization triggered restart") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "flush_me_last entry serialization triggered restart") HDassert(entry_ptr->flush_dep_nunser_children == 0); - HDassert(entry_ptr->serialization_count == 0); + HDassert(entry_ptr->serialization_count == 0); #ifndef NDEBUG /* Increment serialization counter (to detect multiple serializations) */ - entry_ptr->serialization_count++; + entry_ptr->serialization_count++; #endif /* NDEBUG */ } /* end if */ } /* end if */ else { - HDassert(entry_ptr->image_up_to_date); - HDassert(entry_ptr->serialization_count <= 1); + HDassert(entry_ptr->image_up_to_date); + HDassert(entry_ptr->serialization_count <= 1); HDassert(entry_ptr->flush_dep_nunser_children == 0); } /* end else */ } /* if ( entry_ptr->ring == ring ) */ - entry_ptr = entry_ptr->il_next; + entry_ptr = entry_ptr->il_next; } /* while ( entry_ptr != NULL ) */ done: @@ -9265,12 +9265,12 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__serialize_ring() */ - + /*------------------------------------------------------------------------- * Function: H5C__serialize_single_entry * * Purpose: Serialize the cache entry pointed to by the entry_ptr - * parameter. + * parameter. * * Return: Non-negative on success/Negative on failure * @@ -9281,7 +9281,7 @@ done: static herr_t H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -9327,7 +9327,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__serialize_single_entry() */ - + /*------------------------------------------------------------------------- * Function: H5C__generate_image * @@ -9347,7 +9347,7 @@ done: * Programmer: Mohamad Chaarawi * 2/10/16 * - * Changes: Updated sanity checks for the possibility that the skip + * Changes: Updated sanity checks for the possibility that the skip * list is disabled. * JRM 5/16/20 * @@ -9381,8 +9381,8 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) /* Call client's pre-serialize callback, if there's one */ if ( ( entry_ptr->type->pre_serialize ) && ( (entry_ptr->type->pre_serialize)(f, (void *)entry_ptr, - entry_ptr->addr, entry_ptr->size, - &new_addr, &new_len, + entry_ptr->addr, entry_ptr->size, + &new_addr, &new_len, &serialize_flags) < 0 ) ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ @@ -9392,7 +9392,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) if ( serialize_flags != H5C__SERIALIZE_NO_FLAGS_SET ) { /* Check for unexpected flags from serialize callback */ - if ( serialize_flags & ~(H5C__SERIALIZE_RESIZED_FLAG | + if ( serialize_flags & ~(H5C__SERIALIZE_RESIZED_FLAG | H5C__SERIALIZE_MOVED_FLAG) ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ @@ -9432,7 +9432,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) #endif /* If required, resize the buffer and update the entry and the cache - * data structures + * data structures */ if ( serialize_flags & H5C__SERIALIZE_RESIZED_FLAG ) { @@ -9440,15 +9440,15 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) HDassert(new_len > 0); /* Allocate a new image buffer */ - if ( NULL == (entry_ptr->image_ptr = - H5MM_realloc(entry_ptr->image_ptr, + if ( NULL == (entry_ptr->image_ptr = + H5MM_realloc(entry_ptr->image_ptr, new_len + H5C_IMAGE_EXTRA_SPACE)) ) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, \ "memory allocation failed for on disk image buffer") #if H5C_DO_MEMORY_SANITY_CHECKS - H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + new_len, + H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + new_len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); #endif /* H5C_DO_MEMORY_SANITY_CHECKS */ @@ -9469,8 +9469,8 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) /* As we haven't updated the cache data structures for * for the flush or flush destroy yet, the entry should - * be in the slist if the slist is enabled. Since - * H5C__UPDATE_SLIST_FOR_SIZE_CHANGE() is a no-op if the + * be in the slist if the slist is enabled. Since + * H5C__UPDATE_SLIST_FOR_SIZE_CHANGE() is a no-op if the * slist is enabled, call it un-conditionally. */ HDassert(entry_ptr->is_dirty); @@ -9515,7 +9515,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) } /* end if(serialize_flags != H5C__SERIALIZE_NO_FLAGS_SET) */ /* Serialize object into buffer */ - if ( entry_ptr->type->serialize(f, entry_ptr->image_ptr, entry_ptr->size, + if ( entry_ptr->type->serialize(f, entry_ptr->image_ptr, entry_ptr->size, (void *)entry_ptr) < 0 ) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to serialize entry") @@ -9547,13 +9547,13 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__generate_image */ - + /*------------------------------------------------------------------------- * * Function: H5C_remove_entry * * Purpose: Remove an entry from the cache. Must be not protected, pinned, - * dirty, involved in flush dependencies, etc. + * dirty, involved in flush dependencies, etc. * * Return: Non-negative on success/Negative on failure * @@ -9617,10 +9617,10 @@ H5C_remove_entry(void *_entry) /* Update the cache internal data structures as appropriate for a destroy. * Specifically: - * 1) Delete it from the index - * 2) Delete it from the collective read access list - * 3) Update the replacement policy for eviction - * 4) Remove it from the tag list for this object + * 1) Delete it from the index + * 2) Delete it from the collective read access list + * 3) Update the replacement policy for eviction + * 4) Remove it from the tag list for this object */ H5C__DELETE_FROM_INDEX(cache, entry, FAIL) diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 1226aa6..e7b50ba 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -17,13 +17,13 @@ * Purpose: This file contains declarations which are normally visible * only within the H5C package. * - * Source files outside the H5C package should include - * H5Cprivate.h instead. + * Source files outside the H5C package should include + * H5Cprivate.h instead. * - * The one exception to this rule is test/cache.c. The test - * code is easier to write if it can look at the cache's - * internal data structures. Indeed, this is the main - * reason why this file was created. + * The one exception to this rule is test/cache.c. The test + * code is easier to write if it can look at the cache's + * internal data structures. Indeed, this is the main + * reason why this file was created. */ #if !(defined H5C_FRIEND || defined H5C_MODULE) @@ -50,7 +50,7 @@ /* Cache configuration settings */ #define H5C__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */ -#define H5C__H5C_T_MAGIC 0x005CAC0E +#define H5C__H5C_T_MAGIC 0x005CAC0E /* Initial allocated size of the "flush_dep_parent" array */ @@ -81,7 +81,7 @@ * to the HGOTO_ERROR macro, which may not be appropriate in all cases. * If so, we will need versions of the insertion and deletion macros which * do not reference the sanity checking macros. - * JRM - 5/5/04 + * JRM - 5/5/04 * * Changes: * @@ -156,19 +156,20 @@ * sanity checking macros. These macro are used to update the size of * a DLL when one of its entries changes size. * - * JRM - 9/8/05 + * JRM - 9/8/05 * * - Added macros supporting the index list -- a doubly liked list of * all entries in the index. This list is necessary to reduce the * cost of visiting all entries in the cache, which was previously * done via a scan of the hash table. * - * JRM - 10/15/15 + * JRM - 10/15/15 * ****************************************************************************/ #if H5C_DO_SANITY_CHECKS +/* clang-format off */ #define H5C__DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \ if ( ( (head_ptr) == NULL ) || \ ( (tail_ptr) == NULL ) || \ @@ -246,6 +247,7 @@ if ( ( (new_size) > (dll_size) ) || \ ( ( (dll_len) == 1 ) && ( (new_size) != (dll_size) ) ) ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "DLL post size update SC failed") \ } +/* clang-format on */ #else /* H5C_DO_SANITY_CHECKS */ @@ -334,6 +336,7 @@ if ( ( (new_size) > (dll_size) ) || \ #if H5C_DO_SANITY_CHECKS +/* clang-format off */ #define H5C__AUX_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \ if ( ( (hd_ptr) == NULL ) || \ ( (tail_ptr) == NULL ) || \ @@ -395,6 +398,7 @@ if ( ( (entry_ptr) == NULL ) || \ ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "AUX DLL pre insert SC failed") \ } +/* clang-format on */ #else /* H5C_DO_SANITY_CHECKS */ @@ -471,6 +475,7 @@ if ( ( (entry_ptr) == NULL ) || \ #if H5C_DO_SANITY_CHECKS +/* clang-format off */ #define H5C__IL_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \ if ( ( (hd_ptr) == NULL ) || \ ( (tail_ptr) == NULL ) || \ @@ -533,6 +538,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ HDassert(0 && "IL DLL sanity check failed"); \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "IL DLL sanity check failed") \ } +/* clang-format on */ #else /* H5C_DO_SANITY_CHECKS */ @@ -591,7 +597,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ H5C__IL_DLL_SC(head_ptr, tail_ptr, len, Size, fv) \ } /* H5C__IL_DLL_REMOVE() */ - + /*********************************************************************** * * Stats collection macros @@ -613,6 +619,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ #if H5C_COLLECT_CACHE_STATS +/* clang-format off */ #define H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \ (cache_ptr)->max_index_size = (cache_ptr)->index_size; \ @@ -624,70 +631,71 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ (cache_ptr)->max_dirty_index_size ) \ (cache_ptr)->max_dirty_index_size = \ (cache_ptr)->dirty_index_size; +/* clang-format on */ #define H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr) \ - (((cache_ptr)->dirty_pins)[(entry_ptr)->type->id])++; + (((cache_ptr)->dirty_pins)[(entry_ptr)->type->id])++; #define H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) \ if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \ - (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \ + (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \ if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ - (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ - if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ - (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ - if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ - (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; + (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ + if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \ + (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \ + if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \ + (cache_ptr)->max_pel_size = (cache_ptr)->pel_size; #define H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr) \ - if ( cache_ptr->flush_in_progress ) \ + if ( cache_ptr->flush_in_progress ) \ ((cache_ptr)->cache_flush_moves[(entry_ptr)->type->id])++; \ if ( entry_ptr->flush_in_progress ) \ ((cache_ptr)->entry_flush_moves[(entry_ptr)->type->id])++; \ - (((cache_ptr)->moves)[(entry_ptr)->type->id])++; \ + (((cache_ptr)->moves)[(entry_ptr)->type->id])++; \ (cache_ptr)->entries_relocated_counter++; #define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)\ - if ( cache_ptr->flush_in_progress ) \ + if ( cache_ptr->flush_in_progress ) \ ((cache_ptr)->cache_flush_size_changes[(entry_ptr)->type->id])++; \ if ( entry_ptr->flush_in_progress ) \ ((cache_ptr)->entry_flush_size_changes[(entry_ptr)->type->id])++; \ - if ( (entry_ptr)->size < (new_size) ) { \ - ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \ + if ( (entry_ptr)->size < (new_size) ) { \ + ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \ H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \ - } else if ( (entry_ptr)->size > (new_size) ) { \ - ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \ - } + } else if ( (entry_ptr)->size > (new_size) ) { \ + ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \ + } #define H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \ - (cache_ptr)->total_ht_insertions++; + (cache_ptr)->total_ht_insertions++; #define H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \ - (cache_ptr)->total_ht_deletions++; + (cache_ptr)->total_ht_deletions++; #define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth) \ - if ( success ) { \ - (cache_ptr)->successful_ht_searches++; \ - (cache_ptr)->total_successful_ht_search_depth += depth; \ - } else { \ - (cache_ptr)->failed_ht_searches++; \ - (cache_ptr)->total_failed_ht_search_depth += depth; \ - } + if ( success ) { \ + (cache_ptr)->successful_ht_searches++; \ + (cache_ptr)->total_successful_ht_search_depth += depth; \ + } else { \ + (cache_ptr)->failed_ht_searches++; \ + (cache_ptr)->total_failed_ht_search_depth += depth; \ + } #define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) \ - ((cache_ptr)->unpins)[(entry_ptr)->type->id]++; + ((cache_ptr)->unpins)[(entry_ptr)->type->id]++; #define H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr) \ - ((cache_ptr)->slist_scan_restarts)++; + ((cache_ptr)->slist_scan_restarts)++; #define H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) \ - ((cache_ptr)->LRU_scan_restarts)++; + ((cache_ptr)->LRU_scan_restarts)++; #define H5C__UPDATE_STATS_FOR_INDEX_SCAN_RESTART(cache_ptr) \ - ((cache_ptr)->index_scan_restarts)++; + ((cache_ptr)->index_scan_restarts)++; #define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_CREATE(cache_ptr) \ { \ @@ -747,6 +755,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ ((entry_ptr)->flushes)++; \ } +/* clang-format off */ #define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, take_ownership) \ { \ if ( take_ownership ) \ @@ -913,6 +922,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \ } +/* clang-format on */ #define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \ { \ @@ -953,7 +963,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ #endif /* H5C_COLLECT_CACHE_STATS */ - + /*********************************************************************** * * Hash table access and manipulation macros: @@ -970,13 +980,13 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ * the clean_index_size and dirty_index_size fields of H5C_t. Also * added macros to allow us to track entry cleans and dirties. * - * JRM -- 11/5/08 + * JRM -- 11/5/08 * * - Updated existing index macros and sanity check macros to maintain * the index_ring_len, index_ring_size, clean_index_ring_size, and * dirty_index_ring_size fields of H5C_t. * - * JRM -- 9/1/15 + * JRM -- 9/1/15 * * - Updated existing index macros and sanity checks macros to * maintain an doubly linked list of all entries in the index. @@ -990,12 +1000,13 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \ /* H5C__HASH_TABLE_LEN is defined in H5Cpkg.h. It mut be a power of two. */ -#define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3) +#define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3) -#define H5C__HASH_FCN(x) (int)((unsigned)((x) & H5C__HASH_MASK) >> 3) +#define H5C__HASH_FCN(x) (int)((unsigned)((x) & H5C__HASH_MASK) >> 3) #if H5C_DO_SANITY_CHECKS +/* clang-format off */ #define H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ @@ -1008,7 +1019,7 @@ if ( ( (cache_ptr) == NULL ) || \ ( H5C__HASH_FCN((entry_ptr)->addr) >= H5C__HASH_TABLE_LEN ) || \ ( (cache_ptr)->index_size != \ ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ) || \ + (cache_ptr)->dirty_index_size) ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \ ( (entry_ptr)->ring <= H5C_RING_UNDEFINED ) || \ @@ -1031,7 +1042,7 @@ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ ( (cache_ptr)->index_size != \ ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ) || \ + (cache_ptr)->dirty_index_size) ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \ ( (cache_ptr)->index_ring_len[(entry_ptr)->ring] == 0 ) || \ @@ -1068,7 +1079,7 @@ if ( ( (cache_ptr) == NULL ) || \ ( (entry_ptr)->ht_prev != NULL ) ) || \ ( (cache_ptr)->index_size != \ ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ) || \ + (cache_ptr)->dirty_index_size) ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \ ( (entry_ptr)->ring <= H5C_RING_UNDEFINED ) || \ @@ -1099,7 +1110,7 @@ if ( ( (cache_ptr) == NULL ) || \ ( (entry_ptr)->ht_prev != NULL ) || \ ( (cache_ptr)->index_size != \ ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ) || \ + (cache_ptr)->dirty_index_size) ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \ ( (cache_ptr)->index_ring_len[(entry_ptr)->ring] > \ @@ -1158,7 +1169,7 @@ if ( ( (cache_ptr) == NULL ) || \ } #define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ - entry_ptr, was_clean) \ + entry_ptr, was_clean) \ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->index_len <= 0 ) || \ ( (cache_ptr)->index_size <= 0 ) || \ @@ -1172,9 +1183,9 @@ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \ ( ( !( was_clean ) || \ - ( (cache_ptr)->clean_index_size < (old_size) ) ) && \ - ( ( (was_clean) ) || \ - ( (cache_ptr)->dirty_index_size < (old_size) ) ) ) || \ + ( (cache_ptr)->clean_index_size < (old_size) ) ) && \ + ( ( (was_clean) ) || \ + ( (cache_ptr)->dirty_index_size < (old_size) ) ) ) || \ ( (entry_ptr) == NULL ) || \ ( (entry_ptr)->ring <= H5C_RING_UNDEFINED ) || \ ( (entry_ptr)->ring >= H5C_RING_NTYPES ) || \ @@ -1193,20 +1204,20 @@ if ( ( (cache_ptr) == NULL ) || \ } #define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ - entry_ptr) \ + entry_ptr) \ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->index_len <= 0 ) || \ ( (cache_ptr)->index_size <= 0 ) || \ ( (new_size) > (cache_ptr)->index_size ) || \ ( (cache_ptr)->index_size != \ - ((cache_ptr)->clean_index_size + \ + ((cache_ptr)->clean_index_size + \ (cache_ptr)->dirty_index_size) ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \ ( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \ ( ( !((entry_ptr)->is_dirty ) || \ - ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \ - ( ( ((entry_ptr)->is_dirty) ) || \ - ( (cache_ptr)->clean_index_size < (new_size) ) ) ) || \ + ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \ + ( ( ((entry_ptr)->is_dirty) ) || \ + ( (cache_ptr)->clean_index_size < (new_size) ) ) ) || \ ( ( (cache_ptr)->index_len == 1 ) && \ ( (cache_ptr)->index_size != (new_size) ) ) || \ ( (cache_ptr)->index_ring_len[(entry_ptr)->ring] > \ @@ -1307,6 +1318,7 @@ if ( ( (cache_ptr)->index_size != \ HDassert(FALSE); \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "post HT update for entry dirty SC failed") \ } +/* clang-format on */ #else /* H5C_DO_SANITY_CHECKS */ @@ -1320,15 +1332,16 @@ if ( ( (cache_ptr)->index_size != \ #define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) #define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) #define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ - entry_ptr, was_clean) + entry_ptr, was_clean) #define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ - entry_ptr) + entry_ptr) #define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) #define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) #endif /* H5C_DO_SANITY_CHECKS */ +/* clang-format off */ #define H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, fail_val) \ { \ int k; \ @@ -1462,10 +1475,10 @@ if ( ( (cache_ptr)->index_size != \ H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \ (cache_ptr)->dirty_index_size -= (entry_ptr)->size; \ ((cache_ptr)->dirty_index_ring_size[entry_ptr->ring]) \ - -= (entry_ptr)->size; \ + -= (entry_ptr)->size; \ (cache_ptr)->clean_index_size += (entry_ptr)->size; \ ((cache_ptr)->clean_index_ring_size[entry_ptr->ring]) \ - += (entry_ptr)->size; \ + += (entry_ptr)->size; \ H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \ } @@ -1474,18 +1487,18 @@ if ( ( (cache_ptr)->index_size != \ H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \ (cache_ptr)->clean_index_size -= (entry_ptr)->size; \ ((cache_ptr)->clean_index_ring_size[entry_ptr->ring]) \ - -= (entry_ptr)->size; \ + -= (entry_ptr)->size; \ (cache_ptr)->dirty_index_size += (entry_ptr)->size; \ ((cache_ptr)->dirty_index_ring_size[entry_ptr->ring]) \ - += (entry_ptr)->size; \ + += (entry_ptr)->size; \ H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \ } #define H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size, \ - entry_ptr, was_clean) \ + entry_ptr, was_clean) \ { \ H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ - entry_ptr, was_clean) \ + entry_ptr, was_clean) \ (cache_ptr)->index_size -= (old_size); \ (cache_ptr)->index_size += (new_size); \ ((cache_ptr)->index_ring_size[entry_ptr->ring]) -= (old_size); \ @@ -1494,14 +1507,14 @@ if ( ( (cache_ptr)->index_size != \ (cache_ptr)->clean_index_size -= (old_size); \ ((cache_ptr)->clean_index_ring_size[entry_ptr->ring])-= (old_size); \ } else { \ - (cache_ptr)->dirty_index_size -= (old_size); \ + (cache_ptr)->dirty_index_size -= (old_size); \ ((cache_ptr)->dirty_index_ring_size[entry_ptr->ring])-= (old_size); \ } \ if((entry_ptr)->is_dirty) { \ (cache_ptr)->dirty_index_size += (new_size); \ ((cache_ptr)->dirty_index_ring_size[entry_ptr->ring])+= (new_size); \ } else { \ - (cache_ptr)->clean_index_size += (new_size); \ + (cache_ptr)->clean_index_size += (new_size); \ ((cache_ptr)->clean_index_ring_size[entry_ptr->ring])+= (new_size); \ } \ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->il_len, \ @@ -1510,8 +1523,9 @@ if ( ( (cache_ptr)->index_size != \ H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ entry_ptr) \ } +/* clang-format on */ + - /************************************************************************** * * Skip list insertion and deletion macros: @@ -1523,11 +1537,11 @@ if ( ( (cache_ptr)->index_size != \ /*------------------------------------------------------------------------- * - * Macro: H5C__INSERT_ENTRY_IN_SLIST + * Macro: H5C__INSERT_ENTRY_IN_SLIST * * Purpose: Insert the specified instance of H5C_cache_entry_t into - * the skip list in the specified instance of H5C_t. Update - * the associated length and size fields. + * the skip list in the specified instance of H5C_t. Update + * the associated length and size fields. * * Return: N/A * @@ -1535,66 +1549,66 @@ if ( ( (cache_ptr)->index_size != \ * * Modifications: * - * JRM -- 7/21/04 - * Updated function to set the in_tree flag when inserting - * an entry into the tree. Also modified the function to - * update the tree size and len fields instead of the similar - * index fields. + * JRM -- 7/21/04 + * Updated function to set the in_tree flag when inserting + * an entry into the tree. Also modified the function to + * update the tree size and len fields instead of the similar + * index fields. * - * All of this is part of the modifications to support the - * hash table. + * All of this is part of the modifications to support the + * hash table. * - * JRM -- 7/27/04 - * Converted the function H5C_insert_entry_in_tree() into - * the macro H5C__INSERT_ENTRY_IN_TREE in the hopes of - * wringing a little more speed out of the cache. + * JRM -- 7/27/04 + * Converted the function H5C_insert_entry_in_tree() into + * the macro H5C__INSERT_ENTRY_IN_TREE in the hopes of + * wringing a little more speed out of the cache. * - * Note that we don't bother to check if the entry is already - * in the tree -- if it is, H5SL_insert() will fail. + * Note that we don't bother to check if the entry is already + * in the tree -- if it is, H5SL_insert() will fail. * - * QAK -- 11/27/04 - * Switched over to using skip list routines. + * QAK -- 11/27/04 + * Switched over to using skip list routines. * - * JRM -- 6/27/06 - * Added fail_val parameter. + * JRM -- 6/27/06 + * Added fail_val parameter. * - * JRM -- 8/25/06 - * Added the H5C_DO_SANITY_CHECKS version of the macro. + * JRM -- 8/25/06 + * Added the H5C_DO_SANITY_CHECKS version of the macro. * - * This version maintains the slist_len_increase and - * slist_size_increase fields that are used in sanity - * checks in the flush routines. + * This version maintains the slist_len_increase and + * slist_size_increase fields that are used in sanity + * checks in the flush routines. * - * All this is needed as the fractal heap needs to be - * able to dirty, resize and/or move entries during the - * flush. + * All this is needed as the fractal heap needs to be + * able to dirty, resize and/or move entries during the + * flush. * - * JRM -- 12/13/14 - * Added code to set cache_ptr->slist_changed to TRUE - * when an entry is inserted in the slist. + * JRM -- 12/13/14 + * Added code to set cache_ptr->slist_changed to TRUE + * when an entry is inserted in the slist. * - * JRM -- 9/1/15 - * Added code to maintain the cache_ptr->slist_ring_len - * and cache_ptr->slist_ring_size arrays. + * JRM -- 9/1/15 + * Added code to maintain the cache_ptr->slist_ring_len + * and cache_ptr->slist_ring_size arrays. * * JRM -- 4/29/20 - * Reworked macro to support the slist_enabled field - * of H5C_t. If slist_enabled == TRUE, the macro + * Reworked macro to support the slist_enabled field + * of H5C_t. If slist_enabled == TRUE, the macro * functions as before. Otherwise, the macro is a no-op, * and the slist must be empty. * *------------------------------------------------------------------------- */ -/* NOTE: The H5C__INSERT_ENTRY_IN_SLIST() macro is set up so that - * - * H5C_DO_SANITY_CHECKS +/* NOTE: The H5C__INSERT_ENTRY_IN_SLIST() macro is set up so that * - * and + * H5C_DO_SANITY_CHECKS * - * H5C_DO_SLIST_SANITY_CHECKS + * and * - * can be selected independantly. This is easy to miss as the + * H5C_DO_SLIST_SANITY_CHECKS + * + * can be selected independantly. This is easy to miss as the * two #defines are easy to confuse. */ @@ -1701,7 +1715,7 @@ if ( ( (cache_ptr)->index_size != \ #endif /* H5C_DO_SANITY_CHECKS */ - + /*------------------------------------------------------------------------- * * Function: H5C__REMOVE_ENTRY_FROM_SLIST @@ -1736,8 +1750,8 @@ if ( ( (cache_ptr)->index_size != \ * when an entry is removed from the slist. * * JRM -- 4/29/20 - * Reworked macro to support the slist_enabled field - * of H5C_t. If slist_enabled == TRUE, the macro + * Reworked macro to support the slist_enabled field + * of H5C_t. If slist_enabled == TRUE, the macro * functions as before. Otherwise, the macro is a no-op, * and the slist must be empty. * @@ -1839,7 +1853,7 @@ if ( ( (cache_ptr)->index_size != \ #endif /* H5C_DO_SANITY_CHECKS */ - + /*------------------------------------------------------------------------- * * Function: H5C__UPDATE_SLIST_FOR_SIZE_CHANGE @@ -1873,8 +1887,8 @@ if ( ( (cache_ptr)->index_size != \ * and cache_ptr->slist_ring_size arrays. * * JRM -- 4/29/20 - * Reworked macro to support the slist_enabled field - * of H5C_t. If slist_enabled == TRUE, the macro + * Reworked macro to support the slist_enabled field + * of H5C_t. If slist_enabled == TRUE, the macro * functions as before. Otherwise, the macro is a no-op, * and the slist must be empty. * @@ -1969,7 +1983,7 @@ if ( ( (cache_ptr)->index_size != \ #endif /* H5C_DO_SANITY_CHECKS */ - + /************************************************************************** * * Replacement policy update macros: @@ -1981,18 +1995,18 @@ if ( ( (cache_ptr)->index_size != \ /*------------------------------------------------------------------------- * - * Macro: H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS + * Macro: H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS * * Purpose: For efficiency, we sometimes change the order of flushes -- - * but doing so can confuse the replacement policy. This - * macro exists to allow us to specify an entry as the - * most recently touched so we can repair any such - * confusion. + * but doing so can confuse the replacement policy. This + * macro exists to allow us to specify an entry as the + * most recently touched so we can repair any such + * confusion. * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the macro - * should switch on the current policy and act accordingly. + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the macro + * should switch on the current policy and act accordingly. * * Return: N/A * @@ -2000,15 +2014,15 @@ if ( ( (cache_ptr)->index_size != \ * * Modifications: * - * JRM -- 3/20/06 - * Modified macro to ignore pinned entries. Pinned entries - * do not appear in the data structures maintained by the - * replacement policy code, and thus this macro has nothing - * to do if called for such an entry. + * JRM -- 3/20/06 + * Modified macro to ignore pinned entries. Pinned entries + * do not appear in the data structures maintained by the + * replacement policy code, and thus this macro has nothing + * to do if called for such an entry. * - * JRM -- 3/28/07 - * Added sanity checks using the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. + * JRM -- 3/28/07 + * Added sanity checks using the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. * *------------------------------------------------------------------------- */ @@ -2030,16 +2044,16 @@ if ( ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head.\ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* Use the dirty flag to infer whether the entry is on the clean or \ @@ -2093,16 +2107,16 @@ if ( ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head \ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2111,18 +2125,18 @@ if ( ( (cache_ptr)->index_size != \ #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - + /*------------------------------------------------------------------------- * - * Macro: H5C__UPDATE_RP_FOR_EVICTION + * Macro: H5C__UPDATE_RP_FOR_EVICTION * * Purpose: Update the replacement policy data structures for an - * eviction of the specified cache entry. + * eviction of the specified cache entry. * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. * * Return: Non-negative on success/Negative on failure. * @@ -2130,27 +2144,27 @@ if ( ( (cache_ptr)->index_size != \ * * Modifications: * - * JRM - 7/27/04 - * Converted the function H5C_update_rp_for_eviction() to the - * macro H5C__UPDATE_RP_FOR_EVICTION in an effort to squeeze - * a bit more performance out of the cache. + * JRM - 7/27/04 + * Converted the function H5C_update_rp_for_eviction() to the + * macro H5C__UPDATE_RP_FOR_EVICTION in an effort to squeeze + * a bit more performance out of the cache. * - * At least for the first cut, I am leaving the comments and - * white space in the macro. If they cause difficulties with - * the pre-processor, I'll have to remove them. + * At least for the first cut, I am leaving the comments and + * white space in the macro. If they cause difficulties with + * the pre-processor, I'll have to remove them. * - * JRM - 7/28/04 - * Split macro into two version, one supporting the clean and - * dirty LRU lists, and the other not. Yet another attempt - * at optimization. + * JRM - 7/28/04 + * Split macro into two version, one supporting the clean and + * dirty LRU lists, and the other not. Yet another attempt + * at optimization. * - * JRM - 3/20/06 - * Pinned entries can't be evicted, so this entry should never - * be called on a pinned entry. Added assert to verify this. + * JRM - 3/20/06 + * Pinned entries can't be evicted, so this entry should never + * be called on a pinned entry. Added assert to verify this. * - * JRM -- 3/28/07 - * Added sanity checks for the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. + * JRM -- 3/28/07 + * Added sanity checks for the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. * *------------------------------------------------------------------------- */ @@ -2222,18 +2236,18 @@ if ( ( (cache_ptr)->index_size != \ #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - + /*------------------------------------------------------------------------- * - * Macro: H5C__UPDATE_RP_FOR_FLUSH + * Macro: H5C__UPDATE_RP_FOR_FLUSH * * Purpose: Update the replacement policy data structures for a flush - * of the specified cache entry. + * of the specified cache entry. * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. * * Return: N/A * @@ -2241,29 +2255,29 @@ if ( ( (cache_ptr)->index_size != \ * * Modifications: * - * JRM - 7/27/04 - * Converted the function H5C_update_rp_for_flush() to the - * macro H5C__UPDATE_RP_FOR_FLUSH in an effort to squeeze - * a bit more performance out of the cache. + * JRM - 7/27/04 + * Converted the function H5C_update_rp_for_flush() to the + * macro H5C__UPDATE_RP_FOR_FLUSH in an effort to squeeze + * a bit more performance out of the cache. * - * At least for the first cut, I am leaving the comments and - * white space in the macro. If they cause difficulties with - * pre-processor, I'll have to remove them. + * At least for the first cut, I am leaving the comments and + * white space in the macro. If they cause difficulties with + * pre-processor, I'll have to remove them. * - * JRM - 7/28/04 - * Split macro into two versions, one supporting the clean and - * dirty LRU lists, and the other not. Yet another attempt - * at optimization. + * JRM - 7/28/04 + * Split macro into two versions, one supporting the clean and + * dirty LRU lists, and the other not. Yet another attempt + * at optimization. * - * JRM - 3/20/06 - * While pinned entries can be flushed, they don't reside in - * the replacement policy data structures when unprotected. - * Thus I modified this macro to do nothing if the entry is - * pinned. + * JRM - 3/20/06 + * While pinned entries can be flushed, they don't reside in + * the replacement policy data structures when unprotected. + * Thus I modified this macro to do nothing if the entry is + * pinned. * - * JRM - 3/28/07 - * Added sanity checks based on the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. + * JRM - 3/28/07 + * Added sanity checks based on the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. * *------------------------------------------------------------------------- */ @@ -2285,28 +2299,28 @@ if ( ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the \ - * head. \ - */ \ + * head. \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* since the entry is being flushed or cleared, one would think \ - * that it must be dirty -- but that need not be the case. Use the \ - * dirty flag to infer whether the entry is on the clean or dirty \ - * LRU list, and remove it. Then insert it at the head of the \ - * clean LRU list. \ + * that it must be dirty -- but that need not be the case. Use the \ + * dirty flag to infer whether the entry is on the clean or dirty \ + * LRU list, and remove it. Then insert it at the head of the \ + * clean LRU list. \ * \ * The function presumes that a dirty entry will be either cleared \ - * or flushed shortly, so it is OK if we put a dirty entry on the \ - * clean LRU list. \ + * or flushed shortly, so it is OK if we put a dirty entry on the \ + * clean LRU list. \ */ \ \ if ( (entry_ptr)->is_dirty ) { \ @@ -2347,17 +2361,17 @@ if ( ( (cache_ptr)->index_size != \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the \ - * head. \ - */ \ + * head. \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2366,26 +2380,26 @@ if ( ( (cache_ptr)->index_size != \ #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - + /*------------------------------------------------------------------------- * - * Macro: H5C__UPDATE_RP_FOR_INSERT_APPEND + * Macro: H5C__UPDATE_RP_FOR_INSERT_APPEND * * Purpose: Update the replacement policy data structures for an - * insertion of the specified cache entry. + * insertion of the specified cache entry. * - * Unlike H5C__UPDATE_RP_FOR_INSERTION below, mark the - * new entry as the LEAST recently used entry, not the - * most recently used. + * Unlike H5C__UPDATE_RP_FOR_INSERTION below, mark the + * new entry as the LEAST recently used entry, not the + * most recently used. * - * For now at least, this macro should only be used in - * the reconstruction of the metadata cache from a cache - * image block. + * For now at least, this macro should only be used in + * the reconstruction of the metadata cache from a cache + * image block. * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. * * Return: N/A * @@ -2421,7 +2435,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_APPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* insert the entry at the tail of the clean or dirty LRU list as \ @@ -2462,7 +2476,7 @@ if ( ( (cache_ptr)->index_size != \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ - \ + \ } else { \ \ /* modified LRU specific code */ \ @@ -2471,7 +2485,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_APPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2480,18 +2494,18 @@ if ( ( (cache_ptr)->index_size != \ #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - + /*------------------------------------------------------------------------- * - * Macro: H5C__UPDATE_RP_FOR_INSERTION + * Macro: H5C__UPDATE_RP_FOR_INSERTION * * Purpose: Update the replacement policy data structures for an - * insertion of the specified cache entry. + * insertion of the specified cache entry. * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. * * Return: N/A * @@ -2499,31 +2513,31 @@ if ( ( (cache_ptr)->index_size != \ * * Modifications: * - * JRM - 7/27/04 - * Converted the function H5C_update_rp_for_insertion() to the - * macro H5C__UPDATE_RP_FOR_INSERTION in an effort to squeeze - * a bit more performance out of the cache. + * JRM - 7/27/04 + * Converted the function H5C_update_rp_for_insertion() to the + * macro H5C__UPDATE_RP_FOR_INSERTION in an effort to squeeze + * a bit more performance out of the cache. * - * At least for the first cut, I am leaving the comments and - * white space in the macro. If they cause difficulties with - * pre-processor, I'll have to remove them. + * At least for the first cut, I am leaving the comments and + * white space in the macro. If they cause difficulties with + * pre-processor, I'll have to remove them. * - * JRM - 7/28/04 - * Split macro into two version, one supporting the clean and - * dirty LRU lists, and the other not. Yet another attempt - * at optimization. + * JRM - 7/28/04 + * Split macro into two version, one supporting the clean and + * dirty LRU lists, and the other not. Yet another attempt + * at optimization. * - * JRM - 3/10/06 - * This macro should never be called on a pinned entry. - * Inserted an assert to verify this. + * JRM - 3/10/06 + * This macro should never be called on a pinned entry. + * Inserted an assert to verify this. * - * JRM - 8/9/06 - * Not any more. We must now allow insertion of pinned - * entries. Updated macro to support this. + * JRM - 8/9/06 + * Not any more. We must now allow insertion of pinned + * entries. Updated macro to support this. * - * JRM - 3/28/07 - * Added sanity checks using the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. + * JRM - 3/28/07 + * Added sanity checks using the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. * *------------------------------------------------------------------------- */ @@ -2555,7 +2569,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* insert the entry at the head of the clean or dirty LRU list as \ @@ -2596,7 +2610,7 @@ if ( ( (cache_ptr)->index_size != \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ - \ + \ } else { \ \ /* modified LRU specific code */ \ @@ -2605,7 +2619,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2614,22 +2628,22 @@ if ( ( (cache_ptr)->index_size != \ #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - + /*------------------------------------------------------------------------- * - * Macro: H5C__UPDATE_RP_FOR_PROTECT + * Macro: H5C__UPDATE_RP_FOR_PROTECT * * Purpose: Update the replacement policy data structures for a - * protect of the specified cache entry. + * protect of the specified cache entry. * - * To do this, unlink the specified entry from any data - * structures used by the replacement policy, and add the - * entry to the protected list. + * To do this, unlink the specified entry from any data + * structures used by the replacement policy, and add the + * entry to the protected list. * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. * * Return: N/A * @@ -2637,28 +2651,28 @@ if ( ( (cache_ptr)->index_size != \ * * Modifications: * - * JRM - 7/27/04 - * Converted the function H5C_update_rp_for_protect() to the - * macro H5C__UPDATE_RP_FOR_PROTECT in an effort to squeeze - * a bit more performance out of the cache. + * JRM - 7/27/04 + * Converted the function H5C_update_rp_for_protect() to the + * macro H5C__UPDATE_RP_FOR_PROTECT in an effort to squeeze + * a bit more performance out of the cache. * - * At least for the first cut, I am leaving the comments and - * white space in the macro. If they cause difficulties with - * pre-processor, I'll have to remove them. + * At least for the first cut, I am leaving the comments and + * white space in the macro. If they cause difficulties with + * pre-processor, I'll have to remove them. * - * JRM - 7/28/04 - * Split macro into two version, one supporting the clean and - * dirty LRU lists, and the other not. Yet another attempt - * at optimization. + * JRM - 7/28/04 + * Split macro into two version, one supporting the clean and + * dirty LRU lists, and the other not. Yet another attempt + * at optimization. * - * JRM - 3/17/06 - * Modified macro to attempt to remove pinned entriese from - * the pinned entry list instead of from the data structures - * maintained by the replacement policy. + * JRM - 3/17/06 + * Modified macro to attempt to remove pinned entriese from + * the pinned entry list instead of from the data structures + * maintained by the replacement policy. * - * JRM - 3/28/07 - * Added sanity checks based on the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. + * JRM - 3/28/07 + * Added sanity checks based on the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. * *------------------------------------------------------------------------- */ @@ -2674,12 +2688,12 @@ if ( ( (cache_ptr)->index_size != \ HDassert( !((entry_ptr)->is_read_only) ); \ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ HDassert( (entry_ptr)->size > 0 ); \ - \ + \ if ( (entry_ptr)->is_pinned ) { \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ \ } else { \ @@ -2690,7 +2704,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* Similarly, remove the entry from the clean or dirty LRU list \ @@ -2736,12 +2750,12 @@ if ( ( (cache_ptr)->index_size != \ HDassert( !((entry_ptr)->is_read_only) ); \ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ HDassert( (entry_ptr)->size > 0 ); \ - \ + \ if ( (entry_ptr)->is_pinned ) { \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ \ } else { \ @@ -2752,7 +2766,7 @@ if ( ( (cache_ptr)->index_size != \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ @@ -2770,18 +2784,18 @@ if ( ( (cache_ptr)->index_size != \ #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - + /*------------------------------------------------------------------------- * - * Macro: H5C__UPDATE_RP_FOR_MOVE + * Macro: H5C__UPDATE_RP_FOR_MOVE * * Purpose: Update the replacement policy data structures for a - * move of the specified cache entry. + * move of the specified cache entry. * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. * * Return: N/A * @@ -2792,6 +2806,7 @@ if ( ( (cache_ptr)->index_size != \ #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS +/* clang-format off */ #define H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, fail_val) \ { \ HDassert( (cache_ptr) ); \ @@ -2802,20 +2817,20 @@ if ( ( (cache_ptr)->index_size != \ HDassert( (entry_ptr)->size > 0 ); \ \ if ( ! ( (entry_ptr)->is_pinned ) && ! ( (entry_ptr->is_protected ) ) ) { \ - \ + \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head. \ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* remove the entry from either the clean or dirty LUR list as \ @@ -2824,43 +2839,43 @@ if ( ( (cache_ptr)->index_size != \ if ( was_dirty ) { \ \ H5C__AUX_DLL_REMOVE((entry_ptr), \ - (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, \ - (fail_val)) \ + (fail_val)) \ \ } else { \ \ H5C__AUX_DLL_REMOVE((entry_ptr), \ - (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, \ - (fail_val)) \ + (fail_val)) \ } \ \ /* insert the entry at the head of either the clean or dirty \ - * LRU list as appropriate. \ + * LRU list as appropriate. \ */ \ \ if ( (entry_ptr)->is_dirty ) { \ \ H5C__AUX_DLL_PREPEND((entry_ptr), \ - (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, \ - (fail_val)) \ + (fail_val)) \ \ } else { \ \ H5C__AUX_DLL_PREPEND((entry_ptr), \ - (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, \ - (fail_val)) \ + (fail_val)) \ } \ \ /* End modified LRU specific code. */ \ @@ -2879,47 +2894,48 @@ if ( ( (cache_ptr)->index_size != \ HDassert( (entry_ptr)->size > 0 ); \ \ if ( ! ( (entry_ptr)->is_pinned ) && ! ( (entry_ptr->is_protected ) ) ) { \ - \ + \ /* modified LRU specific code */ \ \ /* remove the entry from the LRU list, and re-insert it at the head. \ - */ \ + */ \ \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ } \ } /* H5C__UPDATE_RP_FOR_MOVE */ +/* clang-format on */ #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - + /*------------------------------------------------------------------------- * - * Macro: H5C__UPDATE_RP_FOR_SIZE_CHANGE + * Macro: H5C__UPDATE_RP_FOR_SIZE_CHANGE * * Purpose: Update the replacement policy data structures for a - * size change of the specified cache entry. + * size change of the specified cache entry. * - * To do this, determine if the entry is pinned. If it is, - * update the size of the pinned entry list. + * To do this, determine if the entry is pinned. If it is, + * update the size of the pinned entry list. * - * If it isn't pinned, the entry must handled by the - * replacement policy. Update the appropriate replacement - * policy data structures. + * If it isn't pinned, the entry must handled by the + * replacement policy. Update the appropriate replacement + * policy data structures. * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. * * Return: N/A * @@ -2927,15 +2943,16 @@ if ( ( (cache_ptr)->index_size != \ * * Modifications: * - * JRM -- 3/28/07 - * Added sanity checks based on the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. + * JRM -- 3/28/07 + * Added sanity checks based on the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. * *------------------------------------------------------------------------- */ #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS +/* clang-format off */ #define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \ { \ HDassert( (cache_ptr) ); \ @@ -2949,49 +2966,49 @@ if ( ( (cache_ptr)->index_size != \ \ if ( (entry_ptr)->coll_access ) { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->coll_list_len, \ - (cache_ptr)->coll_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ - \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->coll_list_len, \ + (cache_ptr)->coll_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ + \ } \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, \ - (entry_ptr)->size, \ - (new_size)); \ - \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, \ + (entry_ptr)->size, \ + (new_size)); \ + \ } else { \ \ /* modified LRU specific code */ \ \ - /* Update the size of the LRU list */ \ + /* Update the size of the LRU list */ \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ /* Similarly, update the size of the clean or dirty LRU list as \ - * appropriate. At present, the entry must be clean, but that \ - * could change. \ + * appropriate. At present, the entry must be clean, but that \ + * could change. \ */ \ \ if ( (entry_ptr)->is_dirty ) { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ } else { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ } \ \ /* End modified LRU specific code. */ \ @@ -3011,48 +3028,49 @@ if ( ( (cache_ptr)->index_size != \ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ HDassert( (entry_ptr)->size > 0 ); \ HDassert( new_size > 0 ); \ - \ + \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ } else { \ \ /* modified LRU specific code */ \ \ - /* Update the size of the LRU list */ \ + /* Update the size of the LRU list */ \ \ - H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, \ - (entry_ptr)->size, \ - (new_size)); \ + H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, \ + (entry_ptr)->size, \ + (new_size)); \ \ /* End modified LRU specific code. */ \ } \ \ } /* H5C__UPDATE_RP_FOR_SIZE_CHANGE */ + /* clang-format on */ #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - + /*------------------------------------------------------------------------- * - * Macro: H5C__UPDATE_RP_FOR_UNPIN + * Macro: H5C__UPDATE_RP_FOR_UNPIN * * Purpose: Update the replacement policy data structures for an - * unpin of the specified cache entry. + * unpin of the specified cache entry. * - * To do this, unlink the specified entry from the protected - * entry list, and re-insert it in the data structures used - * by the current replacement policy. + * To do this, unlink the specified entry from the protected + * entry list, and re-insert it in the data structures used + * by the current replacement policy. * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the macro - * should switch on the current policy and act accordingly. + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the macro + * should switch on the current policy and act accordingly. * * Return: N/A * @@ -3060,15 +3078,16 @@ if ( ( (cache_ptr)->index_size != \ * * Modifications: * - * JRM -- 3/28/07 - * Added sanity checks based on the new is_read_only and - * ro_ref_count fields of struct H5C_cache_entry_t. + * JRM -- 3/28/07 + * Added sanity checks based on the new is_read_only and + * ro_ref_count fields of struct H5C_cache_entry_t. * *------------------------------------------------------------------------- */ #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + /* clang-format off */ #define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ @@ -3155,25 +3174,26 @@ if ( ( (cache_ptr)->index_size != \ /* End modified LRU specific code. */ \ \ } /* H5C__UPDATE_RP_FOR_UNPIN */ + /* clang-format off */ #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - + /*------------------------------------------------------------------------- * - * Macro: H5C__UPDATE_RP_FOR_UNPROTECT + * Macro: H5C__UPDATE_RP_FOR_UNPROTECT * * Purpose: Update the replacement policy data structures for an - * unprotect of the specified cache entry. + * unprotect of the specified cache entry. * - * To do this, unlink the specified entry from the protected - * list, and re-insert it in the data structures used by the - * current replacement policy. + * To do this, unlink the specified entry from the protected + * list, and re-insert it in the data structures used by the + * current replacement policy. * - * At present, we only support the modified LRU policy, so - * this function deals with that case unconditionally. If - * we ever support other replacement policies, the function - * should switch on the current policy and act accordingly. + * At present, we only support the modified LRU policy, so + * this function deals with that case unconditionally. If + * we ever support other replacement policies, the function + * should switch on the current policy and act accordingly. * * Return: N/A * @@ -3181,30 +3201,31 @@ if ( ( (cache_ptr)->index_size != \ * * Modifications: * - * JRM - 7/27/04 - * Converted the function H5C_update_rp_for_unprotect() to - * the macro H5C__UPDATE_RP_FOR_UNPROTECT in an effort to - * squeeze a bit more performance out of the cache. + * JRM - 7/27/04 + * Converted the function H5C_update_rp_for_unprotect() to + * the macro H5C__UPDATE_RP_FOR_UNPROTECT in an effort to + * squeeze a bit more performance out of the cache. * - * At least for the first cut, I am leaving the comments and - * white space in the macro. If they cause difficulties with - * pre-processor, I'll have to remove them. + * At least for the first cut, I am leaving the comments and + * white space in the macro. If they cause difficulties with + * pre-processor, I'll have to remove them. * - * JRM - 7/28/04 - * Split macro into two version, one supporting the clean and - * dirty LRU lists, and the other not. Yet another attempt - * at optimization. + * JRM - 7/28/04 + * Split macro into two version, one supporting the clean and + * dirty LRU lists, and the other not. Yet another attempt + * at optimization. * - * JRM - 3/17/06 - * Modified macro to put pinned entries on the pinned entry - * list instead of inserting them in the data structures - * maintained by the replacement policy. + * JRM - 3/17/06 + * Modified macro to put pinned entries on the pinned entry + * list instead of inserting them in the data structures + * maintained by the replacement policy. * *------------------------------------------------------------------------- */ #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS + /* clang-format off */ #define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ @@ -3300,6 +3321,7 @@ if ( ( (cache_ptr)->index_size != \ /* End modified LRU specific code. */ \ } \ } /* H5C__UPDATE_RP_FOR_UNPROTECT */ + /* clang-format on */ #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ @@ -3307,6 +3329,7 @@ if ( ( (cache_ptr)->index_size != \ #if H5C_DO_SANITY_CHECKS + /* clang-format off */ #define H5C__COLL_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \ if ( ( (hd_ptr) == NULL ) || \ ( (tail_ptr) == NULL ) || \ @@ -3371,6 +3394,7 @@ if ( ( (entry_ptr) == NULL ) || \ HDassert(0 && "COLL DLL pre insert SC failed"); \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "COLL DLL pre insert SC failed") \ } + /* clang-format on */ #else /* H5C_DO_SANITY_CHECKS */ @@ -3447,10 +3471,10 @@ if ( ( (entry_ptr) == NULL ) || \ } \ } /* H5C__COLL_DLL_REMOVE() */ - + /*------------------------------------------------------------------------- * - * Macro: H5C__INSERT_IN_COLL_LIST + * Macro: H5C__INSERT_IN_COLL_LIST * * Purpose: Insert entry into collective entries list * @@ -3461,6 +3485,7 @@ if ( ( (entry_ptr) == NULL ) || \ *------------------------------------------------------------------------- */ + /* clang-format off */ #define H5C__INSERT_IN_COLL_LIST(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ @@ -3476,11 +3501,12 @@ if ( ( (entry_ptr) == NULL ) || \ (fail_val)) \ \ } /* H5C__INSERT_IN_COLL_LIST */ + /* clang-format on */ + - /*------------------------------------------------------------------------- * - * Macro: H5C__REMOVE_FROM_COLL_LIST + * Macro: H5C__REMOVE_FROM_COLL_LIST * * Purpose: Remove entry from collective entries list * @@ -3491,6 +3517,7 @@ if ( ( (entry_ptr) == NULL ) || \ *------------------------------------------------------------------------- */ + /* clang-format off */ #define H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ @@ -3506,11 +3533,12 @@ if ( ( (entry_ptr) == NULL ) || \ (fail_val)) \ \ } /* H5C__REMOVE_FROM_COLL_LIST */ + /* clang-format on */ + - /*------------------------------------------------------------------------- * - * Macro: H5C__MOVE_TO_TOP_IN_COLL_LIST + * Macro: H5C__MOVE_TO_TOP_IN_COLL_LIST * * Purpose: Update entry position in collective entries list * @@ -3521,6 +3549,7 @@ if ( ( (entry_ptr) == NULL ) || \ *------------------------------------------------------------------------- */ + /* clang-format off */ #define H5C__MOVE_TO_TOP_IN_COLL_LIST(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ @@ -3541,6 +3570,7 @@ if ( ( (entry_ptr) == NULL ) || \ (fail_val)) \ \ } /* H5C__MOVE_TO_TOP_IN_COLL_LIST */ + /* clang-format on */ #endif /* H5_HAVE_PARALLEL */ @@ -3563,7 +3593,7 @@ if ( ( (entry_ptr) == NULL ) || \ * * The fields of this structure are discussed individually below: * - * tag: Address (i.e. "tag") of the object header for all the entries + * tag: Address (i.e. "tag") of the object header for all the entries * corresponding to parts of that object. * * head: Head of doubly-linked list of all entries belonging to the tag. @@ -3571,7 +3601,7 @@ if ( ( (entry_ptr) == NULL ) || \ * entry_cnt: Number of entries on linked list of entries for this tag. * * corked: Boolean flag indicating whether entries for this object can be - * evicted. + * evicted. * ****************************************************************************/ typedef struct H5C_tag_info_t { @@ -3613,32 +3643,32 @@ typedef struct H5C_tag_info_t { * Note that index_size and index_len now refer to the total size of * and number of entries in the hash table. * - * JRM - 7/19/04 + * JRM - 7/19/04 * * The TBBT has since been replaced with a skip list. This change * greatly predates this note. * - * JRM - 9/26/05 + * JRM - 9/26/05 * - * magic: Unsigned 32 bit integer always set to H5C__H5C_T_MAGIC. - * This field is used to validate pointers to instances of - * H5C_t. + * magic: Unsigned 32 bit integer always set to H5C__H5C_T_MAGIC. + * This field is used to validate pointers to instances of + * H5C_t. * * flush_in_progress: Boolean flag indicating whether a flush is in - * progress. + * progress. * * log_info: Information used by the MDC logging functionality. * Described in H5Clog.h. * - * aux_ptr: Pointer to void used to allow wrapper code to associate - * its data with an instance of H5C_t. The H5C cache code - * sets this field to NULL, and otherwise leaves it alone. + * aux_ptr: Pointer to void used to allow wrapper code to associate + * its data with an instance of H5C_t. The H5C cache code + * sets this field to NULL, and otherwise leaves it alone. * - * max_type_id: Integer field containing the maximum type id number assigned - * to a type of entry in the cache. All type ids from 0 to - * max_type_id inclusive must be defined. The names of the - * types are stored in the type_name_table discussed below, and - * indexed by the ids. + * max_type_id: Integer field containing the maximum type id number assigned + * to a type of entry in the cache. All type ids from 0 to + * max_type_id inclusive must be defined. The names of the + * types are stored in the type_name_table discussed below, and + * indexed by the ids. * * class_table_ptr: Pointer to an array of H5C_class_t of length * max_type_id + 1. Entry classes for the cache. @@ -3654,19 +3684,19 @@ typedef struct H5C_tag_info_t { * to reduce its size as entries are unprotected. * * b) When running in parallel mode, the cache may not be - * permitted to flush a dirty entry in response to a read. - * If there are no clean entries available to evict, the - * cache will exceed its maximum size. Again the cache + * permitted to flush a dirty entry in response to a read. + * If there are no clean entries available to evict, the + * cache will exceed its maximum size. Again the cache * will attempt to reduce its size to the max_cache_size * limit on the next cache write. * - * c) When an entry increases in size, the cache may exceed - * the max_cache_size limit until the next time the cache - * attempts to load or insert an entry. + * c) When an entry increases in size, the cache may exceed + * the max_cache_size limit until the next time the cache + * attempts to load or insert an entry. * - * d) When the evictions_enabled field is false (see below), - * the cache size will increase without limit until the - * field is set to true. + * d) When the evictions_enabled field is false (see below), + * the cache size will increase without limit until the + * field is set to true. * * min_clean_size: Nominal minimum number of clean bytes in the cache. * The cache attempts to maintain this number of bytes of @@ -3674,7 +3704,7 @@ typedef struct H5C_tag_info_t { * a soft limit. * * close_warning_received: Boolean flag indicating that a file closing - * warning has been received. + * warning has been received. * * * In addition to the call back functions required for each entry, the @@ -3682,19 +3712,19 @@ typedef struct H5C_tag_info_t { * the cache as a whole: * * check_write_permitted: In certain applications, the cache may not - * be allowed to write to disk at certain time. If specified, - * the check_write_permitted function is used to determine if - * a write is permissible at any given point in time. + * be allowed to write to disk at certain time. If specified, + * the check_write_permitted function is used to determine if + * a write is permissible at any given point in time. * - * If no such function is specified (i.e. this field is NULL), - * the cache uses the following write_permitted field to - * determine whether writes are permitted. + * If no such function is specified (i.e. this field is NULL), + * the cache uses the following write_permitted field to + * determine whether writes are permitted. * * write_permitted: If check_write_permitted is NULL, this boolean flag - * indicates whether writes are permitted. + * indicates whether writes are permitted. * - * log_flush: If provided, this function is called whenever a dirty - * entry is flushed to disk. + * log_flush: If provided, this function is called whenever a dirty + * entry is flushed to disk. * * * In cases where memory is plentiful, and performance is an issue, it may @@ -3702,11 +3732,11 @@ typedef struct H5C_tag_info_t { * writes. The following field is used to implement this. * * evictions_enabled: Boolean flag that is initialized to TRUE. When - * this flag is set to FALSE, the metadata cache will not - * attempt to evict entries to make space for newly protected - * entries, and instead the will grow without limit. + * this flag is set to FALSE, the metadata cache will not + * attempt to evict entries to make space for newly protected + * entries, and instead the will grow without limit. * - * Needless to say, this feature must be used with care. + * Needless to say, this feature must be used with care. * * * The cache requires an index to facilitate searching for entries. The @@ -3724,7 +3754,7 @@ typedef struct H5C_tag_info_t { * index, and must have the same length and size as the index proper. * * index_len: Number of entries currently in the hash table used to index - * the cache. + * the cache. * * index_size: Number of bytes of cache entries currently stored in the * hash table used to index the cache. @@ -3736,84 +3766,84 @@ typedef struct H5C_tag_info_t { * of the cache's memory footprint. * * index_ring_len: Array of integer of length H5C_RING_NTYPES used to - * maintain a count of entries in the index by ring. Note - * that the sum of all the cells in this array must equal - * the value stored in index_len above. + * maintain a count of entries in the index by ring. Note + * that the sum of all the cells in this array must equal + * the value stored in index_len above. * * index_ring_size: Array of size_t of length H5C_RING_NTYPES used to - * maintain the sum of the sizes of all entries in the index - * by ring. Note that the sum of all cells in this array must - * equal the value stored in index_size above. + * maintain the sum of the sizes of all entries in the index + * by ring. Note that the sum of all cells in this array must + * equal the value stored in index_size above. * * clean_index_size: Number of bytes of clean entries currently stored in - * the hash table. Note that the index_size field (above) - * is also the sum of the sizes of all entries in the cache. - * Thus we should have the invariant that clean_index_size + - * dirty_index_size == index_size. + * the hash table. Note that the index_size field (above) + * is also the sum of the sizes of all entries in the cache. + * Thus we should have the invariant that clean_index_size + + * dirty_index_size == index_size. * - * WARNING: + * WARNING: * - * The value of the clean_index_size must not be mistaken - * for the current clean size of the cache. Rather, the - * clean size of the cache is the current value of - * clean_index_size plus the amount of empty space (if any) + * The value of the clean_index_size must not be mistaken + * for the current clean size of the cache. Rather, the + * clean size of the cache is the current value of + * clean_index_size plus the amount of empty space (if any) * in the cache. * * clean_index_ring_size: Array of size_t of length H5C_RING_NTYPES used to - * maintain the sum of the sizes of all clean entries in the - * index by ring. Note that the sum of all cells in this array - * must equal the value stored in clean_index_size above. + * maintain the sum of the sizes of all clean entries in the + * index by ring. Note that the sum of all cells in this array + * must equal the value stored in clean_index_size above. * * dirty_index_size: Number of bytes of dirty entries currently stored in - * the hash table. Note that the index_size field (above) - * is also the sum of the sizes of all entries in the cache. - * Thus we should have the invariant that clean_index_size + - * dirty_index_size == index_size. + * the hash table. Note that the index_size field (above) + * is also the sum of the sizes of all entries in the cache. + * Thus we should have the invariant that clean_index_size + + * dirty_index_size == index_size. * * dirty_index_ring_size: Array of size_t of length H5C_RING_NTYPES used to - * maintain the sum of the sizes of all dirty entries in the - * index by ring. Note that the sum of all cells in this array - * must equal the value stored in dirty_index_size above. - * - * index: Array of pointer to H5C_cache_entry_t of size - * H5C__HASH_TABLE_LEN. At present, this value is a power - * of two, not the usual prime number. - * - * I hope that the variable size of cache elements, the large - * hash table size, and the way in which HDF5 allocates space - * will combine to avoid problems with periodicity. If so, we - * can use a trivial hash function (a bit-and and a 3 bit left - * shift) with some small savings. - * - * If not, it will become evident in the statistics. Changing - * to the usual prime number length hash table will require - * changing the H5C__HASH_FCN macro and the deletion of the - * H5C__HASH_MASK #define. No other changes should be required. - * - * il_len: Number of entries on the index list. - * - * This must always be equal to index_len. As such, this - * field is redundant. However, the existing linked list - * management macros expect to maintain a length field, so - * this field exists primarily to avoid adding complexity to - * these macros. - * - * il_size: Number of bytes of cache entries currently stored in the - * index list. - * - * This must always be equal to index_size. As such, this - * field is redundant. However, the existing linked list - * management macros expect to maintain a size field, so - * this field exists primarily to avoid adding complexity to - * these macros. - * - * il_head: Pointer to the head of the doubly linked list of entries in + * maintain the sum of the sizes of all dirty entries in the + * index by ring. Note that the sum of all cells in this array + * must equal the value stored in dirty_index_size above. + * + * index: Array of pointer to H5C_cache_entry_t of size + * H5C__HASH_TABLE_LEN. At present, this value is a power + * of two, not the usual prime number. + * + * I hope that the variable size of cache elements, the large + * hash table size, and the way in which HDF5 allocates space + * will combine to avoid problems with periodicity. If so, we + * can use a trivial hash function (a bit-and and a 3 bit left + * shift) with some small savings. + * + * If not, it will become evident in the statistics. Changing + * to the usual prime number length hash table will require + * changing the H5C__HASH_FCN macro and the deletion of the + * H5C__HASH_MASK #define. No other changes should be required. + * + * il_len: Number of entries on the index list. + * + * This must always be equal to index_len. As such, this + * field is redundant. However, the existing linked list + * management macros expect to maintain a length field, so + * this field exists primarily to avoid adding complexity to + * these macros. + * + * il_size: Number of bytes of cache entries currently stored in the + * index list. + * + * This must always be equal to index_size. As such, this + * field is redundant. However, the existing linked list + * management macros expect to maintain a size field, so + * this field exists primarily to avoid adding complexity to + * these macros. + * + * il_head: Pointer to the head of the doubly linked list of entries in * the index list. Note that cache entries on this list are - * linked by their il_next and il_prev fields. + * linked by their il_next and il_prev fields. * * This field is NULL if the index is empty. * - * il_tail: Pointer to the tail of the doubly linked list of entries in + * il_tail: Pointer to the tail of the doubly linked list of entries in * the index list. Note that cache entries on this list are * linked by their il_next and il_prev fields. * @@ -3830,32 +3860,32 @@ typedef struct H5C_tag_info_t { * * The following fields are maintained to facilitate this. * - * entries_removed_counter: Counter that is incremented each time an - * entry is removed from the cache by any means (eviction, - * expungement, or take ownership at this point in time). - * Functions that perform scans on lists may set this field - * to zero prior to calling H5C__flush_single_entry(). - * Unexpected changes to the counter indicate that an entry - * was removed from the cache as a side effect of the flush. - * - * last_entry_removed_ptr: Pointer to the instance of H5C_cache_entry_t - * which contained the last entry to be removed from the cache, - * or NULL if there either is no such entry, or if a function - * performing a scan of a list has set this field to NULL prior - * to calling H5C__flush_single_entry(). - * - * WARNING!!! This field must NEVER be dereferenced. It is - * maintained to allow functions that perform scans of lists - * to compare this pointer with their pointers to next, thus - * allowing them to avoid unnecessary restarts of scans if the - * pointers don't match, and if entries_removed_counter is - * one. - * - * entry_watched_for_removal: Pointer to an instance of H5C_cache_entry_t + * entries_removed_counter: Counter that is incremented each time an + * entry is removed from the cache by any means (eviction, + * expungement, or take ownership at this point in time). + * Functions that perform scans on lists may set this field + * to zero prior to calling H5C__flush_single_entry(). + * Unexpected changes to the counter indicate that an entry + * was removed from the cache as a side effect of the flush. + * + * last_entry_removed_ptr: Pointer to the instance of H5C_cache_entry_t + * which contained the last entry to be removed from the cache, + * or NULL if there either is no such entry, or if a function + * performing a scan of a list has set this field to NULL prior + * to calling H5C__flush_single_entry(). + * + * WARNING!!! This field must NEVER be dereferenced. It is + * maintained to allow functions that perform scans of lists + * to compare this pointer with their pointers to next, thus + * allowing them to avoid unnecessary restarts of scans if the + * pointers don't match, and if entries_removed_counter is + * one. + * + * entry_watched_for_removal: Pointer to an instance of H5C_cache_entry_t * which contains the 'next' entry for an iteration. Removing * this entry must trigger a rescan of the iteration, so each * entry removed from the cache is compared against this pointer - * and the pointer is reset to NULL if the watched entry is + * and the pointer is reset to NULL if the watched entry is * removed. * (This functions similarly to a "dead man's switch") * @@ -3870,14 +3900,14 @@ typedef struct H5C_tag_info_t { * are flushed. (this has been changed -- dirty entries are now removed from * the skip list as they are flushed. JRM - 10/25/05) * - * Update 4/21/20: + * Update 4/21/20: * - * Profiling indicates that the cost of maintaining the skip list is + * Profiling indicates that the cost of maintaining the skip list is * significant. As it is only used on flush and close, maintaining it * only when needed is an obvious optimization. * * To do this, we add a flag to control maintenanace of the skip list. - * This flag is initially set to FALSE, which disables all operations + * This flag is initially set to FALSE, which disables all operations * on the skip list. * * At the beginning of either flush or close, we scan the index list, @@ -3885,27 +3915,27 @@ typedef struct H5C_tag_info_t { * on skip list by setting above control flag to true. * * At the end of a complete flush, we verify that the skip list is empty, - * and set the control flag back to false, so as to avoid skip list - * maintenance overhead until the next flush or close. + * and set the control flag back to false, so as to avoid skip list + * maintenance overhead until the next flush or close. * * In the case of a partial flush (i.e. flush marked entries), we remove * all remaining entries from the skip list, and then set the control flag - * back to false -- again avoiding skip list maintenance overhead until + * back to false -- again avoiding skip list maintenance overhead until * the next flush or close. * * slist_enabled: Boolean flag used to control operation of the skip - * list. If this filed is FALSE, operations on the + * list. If this filed is FALSE, operations on the * slist are no-ops, and the slist must be empty. If * it is TRUE, operations on the slist proceed as usual, * and all dirty entries in the metadata cache must be * listed in the slist. * * slist_changed: Boolean flag used to indicate whether the contents of - * the slist has changed since the last time this flag was - * reset. This is used in the cache flush code to detect - * conditions in which pre-serialize or serialize callbacks - * have modified the slist -- which obliges us to restart - * the scan of the slist from the beginning. + * the slist has changed since the last time this flag was + * reset. This is used in the cache flush code to detect + * conditions in which pre-serialize or serialize callbacks + * have modified the slist -- which obliges us to restart + * the scan of the slist from the beginning. * * slist_len: Number of entries currently in the skip list * used to maintain a sorted list of dirty entries in the @@ -3916,14 +3946,14 @@ typedef struct H5C_tag_info_t { * dirty entries in the cache. * * slist_ring_len: Array of integer of length H5C_RING_NTYPES used to - * maintain a count of entries in the slist by ring. Note - * that the sum of all the cells in this array must equal - * the value stored in slist_len above. + * maintain a count of entries in the slist by ring. Note + * that the sum of all the cells in this array must equal + * the value stored in slist_len above. * * slist_ring_size: Array of size_t of length H5C_RING_NTYPES used to * maintain the sum of the sizes of all entries in the - * slist by ring. Note that the sum of all cells in this - * array must equal the value stored in slist_size above. + * slist by ring. Note that the sum of all cells in this + * array must equal the value stored in slist_size above. * * slist_ptr: pointer to the instance of H5SL_t used maintain a sorted * list of dirty entries in the cache. This sorted list has @@ -3938,7 +3968,7 @@ typedef struct H5C_tag_info_t { * some optimizations when I get to it. * * num_last_entries: The number of entries in the cache that can only be - * flushed after all other entries in the cache have + * flushed after all other entries in the cache have * been flushed. At this time, this will only ever be * one entry (the superblock), and the code has been * protected with HDasserts to enforce this. This restraint @@ -3947,10 +3977,10 @@ typedef struct H5C_tag_info_t { * explicit tests for that case should be added when said * HDasserts are removed. * - * Update: There are now two possible last entries - * (superblock and file driver info message). This - * number will probably increase as we add superblock - * messages. JRM -- 11/18/14 + * Update: There are now two possible last entries + * (superblock and file driver info message). This + * number will probably increase as we add superblock + * messages. JRM -- 11/18/14 * * With the addition of the fractal heap, the cache must now deal with * the case in which entries may be dirtied, moved, or have their sizes @@ -3959,12 +3989,12 @@ typedef struct H5C_tag_info_t { * H5C_DO_SANITY_CHECKS is TRUE. * * slist_len_increase: Number of entries that have been added to the - * slist since the last time this field was set to zero. - * Note that this value can be negative. + * slist since the last time this field was set to zero. + * Note that this value can be negative. * * slist_size_increase: Total size of all entries that have been added - * to the slist since the last time this field was set to - * zero. Note that this value can be negative. + * to the slist since the last time this field was set to + * zero. Note that this value can be negative. * * Cache entries belonging to a particular object are "tagged" with that * object's base object header address. @@ -3981,7 +4011,7 @@ typedef struct H5C_tag_info_t { * freelist, as well as shared entries like global * heaps and shared object header messages, are not tagged. * - * ignore_tags: Boolean flag to disable tag validation during entry insertion. + * ignore_tags: Boolean flag to disable tag validation during entry insertion. * * num_objs_corked: Unsigned integer field containing the number of objects * that are "corked". The "corked" status of an object is @@ -4020,15 +4050,15 @@ typedef struct H5C_tag_info_t { * * Pinning an entry has the following implications: * - * 1) A pinned entry cannot be evicted. Thus unprotected + * 1) A pinned entry cannot be evicted. Thus unprotected * pinned entries reside in the pinned entry list, instead * of the LRU list(s) (or other lists maintained by the current * replacement policy code). * * 2) A pinned entry can be accessed or modified at any time. * This places an additional burden on the associated pre-serialize - * and serialize callbacks, which must ensure the the entry is in - * a consistent state before creating an image of it. + * and serialize callbacks, which must ensure the the entry is in + * a consistent state before creating an image of it. * * 3) A pinned entry can be marked as dirty (and possibly * change size) while it is unprotected. @@ -4043,21 +4073,21 @@ typedef struct H5C_tag_info_t { * * Maintaining the pinned entry list requires the following fields: * - * pel_len: Number of entries currently residing on the pinned - * entry list. + * pel_len: Number of entries currently residing on the pinned + * entry list. * - * pel_size: Number of bytes of cache entries currently residing on - * the pinned entry list. + * pel_size: Number of bytes of cache entries currently residing on + * the pinned entry list. * * pel_head_ptr: Pointer to the head of the doubly linked list of pinned - * but not protected entries. Note that cache entries on - * this list are linked by their next and prev fields. + * but not protected entries. Note that cache entries on + * this list are linked by their next and prev fields. * * This field is NULL if the list is empty. * * pel_tail_ptr: Pointer to the tail of the doubly linked list of pinned - * but not protected entries. Note that cache entries on - * this list are linked by their next and prev fields. + * but not protected entries. Note that cache entries on + * this list are linked by their next and prev fields. * * This field is NULL if the list is empty. * @@ -4115,13 +4145,13 @@ typedef struct H5C_tag_info_t { * LRU_list_len: Number of cache entries currently on the LRU list. * * Observe that LRU_list_len + pl_len + pel_len must always - * equal index_len. + * equal index_len. * * LRU_list_size: Number of bytes of cache entries currently residing on the * LRU list. * * Observe that LRU_list_size + pl_size + pel_size must always - * equal index_size. + * equal index_size. * * LRU_head_ptr: Pointer to the head of the doubly linked LRU list. Cache * entries on this list are linked by their next and prev fields. @@ -4190,10 +4220,10 @@ typedef struct H5C_tag_info_t { * the structure described below: * * size_increase_possible: Depending on the configuration data given - * in the resize_ctl field, it may or may not be possible - * to increase the size of the cache. Rather than test for - * all the ways this can happen, we simply set this flag when - * we receive a new configuration. + * in the resize_ctl field, it may or may not be possible + * to increase the size of the cache. Rather than test for + * all the ways this can happen, we simply set this flag when + * we receive a new configuration. * * flash_size_increase_possible: Depending on the configuration data given * in the resize_ctl field, it may or may not be possible @@ -4214,37 +4244,37 @@ typedef struct H5C_tag_info_t { * we receive a new configuration. * * resize_enabled: This is another convenience flag which is set whenever - * a new set of values for resize_ctl are provided. Very - * simply, + * a new set of values for resize_ctl are provided. Very + * simply, * - * resize_enabled = size_increase_possible || + * resize_enabled = size_increase_possible || * size_decrease_possible; * - * cache_full: Boolean flag used to keep track of whether the cache is - * full, so we can refrain from increasing the size of a - * cache which hasn't used up the space allotted to it. + * cache_full: Boolean flag used to keep track of whether the cache is + * full, so we can refrain from increasing the size of a + * cache which hasn't used up the space allotted to it. * - * The field is initialized to FALSE, and then set to TRUE - * whenever we attempt to make space in the cache. + * The field is initialized to FALSE, and then set to TRUE + * whenever we attempt to make space in the cache. * * size_decreased: Boolean flag set to TRUE whenever the maximum cache - * size is decreased. The flag triggers a call to - * H5C__make_space_in_cache() on the next call to H5C_protect(). + * size is decreased. The flag triggers a call to + * H5C__make_space_in_cache() on the next call to H5C_protect(). * * resize_in_progress: As the metadata cache has become re-entrant, it is - * possible that a protect may trigger a call to - * H5C__auto_adjust_cache_size(), which may trigger a flush, - * which may trigger a protect, which will result in another - * call to H5C__auto_adjust_cache_size(). + * possible that a protect may trigger a call to + * H5C__auto_adjust_cache_size(), which may trigger a flush, + * which may trigger a protect, which will result in another + * call to H5C__auto_adjust_cache_size(). * - * The resize_in_progress boolean flag is used to detect this, - * and to prevent the infinite recursion that would otherwise - * occur. + * The resize_in_progress boolean flag is used to detect this, + * and to prevent the infinite recursion that would otherwise + * occur. * - * Note that this issue is not hypothetical -- this field - * was added 12/29/15 to fix a bug exposed in the testing - * of changes to the file driver info superblock extension - * management code needed to support rings. + * Note that this issue is not hypothetical -- this field + * was added 12/29/15 to fix a bug exposed in the testing + * of changes to the file driver info superblock extension + * management code needed to support rings. * * msic_in_progress: As the metadata cache has become re-entrant, and as * the free space manager code has become more tightly @@ -4263,62 +4293,62 @@ typedef struct H5C_tag_info_t { * exposed by modifications to test/fheap.c to cause it to * use paged allocation. * - * resize_ctl: Instance of H5C_auto_size_ctl_t containing configuration - * data for automatic cache resizing. + * resize_ctl: Instance of H5C_auto_size_ctl_t containing configuration + * data for automatic cache resizing. * * epoch_markers_active: Integer field containing the number of epoch - * markers currently in use in the LRU list. This value - * must be in the range [0, H5C__MAX_EPOCH_MARKERS - 1]. + * markers currently in use in the LRU list. This value + * must be in the range [0, H5C__MAX_EPOCH_MARKERS - 1]. * * epoch_marker_active: Array of boolean of length H5C__MAX_EPOCH_MARKERS. - * This array is used to track which epoch markers are currently - * in use. + * This array is used to track which epoch markers are currently + * in use. * * epoch_marker_ringbuf: Array of int of length H5C__MAX_EPOCH_MARKERS + 1. * - * To manage the epoch marker cache entries, it is necessary - * to track their order in the LRU list. This is done with - * epoch_marker_ringbuf. When markers are inserted at the - * head of the LRU list, the index of the marker in the - * epoch_markers array is inserted at the tail of the ring - * buffer. When it becomes the epoch_marker_active'th marker - * in the LRU list, it will have worked its way to the head - * of the ring buffer as well. This allows us to remove it - * without scanning the LRU list if such is required. + * To manage the epoch marker cache entries, it is necessary + * to track their order in the LRU list. This is done with + * epoch_marker_ringbuf. When markers are inserted at the + * head of the LRU list, the index of the marker in the + * epoch_markers array is inserted at the tail of the ring + * buffer. When it becomes the epoch_marker_active'th marker + * in the LRU list, it will have worked its way to the head + * of the ring buffer as well. This allows us to remove it + * without scanning the LRU list if such is required. * * epoch_marker_ringbuf_first: Integer field containing the index of the - * first entry in the ring buffer. + * first entry in the ring buffer. * * epoch_marker_ringbuf_last: Integer field containing the index of the - * last entry in the ring buffer. + * last entry in the ring buffer. * * epoch_marker_ringbuf_size: Integer field containing the number of entries - * in the ring buffer. + * in the ring buffer. * * epoch_markers: Array of instances of H5C_cache_entry_t of length - * H5C__MAX_EPOCH_MARKERS. The entries are used as markers - * in the LRU list to identify cache entries that haven't - * been accessed for some (small) specified number of - * epochs. These entries (if any) can then be evicted and - * the cache size reduced -- ideally without evicting any - * of the current working set. Needless to say, the epoch - * length and the number of epochs before an unused entry - * must be chosen so that all, or almost all, the working - * set will be accessed before the limit. - * - * Epoch markers only appear in the LRU list, never in - * the index or slist. While they are of type - * H5C__EPOCH_MARKER_TYPE, and have associated class - * functions, these functions should never be called. - * - * The addr fields of these instances of H5C_cache_entry_t - * are set to the index of the instance in the epoch_markers - * array, the size is set to 0, and the type field points - * to the constant structure epoch_marker_class defined - * in H5C.c. The next and prev fields are used as usual - * to link the entry into the LRU list. - * - * All other fields are unused. + * H5C__MAX_EPOCH_MARKERS. The entries are used as markers + * in the LRU list to identify cache entries that haven't + * been accessed for some (small) specified number of + * epochs. These entries (if any) can then be evicted and + * the cache size reduced -- ideally without evicting any + * of the current working set. Needless to say, the epoch + * length and the number of epochs before an unused entry + * must be chosen so that all, or almost all, the working + * set will be accessed before the limit. + * + * Epoch markers only appear in the LRU list, never in + * the index or slist. While they are of type + * H5C__EPOCH_MARKER_TYPE, and have associated class + * functions, these functions should never be called. + * + * The addr fields of these instances of H5C_cache_entry_t + * are set to the index of the instance in the epoch_markers + * array, the size is set to 0, and the type field points + * to the constant structure epoch_marker_class defined + * in H5C.c. The next and prev fields are used as usual + * to link the entry into the LRU list. + * + * All other fields are unused. * * * Cache hit rate collection fields: @@ -4328,62 +4358,62 @@ typedef struct H5C_tag_info_t { * collection is enabled. The following fields support this capability. * * cache_hits: Number of cache hits since the last time the cache hit - * rate statistics were reset. Note that when automatic cache - * re-sizing is enabled, this field will be reset every automatic - * resize epoch. + * rate statistics were reset. Note that when automatic cache + * re-sizing is enabled, this field will be reset every automatic + * resize epoch. * * cache_accesses: Number of times the cache has been accessed while - * since the last since the last time the cache hit rate statistics - * were reset. Note that when automatic cache re-sizing is enabled, - * this field will be reset every automatic resize epoch. + * since the last since the last time the cache hit rate statistics + * were reset. Note that when automatic cache re-sizing is enabled, + * this field will be reset every automatic resize epoch. * * * Metadata cache image management related fields. * - * image_ctl: Instance of H5C_cache_image_ctl_t containing configuration - * data for generation of a cache image on file close. + * image_ctl: Instance of H5C_cache_image_ctl_t containing configuration + * data for generation of a cache image on file close. * * serialization_in_progress: Boolean field that is set to TRUE iff - * the cache is in the process of being serialized. This - * field is needed to support the H5C_serialization_in_progress() - * call, which is in turn required for sanity checks in some - * cache clients. + * the cache is in the process of being serialized. This + * field is needed to support the H5C_serialization_in_progress() + * call, which is in turn required for sanity checks in some + * cache clients. * - * load_image: Boolean flag indicating that the metadata cache image - * superblock extension message exists and should be - * read, and the image block read and decoded on the next - * call to H5C_protect(). + * load_image: Boolean flag indicating that the metadata cache image + * superblock extension message exists and should be + * read, and the image block read and decoded on the next + * call to H5C_protect(). * * image_loaded: Boolean flag indicating that the metadata cache has * loaded the metadata cache image as directed by the * MDC cache image superblock extension message. * * delete_image: Boolean flag indicating whether the metadata cache image - * superblock message should be deleted and the cache image - * file space freed after they have been read and decoded. + * superblock message should be deleted and the cache image + * file space freed after they have been read and decoded. * - * This flag should be set to TRUE iff the file is opened - * R/W and there is a cache image to be read. + * This flag should be set to TRUE iff the file is opened + * R/W and there is a cache image to be read. * * image_addr: haddr_t containing the base address of the on disk - * metadata cache image, or HADDR_UNDEF if that value is - * undefined. Note that this field is used both in the - * construction and write, and the read and decode of - * metadata cache image blocks. + * metadata cache image, or HADDR_UNDEF if that value is + * undefined. Note that this field is used both in the + * construction and write, and the read and decode of + * metadata cache image blocks. * - * image_len: hsize_t containing the size of the on disk metadata cache - * image, or zero if that value is undefined. Note that this - * field is used both in the construction and write, and the - * read and decode of metadata cache image blocks. + * image_len: hsize_t containing the size of the on disk metadata cache + * image, or zero if that value is undefined. Note that this + * field is used both in the construction and write, and the + * read and decode of metadata cache image blocks. * * image_data_len: size_t containing the number of bytes of data in the - * on disk metadata cache image, or zero if that value is - * undefined. + * on disk metadata cache image, or zero if that value is + * undefined. * - * In most cases, this value is the same as the image_len - * above. It exists to allow for metadata cache image blocks - * that are larger than the actual image. Thus in all - * cases image_data_len <= image_len. + * In most cases, this value is the same as the image_len + * above. It exists to allow for metadata cache image blocks + * that are larger than the actual image. Thus in all + * cases image_data_len <= image_len. * * To create the metadata cache image, we must first serialize all the * entries in the metadata cache. This is done by a scan of the index. @@ -4410,35 +4440,35 @@ typedef struct H5C_tag_info_t { * Note that all these new fields would work just as well as booleans. * * entries_loaded_counter: Number of entries loaded into the cache - * since the last time this field was reset. + * since the last time this field was reset. * * entries_inserted_counter: Number of entries inserted into the cache - * since the last time this field was reset. + * since the last time this field was reset. * * entries relocated_counter: Number of entries whose base address has - * been changed since the last time this field was reset. + * been changed since the last time this field was reset. * * entry_fd_height_change_counter: Number of entries whose flush dependency - * height has changed since the last time this field was reset. + * height has changed since the last time this field was reset. * * The following fields are used assemble the cache image prior to * writing it to disk. * * num_entries_in_image: Unsigned integer field containing the number of entries - * to be copied into the metadata cache image. Note that - * this value will be less than the number of entries in - * the cache, and the superblock and its related entries - * are not written to the metadata cache image. + * to be copied into the metadata cache image. Note that + * this value will be less than the number of entries in + * the cache, and the superblock and its related entries + * are not written to the metadata cache image. * * image_entries: Pointer to a dynamically allocated array of instance of - * H5C_image_entry_t of length num_entries_in_image, or NULL - * if that array does not exist. This array is used to - * assemble entry data to be included in the image, and to - * sort them by flush dependency height and LRU rank. + * H5C_image_entry_t of length num_entries_in_image, or NULL + * if that array does not exist. This array is used to + * assemble entry data to be included in the image, and to + * sort them by flush dependency height and LRU rank. * * image_buffer: Pointer to the dynamically allocated buffer of length - * image_len in which the metadata cache image is assembled, - * or NULL if that buffer does not exist. + * image_len in which the metadata cache image is assembled, + * or NULL if that buffer does not exist. * * * Free Space Manager Related fields: @@ -4460,13 +4490,13 @@ typedef struct H5C_tag_info_t { * flush is complete. * * rdfsm_settled: Boolean flag indicating whether the raw data free space - * manager is settled -- i.e. whether the correct space has - * been allocated for it in the file. + * manager is settled -- i.e. whether the correct space has + * been allocated for it in the file. * - * Note that the name of this field is deceptive. In the - * multi file case, the flag applies to all free space - * managers that are not involved in allocating space for - * free space manager metadata. + * Note that the name of this field is deceptive. In the + * multi file case, the flag applies to all free space + * managers that are not involved in allocating space for + * free space manager metadata. * * mdfsm_settled: Boolean flag indicating whether the meta data free space * manager is settled -- i.e. whether the correct space has @@ -4474,8 +4504,8 @@ typedef struct H5C_tag_info_t { * * Note that the name of this field is deceptive. In the * multi file case, the flag applies only to free space - * managers that are involved in allocating space for free - * space managers. + * managers that are involved in allocating space for free + * space managers. * * * Statistics collection fields: @@ -4485,144 +4515,144 @@ typedef struct H5C_tag_info_t { * is true. * * hits: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the number of times an entry with type id - * equal to the array index has been in cache when requested in - * the current epoch. + * are used to record the number of times an entry with type id + * equal to the array index has been in cache when requested in + * the current epoch. * * misses: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the number of times an entry with type id - * equal to the array index has not been in cache when - * requested in the current epoch. + * are used to record the number of times an entry with type id + * equal to the array index has not been in cache when + * requested in the current epoch. * * write_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The - * cells are used to record the number of times an entry with - * type id equal to the array index has been write protected - * in the current epoch. + * cells are used to record the number of times an entry with + * type id equal to the array index has been write protected + * in the current epoch. * - * Observe that (hits + misses) = (write_protects + read_protects). + * Observe that (hits + misses) = (write_protects + read_protects). * * read_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The - * cells are used to record the number of times an entry with - * type id equal to the array index has been read protected in - * the current epoch. + * cells are used to record the number of times an entry with + * type id equal to the array index has been read protected in + * the current epoch. * * Observe that (hits + misses) = (write_protects + read_protects). * * max_read_protects: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. - * The cells are used to maximum number of simultaneous read - * protects on any entry with type id equal to the array index - * in the current epoch. + * The cells are used to maximum number of simultaneous read + * protects on any entry with type id equal to the array index + * in the current epoch. * * insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the number of times an entry with type - * id equal to the array index has been inserted into the - * cache in the current epoch. + * are used to record the number of times an entry with type + * id equal to the array index has been inserted into the + * cache in the current epoch. * * pinned_insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. - * The cells are used to record the number of times an entry - * with type id equal to the array index has been inserted - * pinned into the cache in the current epoch. + * The cells are used to record the number of times an entry + * with type id equal to the array index has been inserted + * pinned into the cache in the current epoch. * * clears: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the number of times a dirty entry with type - * id equal to the array index has been cleared in the current - * epoch. + * are used to record the number of times a dirty entry with type + * id equal to the array index has been cleared in the current + * epoch. * * flushes: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the number of times an entry with type id - * equal to the array index has been written to disk in the + * are used to record the number of times an entry with type id + * equal to the array index has been written to disk in the * current epoch. * * evictions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the number of times an entry with type id - * equal to the array index has been evicted from the cache in - * the current epoch. + * are used to record the number of times an entry with type id + * equal to the array index has been evicted from the cache in + * the current epoch. * * take_ownerships: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The - * cells are used to record the number of times an entry with - * type id equal to the array index has been removed from the - * cache via the H5C__TAKE_OWNERSHIP_FLAG in the current epoch. + * cells are used to record the number of times an entry with + * type id equal to the array index has been removed from the + * cache via the H5C__TAKE_OWNERSHIP_FLAG in the current epoch. * * moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the number of times an entry with type - * id equal to the array index has been moved in the current - * epoch. + * are used to record the number of times an entry with type + * id equal to the array index has been moved in the current + * epoch. * * entry_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. - * The cells are used to record the number of times an entry - * with type id equal to the array index has been moved - * during its pre-serialize callback in the current epoch. + * The cells are used to record the number of times an entry + * with type id equal to the array index has been moved + * during its pre-serialize callback in the current epoch. * * cache_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. - * The cells are used to record the number of times an entry - * with type id equal to the array index has been moved - * during a cache flush in the current epoch. + * The cells are used to record the number of times an entry + * with type id equal to the array index has been moved + * during a cache flush in the current epoch. * * pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the number of times an entry with type - * id equal to the array index has been pinned in the current - * epoch. + * are used to record the number of times an entry with type + * id equal to the array index has been pinned in the current + * epoch. * * unpins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the number of times an entry with type - * id equal to the array index has been unpinned in the current - * epoch. + * are used to record the number of times an entry with type + * id equal to the array index has been unpinned in the current + * epoch. * - * dirty_pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the number of times an entry with type - * id equal to the array index has been marked dirty while pinned - * in the current epoch. + * dirty_pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells + * are used to record the number of times an entry with type + * id equal to the array index has been marked dirty while pinned + * in the current epoch. * * pinned_flushes: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The - * cells are used to record the number of times an entry - * with type id equal to the array index has been flushed while - * pinned in the current epoch. + * cells are used to record the number of times an entry + * with type id equal to the array index has been flushed while + * pinned in the current epoch. * * pinned_clears: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The - * cells are used to record the number of times an entry - * with type id equal to the array index has been cleared while - * pinned in the current epoch. + * cells are used to record the number of times an entry + * with type id equal to the array index has been cleared while + * pinned in the current epoch. * * size_increases: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. - * The cells are used to record the number of times an entry - * with type id equal to the array index has increased in - * size in the current epoch. + * The cells are used to record the number of times an entry + * with type id equal to the array index has increased in + * size in the current epoch. * * size_decreases: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. - * The cells are used to record the number of times an entry - * with type id equal to the array index has decreased in - * size in the current epoch. + * The cells are used to record the number of times an entry + * with type id equal to the array index has decreased in + * size in the current epoch. * * entry_flush_size_changes: Array of int64 of length - * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record - * the number of times an entry with type id equal to the - * array index has changed size while in its pre-serialize - * callback. + * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record + * the number of times an entry with type id equal to the + * array index has changed size while in its pre-serialize + * callback. * * cache_flush_size_changes: Array of int64 of length - * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record - * the number of times an entry with type id equal to the - * array index has changed size during a cache flush + * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record + * the number of times an entry with type id equal to the + * array index has changed size during a cache flush * * total_ht_insertions: Number of times entries have been inserted into the - * hash table in the current epoch. + * hash table in the current epoch. * * total_ht_deletions: Number of times entries have been deleted from the * hash table in the current epoch. * * successful_ht_searches: int64 containing the total number of successful - * searches of the hash table in the current epoch. + * searches of the hash table in the current epoch. * * total_successful_ht_search_depth: int64 containing the total number of - * entries other than the targets examined in successful - * searches of the hash table in the current epoch. + * entries other than the targets examined in successful + * searches of the hash table in the current epoch. * * failed_ht_searches: int64 containing the total number of unsuccessful * searches of the hash table in the current epoch. * * total_failed_ht_search_depth: int64 containing the total number of * entries examined in unsuccessful searches of the hash - * table in the current epoch. + * table in the current epoch. * * max_index_len: Largest value attained by the index_len field in the * current epoch. @@ -4631,10 +4661,10 @@ typedef struct H5C_tag_info_t { * current epoch. * * max_clean_index_size: Largest value attained by the clean_index_size field - * in the current epoch. + * in the current epoch. * * max_dirty_index_size: Largest value attained by the dirty_index_size field - * in the current epoch. + * in the current epoch. * * max_slist_len: Largest value attained by the slist_len field in the * current epoch. @@ -4685,11 +4715,11 @@ typedef struct H5C_tag_info_t { * The following fields track statistics on cache images. * * images_created: Integer field containing the number of cache images - * created since the last time statistics were reset. + * created since the last time statistics were reset. * - * At present, this field must always be either 0 or 1. - * Further, since cache images are only created at file - * close, this field should only be set at that time. + * At present, this field must always be either 0 or 1. + * Further, since cache images are only created at file + * close, this field should only be set at that time. * * images_read: Integer field containing the number of cache images * read from file. Note that reading an image is different @@ -4704,12 +4734,12 @@ typedef struct H5C_tag_info_t { * from process 0. * * images_loaded: Integer field containing the number of cache images - * loaded since the last time statistics were reset. + * loaded since the last time statistics were reset. * - * At present, this field must always be either 0 or 1. - * Further, since cache images are only loaded at the - * time of the first protect or on file close, this value - * should only change on those events. + * At present, this field must always be either 0 or 1. + * Further, since cache images are only loaded at the + * time of the first protect or on file close, this value + * should only change on those events. * * last_image_size: Size of the most recently loaded metadata cache image * loaded into the cache, or zero if no image has been @@ -4725,11 +4755,11 @@ typedef struct H5C_tag_info_t { * of prefetched entries are tracked in the flushes and evictions arrays * discused above. * - * prefetches: Number of prefetched entries that are loaded to the - * cache. + * prefetches: Number of prefetched entries that are loaded to the + * cache. * * dirty_prefetches: Number of dirty prefetched entries that are loaded - * into the cache. + * into the cache. * * prefetch_hits: Number of prefetched entries that are actually used. * @@ -4745,9 +4775,9 @@ typedef struct H5C_tag_info_t { * obtain estimates of how frequently these restarts occur. * * slist_scan_restarts: Number of times a scan of the slist (that contains - * calls to H5C__flush_single_entry()) has been restarted to - * avoid potential issues with change of status of the next - * entry in the scan. + * calls to H5C__flush_single_entry()) has been restarted to + * avoid potential issues with change of status of the next + * entry in the scan. * * LRU_scan_restarts: Number of times a scan of the LRU list (that contains * calls to H5C__flush_single_entry()) has been restarted to @@ -4755,43 +4785,43 @@ typedef struct H5C_tag_info_t { * entry in the scan. * * index_scan_restarts: Number of times a scan of the index has been - * restarted to avoid potential issues with load, insertion - * or change in flush dependency height of an entry other - * than the target entry as the result of call(s) to the - * pre_serialize or serialize callbacks. + * restarted to avoid potential issues with load, insertion + * or change in flush dependency height of an entry other + * than the target entry as the result of call(s) to the + * pre_serialize or serialize callbacks. * - * Note that at present, this condition can only be triggered - * by a call to H5C_serialize_single_entry(). + * Note that at present, this condition can only be triggered + * by a call to H5C_serialize_single_entry(). * * The remaining stats are collected only when both H5C_COLLECT_CACHE_STATS * and H5C_COLLECT_CACHE_ENTRY_STATS are true. * * max_accesses: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the maximum number of times any single - * entry with type id equal to the array index has been - * accessed in the current epoch. + * are used to record the maximum number of times any single + * entry with type id equal to the array index has been + * accessed in the current epoch. * * min_accesses: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the minimum number of times any single - * entry with type id equal to the array index has been - * accessed in the current epoch. + * are used to record the minimum number of times any single + * entry with type id equal to the array index has been + * accessed in the current epoch. * * max_clears: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the maximum number of times any single - * entry with type id equal to the array index has been cleared - * in the current epoch. + * are used to record the maximum number of times any single + * entry with type id equal to the array index has been cleared + * in the current epoch. * * max_flushes: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells - * are used to record the maximum number of times any single - * entry with type id equal to the array index has been - * flushed in the current epoch. + * are used to record the maximum number of times any single + * entry with type id equal to the array index has been + * flushed in the current epoch. * - * max_size: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells + * max_size: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells * are used to record the maximum size of any single entry - * with type id equal to the array index that has resided in - * the cache in the current epoch. + * with type id equal to the array index that has resided in + * the cache in the current epoch. * - * max_pins: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells + * max_pins: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells * are used to record the maximum number of times that any single * entry with type id equal to the array index that has been * marked as pinned in the cache in the current epoch. @@ -4799,9 +4829,9 @@ typedef struct H5C_tag_info_t { * * Fields supporting testing: * - * prefix Array of char used to prefix debugging output. The - * field is intended to allow marking of output of with - * the processes mpi rank. + * prefix Array of char used to prefix debugging output. The + * field is intended to allow marking of output of with + * the processes mpi rank. * * get_entry_ptr_from_addr_counter: Counter used to track the number of * times the H5C_get_entry_ptr_from_addr() function has been @@ -4811,147 +4841,147 @@ typedef struct H5C_tag_info_t { ****************************************************************************/ struct H5C_t { - uint32_t magic; - hbool_t flush_in_progress; + uint32_t magic; + hbool_t flush_in_progress; H5C_log_info_t *log_info; - void * aux_ptr; - int32_t max_type_id; + void * aux_ptr; + int32_t max_type_id; const H5C_class_t * const *class_table_ptr; size_t max_cache_size; size_t min_clean_size; - H5C_write_permitted_func_t check_write_permitted; - hbool_t write_permitted; - H5C_log_flush_func_t log_flush; - hbool_t evictions_enabled; - hbool_t close_warning_received; + H5C_write_permitted_func_t check_write_permitted; + hbool_t write_permitted; + H5C_log_flush_func_t log_flush; + hbool_t evictions_enabled; + hbool_t close_warning_received; /* Fields for maintaining the [hash table] index of entries */ uint32_t index_len; size_t index_size; - uint32_t index_ring_len[H5C_RING_NTYPES]; - size_t index_ring_size[H5C_RING_NTYPES]; - size_t clean_index_size; - size_t clean_index_ring_size[H5C_RING_NTYPES]; - size_t dirty_index_size; - size_t dirty_index_ring_size[H5C_RING_NTYPES]; - H5C_cache_entry_t * index[H5C__HASH_TABLE_LEN]; + uint32_t index_ring_len[H5C_RING_NTYPES]; + size_t index_ring_size[H5C_RING_NTYPES]; + size_t clean_index_size; + size_t clean_index_ring_size[H5C_RING_NTYPES]; + size_t dirty_index_size; + size_t dirty_index_ring_size[H5C_RING_NTYPES]; + H5C_cache_entry_t * index[H5C__HASH_TABLE_LEN]; uint32_t il_len; size_t il_size; - H5C_cache_entry_t * il_head; - H5C_cache_entry_t * il_tail; + H5C_cache_entry_t * il_head; + H5C_cache_entry_t * il_tail; /* Fields to detect entries removed during scans */ - int64_t entries_removed_counter; - H5C_cache_entry_t * last_entry_removed_ptr; - H5C_cache_entry_t * entry_watched_for_removal; + int64_t entries_removed_counter; + H5C_cache_entry_t * last_entry_removed_ptr; + H5C_cache_entry_t * entry_watched_for_removal; /* Fields for maintaining list of in-order entries, for flushing */ hbool_t slist_enabled; - hbool_t slist_changed; + hbool_t slist_changed; uint32_t slist_len; size_t slist_size; - uint32_t slist_ring_len[H5C_RING_NTYPES]; - size_t slist_ring_size[H5C_RING_NTYPES]; + uint32_t slist_ring_len[H5C_RING_NTYPES]; + size_t slist_ring_size[H5C_RING_NTYPES]; H5SL_t * slist_ptr; uint32_t num_last_entries; #if H5C_DO_SANITY_CHECKS - int32_t slist_len_increase; - int64_t slist_size_increase; + int32_t slist_len_increase; + int64_t slist_size_increase; #endif /* H5C_DO_SANITY_CHECKS */ /* Fields for maintaining list of tagged entries */ H5SL_t * tag_list; hbool_t ignore_tags; - uint32_t num_objs_corked; + uint32_t num_objs_corked; /* Fields for tracking protected entries */ uint32_t pl_len; size_t pl_size; - H5C_cache_entry_t * pl_head_ptr; - H5C_cache_entry_t * pl_tail_ptr; + H5C_cache_entry_t * pl_head_ptr; + H5C_cache_entry_t * pl_tail_ptr; /* Fields for tracking pinned entries */ uint32_t pel_len; size_t pel_size; - H5C_cache_entry_t * pel_head_ptr; - H5C_cache_entry_t * pel_tail_ptr; + H5C_cache_entry_t * pel_head_ptr; + H5C_cache_entry_t * pel_tail_ptr; /* Fields for complete LRU list of entries */ uint32_t LRU_list_len; size_t LRU_list_size; - H5C_cache_entry_t * LRU_head_ptr; - H5C_cache_entry_t * LRU_tail_ptr; + H5C_cache_entry_t * LRU_head_ptr; + H5C_cache_entry_t * LRU_tail_ptr; #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS /* Fields for clean LRU list of entries */ uint32_t cLRU_list_len; size_t cLRU_list_size; - H5C_cache_entry_t * cLRU_head_ptr; - H5C_cache_entry_t * cLRU_tail_ptr; + H5C_cache_entry_t * cLRU_head_ptr; + H5C_cache_entry_t * cLRU_tail_ptr; /* Fields for dirty LRU list of entries */ uint32_t dLRU_list_len; size_t dLRU_list_size; - H5C_cache_entry_t * dLRU_head_ptr; - H5C_cache_entry_t * dLRU_tail_ptr; + H5C_cache_entry_t * dLRU_head_ptr; + H5C_cache_entry_t * dLRU_tail_ptr; #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ #ifdef H5_HAVE_PARALLEL /* Fields for collective metadata reads */ uint32_t coll_list_len; size_t coll_list_size; - H5C_cache_entry_t * coll_head_ptr; - H5C_cache_entry_t * coll_tail_ptr; + H5C_cache_entry_t * coll_head_ptr; + H5C_cache_entry_t * coll_tail_ptr; /* Fields for collective metadata writes */ H5SL_t * coll_write_list; #endif /* H5_HAVE_PARALLEL */ /* Fields for automatic cache size adjustment */ - hbool_t size_increase_possible; - hbool_t flash_size_increase_possible; - size_t flash_size_increase_threshold; - hbool_t size_decrease_possible; - hbool_t resize_enabled; - hbool_t cache_full; - hbool_t size_decreased; - hbool_t resize_in_progress; - hbool_t msic_in_progress; - H5C_auto_size_ctl_t resize_ctl; + hbool_t size_increase_possible; + hbool_t flash_size_increase_possible; + size_t flash_size_increase_threshold; + hbool_t size_decrease_possible; + hbool_t resize_enabled; + hbool_t cache_full; + hbool_t size_decreased; + hbool_t resize_in_progress; + hbool_t msic_in_progress; + H5C_auto_size_ctl_t resize_ctl; /* Fields for epoch markers used in automatic cache size adjustment */ - int32_t epoch_markers_active; - hbool_t epoch_marker_active[H5C__MAX_EPOCH_MARKERS]; - int32_t epoch_marker_ringbuf[H5C__MAX_EPOCH_MARKERS+1]; - int32_t epoch_marker_ringbuf_first; - int32_t epoch_marker_ringbuf_last; - int32_t epoch_marker_ringbuf_size; - H5C_cache_entry_t epoch_markers[H5C__MAX_EPOCH_MARKERS]; + int32_t epoch_markers_active; + hbool_t epoch_marker_active[H5C__MAX_EPOCH_MARKERS]; + int32_t epoch_marker_ringbuf[H5C__MAX_EPOCH_MARKERS+1]; + int32_t epoch_marker_ringbuf_first; + int32_t epoch_marker_ringbuf_last; + int32_t epoch_marker_ringbuf_size; + H5C_cache_entry_t epoch_markers[H5C__MAX_EPOCH_MARKERS]; /* Fields for cache hit rate collection */ - int64_t cache_hits; - int64_t cache_accesses; + int64_t cache_hits; + int64_t cache_accesses; /* fields supporting generation of a cache image on file close */ - H5C_cache_image_ctl_t image_ctl; - hbool_t serialization_in_progress; - hbool_t load_image; + H5C_cache_image_ctl_t image_ctl; + hbool_t serialization_in_progress; + hbool_t load_image; hbool_t image_loaded; - hbool_t delete_image; - haddr_t image_addr; - hsize_t image_len; - hsize_t image_data_len; - int64_t entries_loaded_counter; - int64_t entries_inserted_counter; - int64_t entries_relocated_counter; - int64_t entry_fd_height_change_counter; - uint32_t num_entries_in_image; - H5C_image_entry_t * image_entries; + hbool_t delete_image; + haddr_t image_addr; + hsize_t image_len; + hsize_t image_data_len; + int64_t entries_loaded_counter; + int64_t entries_inserted_counter; + int64_t entries_relocated_counter; + int64_t entry_fd_height_change_counter; + uint32_t num_entries_in_image; + H5C_image_entry_t * image_entries; void * image_buffer; /* Free Space Manager Related fields */ - hbool_t rdfsm_settled; - hbool_t mdfsm_settled; + hbool_t rdfsm_settled; + hbool_t mdfsm_settled; #if H5C_COLLECT_CACHE_STATS /* stats fields */ @@ -4980,12 +5010,12 @@ struct H5C_t { int64_t cache_flush_size_changes[H5C__MAX_NUM_TYPE_IDS + 1]; /* Fields for hash table operations */ - int64_t total_ht_insertions; - int64_t total_ht_deletions; - int64_t successful_ht_searches; - int64_t total_successful_ht_search_depth; - int64_t failed_ht_searches; - int64_t total_failed_ht_search_depth; + int64_t total_ht_insertions; + int64_t total_ht_deletions; + int64_t successful_ht_searches; + int64_t total_successful_ht_search_depth; + int64_t failed_ht_searches; + int64_t total_failed_ht_search_depth; uint32_t max_index_len; size_t max_index_size; size_t max_clean_index_size; @@ -5014,20 +5044,20 @@ struct H5C_t { int64_t entries_scanned_to_make_space; /* Fields for tracking skip list scan restarts */ - int64_t slist_scan_restarts; - int64_t LRU_scan_restarts; - int64_t index_scan_restarts; + int64_t slist_scan_restarts; + int64_t LRU_scan_restarts; + int64_t index_scan_restarts; /* Fields for tracking cache image operations */ - int32_t images_created; - int32_t images_read; - int32_t images_loaded; - hsize_t last_image_size; + int32_t images_created; + int32_t images_read; + int32_t images_loaded; + hsize_t last_image_size; /* Fields for tracking prefetched entries */ - int64_t prefetches; - int64_t dirty_prefetches; - int64_t prefetch_hits; + int64_t prefetches; + int64_t dirty_prefetches; + int64_t prefetch_hits; #if H5C_COLLECT_CACHE_ENTRY_STATS int32_t max_accesses[H5C__MAX_NUM_TYPE_IDS + 1]; @@ -5039,7 +5069,7 @@ struct H5C_t { #endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ #endif /* H5C_COLLECT_CACHE_STATS */ - char prefix[H5C__PREFIX_LEN]; + char prefix[H5C__PREFIX_LEN]; #ifndef NDEBUG int64_t get_entry_ptr_from_addr_counter; diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 059e6dc..8286516 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -13,12 +13,12 @@ /*------------------------------------------------------------------------- * - * Created: H5Cprivate.h - * 6/3/04 - * John Mainzer + * Created: H5Cprivate.h + * 6/3/04 + * John Mainzer * - * Purpose: Constants and typedefs available to the rest of the - * library. + * Purpose: Constants and typedefs available to the rest of the + * library. * *------------------------------------------------------------------------- */ @@ -26,11 +26,11 @@ #ifndef _H5Cprivate_H #define _H5Cprivate_H -#include "H5Cpublic.h" /* public prototypes */ +#include "H5Cpublic.h" /* public prototypes */ /* Private headers needed by this header */ -#include "H5private.h" /* Generic Functions */ -#include "H5Fprivate.h" /* File access */ +#include "H5private.h" /* Generic Functions */ +#include "H5Fprivate.h" /* File access */ /**************************/ /* Library Private Macros */ @@ -44,9 +44,9 @@ * or decrease it if appropriate. Its purposes is to detect corrupt * object sizes, so it probably doesn't matter if it is a bit big. * - * JRM - 5/17/04 + * JRM - 5/17/04 */ -#define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024)) +#define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024)) #ifdef H5_HAVE_PARALLEL /* we must maintain the clean and dirty LRU lists when we are compiled @@ -69,9 +69,9 @@ #define H5C__CLASS_SKIP_WRITES ((unsigned)0x4) /* Flags for pre-serialize callback */ -#define H5C__SERIALIZE_NO_FLAGS_SET ((unsigned)0) -#define H5C__SERIALIZE_RESIZED_FLAG ((unsigned)0x1) -#define H5C__SERIALIZE_MOVED_FLAG ((unsigned)0x2) +#define H5C__SERIALIZE_NO_FLAGS_SET ((unsigned)0) +#define H5C__SERIALIZE_RESIZED_FLAG ((unsigned)0x1) +#define H5C__SERIALIZE_MOVED_FLAG ((unsigned)0x2) /* Upper and lower limits on cache size. These limits are picked * out of a hat -- you should be able to change them as necessary. @@ -81,8 +81,8 @@ * upper bound on cache size is rather large for the current hash table * size. */ -#define H5C__MAX_MAX_CACHE_SIZE ((size_t)(128 * 1024 * 1024)) -#define H5C__MIN_MAX_CACHE_SIZE ((size_t)(1024)) +#define H5C__MAX_MAX_CACHE_SIZE ((size_t)(128 * 1024 * 1024)) +#define H5C__MIN_MAX_CACHE_SIZE ((size_t)(1024)) /* Default max cache size and min clean size are give here to make * them generally accessible. @@ -91,14 +91,15 @@ #define H5C__DEFAULT_MIN_CLEAN_SIZE ((size_t)(2 * 1024 * 1024)) /* Values for cache entry magic field */ -#define H5C__H5C_CACHE_ENTRY_T_MAGIC 0x005CAC0A -#define H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC 0xDeadBeef +#define H5C__H5C_CACHE_ENTRY_T_MAGIC 0x005CAC0A +#define H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC 0xDeadBeef /* Cache configuration validation definitions */ #define H5C_RESIZE_CFG__VALIDATE_GENERAL 0x1 #define H5C_RESIZE_CFG__VALIDATE_INCREMENT 0x2 #define H5C_RESIZE_CFG__VALIDATE_DECREMENT 0x4 #define H5C_RESIZE_CFG__VALIDATE_INTERACTIONS 0x8 +/* clang-format off */ #define H5C_RESIZE_CFG__VALIDATE_ALL \ ( \ H5C_RESIZE_CFG__VALIDATE_GENERAL | \ @@ -106,30 +107,31 @@ H5C_RESIZE_CFG__VALIDATE_DECREMENT | \ H5C_RESIZE_CFG__VALIDATE_INTERACTIONS \ ) +/* clang-format on */ /* Cache configuration versions */ -#define H5C__CURR_AUTO_SIZE_CTL_VER 1 -#define H5C__CURR_AUTO_RESIZE_RPT_FCN_VER 1 -#define H5C__CURR_CACHE_IMAGE_CTL_VER 1 +#define H5C__CURR_AUTO_SIZE_CTL_VER 1 +#define H5C__CURR_AUTO_RESIZE_RPT_FCN_VER 1 +#define H5C__CURR_CACHE_IMAGE_CTL_VER 1 /* Default configuration settings */ -#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999f -#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9f -#define H5C__DEF_AR_MAX_SIZE ((size_t)(16 * 1024 * 1024)) -#define H5C__DEF_AR_INIT_SIZE ((size_t)( 1 * 1024 * 1024)) -#define H5C__DEF_AR_MIN_SIZE ((size_t)( 1 * 1024 * 1024)) -#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5f -#define H5C__DEF_AR_INCREMENT 2.0f -#define H5C__DEF_AR_MAX_INCREMENT ((size_t)( 2 * 1024 * 1024)) +#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999f +#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9f +#define H5C__DEF_AR_MAX_SIZE ((size_t)(16 * 1024 * 1024)) +#define H5C__DEF_AR_INIT_SIZE ((size_t)( 1 * 1024 * 1024)) +#define H5C__DEF_AR_MIN_SIZE ((size_t)( 1 * 1024 * 1024)) +#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5f +#define H5C__DEF_AR_INCREMENT 2.0f +#define H5C__DEF_AR_MAX_INCREMENT ((size_t)( 2 * 1024 * 1024)) #define H5C__DEF_AR_FLASH_MULTIPLE 1.0f #define H5C__DEV_AR_FLASH_THRESHOLD 0.25f -#define H5C__DEF_AR_DECREMENT 0.9f -#define H5C__DEF_AR_MAX_DECREMENT ((size_t)( 1 * 1024 * 1024)) -#define H5C__DEF_AR_EPCHS_B4_EVICT 3 -#define H5C__DEF_AR_EMPTY_RESERVE 0.05f -#define H5C__MIN_AR_EPOCH_LENGTH 100 -#define H5C__DEF_AR_EPOCH_LENGTH 50000 -#define H5C__MAX_AR_EPOCH_LENGTH 1000000 +#define H5C__DEF_AR_DECREMENT 0.9f +#define H5C__DEF_AR_MAX_DECREMENT ((size_t)( 1 * 1024 * 1024)) +#define H5C__DEF_AR_EPCHS_B4_EVICT 3 +#define H5C__DEF_AR_EMPTY_RESERVE 0.05f +#define H5C__MIN_AR_EPOCH_LENGTH 100 +#define H5C__DEF_AR_EPOCH_LENGTH 50000 +#define H5C__MAX_AR_EPOCH_LENGTH 1000000 /* #defines of flags used in the flags parameters in some of the * following function calls. Note that not all flags are applicable @@ -137,67 +139,67 @@ * function are ignored in that function. * * These flags apply to all function calls: - * H5C__NO_FLAGS_SET (generic "no flags set" for all fcn calls) + * H5C__NO_FLAGS_SET (generic "no flags set" for all fcn calls) * * * These flags apply to H5C_insert_entry(): - * H5C__SET_FLUSH_MARKER_FLAG - * H5C__PIN_ENTRY_FLAG - * H5C__FLUSH_LAST_FLAG ; super block only - * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only + * H5C__SET_FLUSH_MARKER_FLAG + * H5C__PIN_ENTRY_FLAG + * H5C__FLUSH_LAST_FLAG ; super block only + * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only * * These flags apply to H5C_protect() - * H5C__READ_ONLY_FLAG - * H5C__FLUSH_LAST_FLAG ; super block only - * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only + * H5C__READ_ONLY_FLAG + * H5C__FLUSH_LAST_FLAG ; super block only + * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only * * These flags apply to H5C_unprotect(): - * H5C__SET_FLUSH_MARKER_FLAG - * H5C__DELETED_FLAG - * H5C__DIRTIED_FLAG - * H5C__PIN_ENTRY_FLAG - * H5C__UNPIN_ENTRY_FLAG - * H5C__FREE_FILE_SPACE_FLAG + * H5C__SET_FLUSH_MARKER_FLAG + * H5C__DELETED_FLAG + * H5C__DIRTIED_FLAG + * H5C__PIN_ENTRY_FLAG + * H5C__UNPIN_ENTRY_FLAG + * H5C__FREE_FILE_SPACE_FLAG * H5C__TAKE_OWNERSHIP_FLAG * * These flags apply to H5C_expunge_entry(): - * H5C__FREE_FILE_SPACE_FLAG + * H5C__FREE_FILE_SPACE_FLAG * * These flags apply to H5C_evict(): - * H5C__EVICT_ALLOW_LAST_PINS_FLAG + * H5C__EVICT_ALLOW_LAST_PINS_FLAG * * These flags apply to H5C_flush_cache(): - * H5C__FLUSH_INVALIDATE_FLAG - * H5C__FLUSH_CLEAR_ONLY_FLAG - * H5C__FLUSH_MARKED_ENTRIES_FLAG - * H5C__FLUSH_IGNORE_PROTECTED_FLAG (can't use this flag in combination - * with H5C__FLUSH_INVALIDATE_FLAG) - * H5C__DURING_FLUSH_FLAG + * H5C__FLUSH_INVALIDATE_FLAG + * H5C__FLUSH_CLEAR_ONLY_FLAG + * H5C__FLUSH_MARKED_ENTRIES_FLAG + * H5C__FLUSH_IGNORE_PROTECTED_FLAG (can't use this flag in combination + * with H5C__FLUSH_INVALIDATE_FLAG) + * H5C__DURING_FLUSH_FLAG * * These flags apply to H5C_flush_single_entry(): - * H5C__FLUSH_INVALIDATE_FLAG - * H5C__FLUSH_CLEAR_ONLY_FLAG - * H5C__FLUSH_MARKED_ENTRIES_FLAG + * H5C__FLUSH_INVALIDATE_FLAG + * H5C__FLUSH_CLEAR_ONLY_FLAG + * H5C__FLUSH_MARKED_ENTRIES_FLAG * H5C__TAKE_OWNERSHIP_FLAG * H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG * H5C__GENERATE_IMAGE_FLAG * H5C__UPDATE_PAGE_BUFFER_FLAG */ -#define H5C__NO_FLAGS_SET 0x00000 -#define H5C__SET_FLUSH_MARKER_FLAG 0x00001 -#define H5C__DELETED_FLAG 0x00002 -#define H5C__DIRTIED_FLAG 0x00004 -#define H5C__PIN_ENTRY_FLAG 0x00008 -#define H5C__UNPIN_ENTRY_FLAG 0x00010 -#define H5C__FLUSH_INVALIDATE_FLAG 0x00020 -#define H5C__FLUSH_CLEAR_ONLY_FLAG 0x00040 -#define H5C__FLUSH_MARKED_ENTRIES_FLAG 0x00080 -#define H5C__FLUSH_IGNORE_PROTECTED_FLAG 0x00100 -#define H5C__READ_ONLY_FLAG 0x00200 -#define H5C__FREE_FILE_SPACE_FLAG 0x00400 -#define H5C__TAKE_OWNERSHIP_FLAG 0x00800 -#define H5C__FLUSH_LAST_FLAG 0x01000 -#define H5C__FLUSH_COLLECTIVELY_FLAG 0x02000 +#define H5C__NO_FLAGS_SET 0x00000 +#define H5C__SET_FLUSH_MARKER_FLAG 0x00001 +#define H5C__DELETED_FLAG 0x00002 +#define H5C__DIRTIED_FLAG 0x00004 +#define H5C__PIN_ENTRY_FLAG 0x00008 +#define H5C__UNPIN_ENTRY_FLAG 0x00010 +#define H5C__FLUSH_INVALIDATE_FLAG 0x00020 +#define H5C__FLUSH_CLEAR_ONLY_FLAG 0x00040 +#define H5C__FLUSH_MARKED_ENTRIES_FLAG 0x00080 +#define H5C__FLUSH_IGNORE_PROTECTED_FLAG 0x00100 +#define H5C__READ_ONLY_FLAG 0x00200 +#define H5C__FREE_FILE_SPACE_FLAG 0x00400 +#define H5C__TAKE_OWNERSHIP_FLAG 0x00800 +#define H5C__FLUSH_LAST_FLAG 0x01000 +#define H5C__FLUSH_COLLECTIVELY_FLAG 0x02000 #define H5C__EVICT_ALLOW_LAST_PINS_FLAG 0x04000 #define H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG 0x08000 #define H5C__DURING_FLUSH_FLAG 0x10000 /* Set when the entire cache is being flushed */ @@ -206,18 +208,18 @@ /* Debugging/sanity checking/statistics settings */ #ifndef NDEBUG -#define H5C_DO_SANITY_CHECKS 1 -#define H5C_DO_SLIST_SANITY_CHECKS 0 -#define H5C_DO_TAGGING_SANITY_CHECKS 1 -#define H5C_DO_EXTREME_SANITY_CHECKS 0 +#define H5C_DO_SANITY_CHECKS 1 +#define H5C_DO_SLIST_SANITY_CHECKS 0 +#define H5C_DO_TAGGING_SANITY_CHECKS 1 +#define H5C_DO_EXTREME_SANITY_CHECKS 0 #else /* NDEBUG */ /* With rare execptions, the following defines should be set * to 0 if NDEBUG is defined */ -#define H5C_DO_SANITY_CHECKS 0 -#define H5C_DO_SLIST_SANITY_CHECKS 0 -#define H5C_DO_TAGGING_SANITY_CHECKS 0 -#define H5C_DO_EXTREME_SANITY_CHECKS 0 +#define H5C_DO_SANITY_CHECKS 0 +#define H5C_DO_SLIST_SANITY_CHECKS 0 +#define H5C_DO_TAGGING_SANITY_CHECKS 0 +#define H5C_DO_EXTREME_SANITY_CHECKS 0 #endif /* NDEBUG */ /* Cork actions: cork/uncork/get cork status of an object */ @@ -233,7 +235,7 @@ * routines that the fractal heap direct block (and global heap) serialize * calls can use when resizing (and re-allocating) their image in the * cache. -QAK */ -#define H5C_DO_MEMORY_SANITY_CHECKS 0 +#define H5C_DO_MEMORY_SANITY_CHECKS 0 /* H5C_COLLECT_CACHE_STATS controls overall collection of statistics * on cache activity. In general, this #define should be set to 1 in @@ -241,9 +243,9 @@ */ #ifndef NDEBUG -#define H5C_COLLECT_CACHE_STATS 1 +#define H5C_COLLECT_CACHE_STATS 1 #else /* NDEBUG */ -#define H5C_COLLECT_CACHE_STATS 0 +#define H5C_COLLECT_CACHE_STATS 0 #endif /* NDEBUG */ /* H5C_COLLECT_CACHE_ENTRY_STATS controls collection of statistics @@ -253,9 +255,9 @@ * H5C_COLLECT_CACHE_STATS is also defined to true. */ #if H5C_COLLECT_CACHE_STATS -#define H5C_COLLECT_CACHE_ENTRY_STATS 1 +#define H5C_COLLECT_CACHE_ENTRY_STATS 1 #else -#define H5C_COLLECT_CACHE_ENTRY_STATS 0 +#define H5C_COLLECT_CACHE_ENTRY_STATS 0 #endif /* H5C_COLLECT_CACHE_STATS */ @@ -274,204 +276,204 @@ typedef struct H5C_t H5C_t; * used by the metadata cache for each class of metadata cache entry. * The fields of the structure are discussed below: * - * id: Integer field containing the unique ID of the class of metadata - * cache entries. + * id: Integer field containing the unique ID of the class of metadata + * cache entries. * * name: Pointer to a string containing the name of the class of metadata - * cache entries. + * cache entries. * * mem_type: Instance of H5FD_mem_t, that is used to supply the - * mem type passed into H5F_block_read(). + * mem type passed into H5F_block_read(). * * flags: Flags indicating class-specific behavior. * - * Possible flags are: + * Possible flags are: * - * H5C__CLASS_NO_FLAGS_SET: No special processing. + * H5C__CLASS_NO_FLAGS_SET: No special processing. * - * H5C__CLASS_SPECULATIVE_LOAD_FLAG: This flag is used only in + * H5C__CLASS_SPECULATIVE_LOAD_FLAG: This flag is used only in * H5C_load_entry(). When it is set, entries are - * permitted to change their sizes on the first attempt - * to load. - * - * If the new size is larger than the old, the read buffer - * is reallocated to the new size, loaded from file, and the - * deserialize routine is called a second time on the - * new buffer. The entry returned by the first call to - * the deserialize routine is discarded (via the free_icr - * call) after the new size is retrieved (via the image_len - * call). Note that the new size is used as the size of the - * entry in the cache. - * - * If the new size is smaller than the old, no new loads - * or deserializes are performed, but the new size becomes - * the size of the entry in the cache. - * - * When this flag is set, an attempt to read past the - * end of file could occur. In this case, if the size - * returned get_load_size callback would result in a - * read past the end of file, the size is truncated to - * avoid this, and processing proceeds as normal. + * permitted to change their sizes on the first attempt + * to load. + * + * If the new size is larger than the old, the read buffer + * is reallocated to the new size, loaded from file, and the + * deserialize routine is called a second time on the + * new buffer. The entry returned by the first call to + * the deserialize routine is discarded (via the free_icr + * call) after the new size is retrieved (via the image_len + * call). Note that the new size is used as the size of the + * entry in the cache. + * + * If the new size is smaller than the old, no new loads + * or deserializes are performed, but the new size becomes + * the size of the entry in the cache. + * + * When this flag is set, an attempt to read past the + * end of file could occur. In this case, if the size + * returned get_load_size callback would result in a + * read past the end of file, the size is truncated to + * avoid this, and processing proceeds as normal. * * The following flags may only appear in test code. * - * H5C__CLASS_SKIP_READS: This flags is intended only for use in test - * code. When it is set, reads on load will be skipped, - * and an uninitialize buffer will be passed to the - * deserialize function. + * H5C__CLASS_SKIP_READS: This flags is intended only for use in test + * code. When it is set, reads on load will be skipped, + * and an uninitialize buffer will be passed to the + * deserialize function. * - * H5C__CLASS_SKIP_WRITES: This flags is intended only for use in test - * code. When it is set, writes of buffers prepared by the - * serialize callback will be skipped. + * H5C__CLASS_SKIP_WRITES: This flags is intended only for use in test + * code. When it is set, writes of buffers prepared by the + * serialize callback will be skipped. * * GET_INITIAL_LOAD_SIZE: Pointer to the 'get initial load size' function. * - * This function determines the size based on the information in the - * parameter "udata" or an initial speculative guess. The size is - * returned in the parameter "image_len_ptr". + * This function determines the size based on the information in the + * parameter "udata" or an initial speculative guess. The size is + * returned in the parameter "image_len_ptr". * - * For an entry with H5C__CLASS_NO_FLAGS_SET: - * This function returns in "image_len_ptr" the on disk size of the + * For an entry with H5C__CLASS_NO_FLAGS_SET: + * This function returns in "image_len_ptr" the on disk size of the * entry. * - * For an entry with H5C__CLASS_SPECULATIVE_LOAD_FLAG: - * This function returns in "image_len_ptr" an initial guess of the + * For an entry with H5C__CLASS_SPECULATIVE_LOAD_FLAG: + * This function returns in "image_len_ptr" an initial guess of the * entry's on disk size. This many bytes will be loaded from * the file and then passed to 'get_final_load_size' callback * for the actual (final) image length to be determined. * - * The typedef for the get_initial_load_size callback is as follows: + * The typedef for the get_initial_load_size callback is as follows: * - * typedef herr_t (*H5C_get_initial_load_size_func_t)(void *udata_ptr, - * size_t *image_len_ptr); + * typedef herr_t (*H5C_get_initial_load_size_func_t)(void *udata_ptr, + * size_t *image_len_ptr); * - * The parameters of the get_initial_load_size callback are as follows: + * The parameters of the get_initial_load_size callback are as follows: * - * udata_ptr: Pointer to user data provided in the protect call, which - * will also be passed through to the 'get_final_load_size', + * udata_ptr: Pointer to user data provided in the protect call, which + * will also be passed through to the 'get_final_load_size', * 'verify_chksum', and 'deserialize' callbacks. * - * image_len_ptr: Pointer to the length in bytes of the in-file image to + * image_len_ptr: Pointer to the length in bytes of the in-file image to * be deserialized is to be returned. * * This value is used by the cache to determine the size of * the disk image for the metadata, in order to read the disk * image from the file. * - * Processing in the get_load_size function should proceed as follows: + * Processing in the get_load_size function should proceed as follows: * - * If successful, the function will place the length in the *image_len_ptr + * If successful, the function will place the length in the *image_len_ptr * associated with supplied user data and then return SUCCEED. * - * On failure, the function must return FAIL and push error information - * onto the error stack with the error API routines, without modifying + * On failure, the function must return FAIL and push error information + * onto the error stack with the error API routines, without modifying * the value pointed to by image_len_ptr. * * * GET_FINAL_LOAD_SIZE: Pointer to the 'get final load size' function. * - * This function determines the final size of a speculatively loaded + * This function determines the final size of a speculatively loaded * metadata cache entry based on the parameter "image" and the "udata" * parameters. This callback _must_ be implemented for cache clients * which set the H5C__CLASS_SPECULATIVE_LOAD_FLAG and must return the * actual length of on-disk image after being called once. * - * This function might deserialize the needed metadata information to - * determine the actual size. The size is returned in the parameter + * This function might deserialize the needed metadata information to + * determine the actual size. The size is returned in the parameter * "actual_len_ptr". * - * The typedef for the get_load_size callback is as follows: + * The typedef for the get_load_size callback is as follows: * - * typedef herr_t (*H5C_get_final_load_size_func_t)(const void *image_ptr, - * size_t image_len, - * void *udata_ptr, - * size_t *actual_len_ptr); + * typedef herr_t (*H5C_get_final_load_size_func_t)(const void *image_ptr, + * size_t image_len, + * void *udata_ptr, + * size_t *actual_len_ptr); * - * The parameters of the get_load_size callback are as follows: + * The parameters of the get_load_size callback are as follows: * - * image_ptr: Pointer to a buffer containing the (possibly partial) + * image_ptr: Pointer to a buffer containing the (possibly partial) * metadata read in. * - * image_len: The length in bytes of the (possibly partial) in-file image + * image_len: The length in bytes of the (possibly partial) in-file image * to be queried for an actual length. * - * udata_ptr: Pointer to user data provided in the protect call, which - * will also be passed through to the 'verify_chksum' and + * udata_ptr: Pointer to user data provided in the protect call, which + * will also be passed through to the 'verify_chksum' and * 'deserialize' callbacks. * - * actual_len_ptr: Pointer to the location containing the actual length - * of the metadata entry on disk. + * actual_len_ptr: Pointer to the location containing the actual length + * of the metadata entry on disk. * - * Processing in the get_final_load_size function should proceed as follows: + * Processing in the get_final_load_size function should proceed as follows: * - * If successful, the function will place the length in the *actual_len_ptr + * If successful, the function will place the length in the *actual_len_ptr * associated with supplied image and/or user data and then return SUCCEED. * - * On failure, the function must return FAIL and push error information - * onto the error stack with the error API routines, without modifying + * On failure, the function must return FAIL and push error information + * onto the error stack with the error API routines, without modifying * the value pointed to by actual_len_ptr. * * * VERIFY_CHKSUM: Pointer to the verify_chksum function. * - * This function verifies the checksum computed for the metadata is - * the same as the checksum stored in the metadata. + * This function verifies the checksum computed for the metadata is + * the same as the checksum stored in the metadata. * - * It computes the checksum based on the metadata stored in the - * parameter "image_ptr" and the actual length of the metadata in the - * parameter "len" which is obtained from the "get_load_size" callback. + * It computes the checksum based on the metadata stored in the + * parameter "image_ptr" and the actual length of the metadata in the + * parameter "len" which is obtained from the "get_load_size" callback. * - * The typedef for the verify_chksum callback is as follows: + * The typedef for the verify_chksum callback is as follows: * - * typedef htri_t (*H5C_verify_chksum_func_t)(const void *image_ptr, - * size_t len, - * void *udata_ptr); + * typedef htri_t (*H5C_verify_chksum_func_t)(const void *image_ptr, + * size_t len, + * void *udata_ptr); * - * The parameters of the verify_chksum callback are as follows: + * The parameters of the verify_chksum callback are as follows: * - * image_ptr: Pointer to a buffer containing the metadata read in. + * image_ptr: Pointer to a buffer containing the metadata read in. * - * len: The actual length of the metadata. + * len: The actual length of the metadata. * - * udata_ptr: Pointer to user data. + * udata_ptr: Pointer to user data. * * * DESERIALIZE: Pointer to the deserialize function. * - * This function must be able to deserialize a buffer containing the + * This function must be able to deserialize a buffer containing the * on-disk image of a metadata cache entry, allocate and initialize the * equivalent in core representation, and return a pointer to that * representation. * - * The typedef for the deserialize callback is as follows: + * The typedef for the deserialize callback is as follows: * - * typedef void *(*H5C_deserialize_func_t)(const void * image_ptr, - * size_t len, + * typedef void *(*H5C_deserialize_func_t)(const void * image_ptr, + * size_t len, * void * udata_ptr, * boolean * dirty_ptr); * - * The parameters of the deserialize callback are as follows: + * The parameters of the deserialize callback are as follows: * - * image_ptr: Pointer to a buffer of length len containing the - * contents of the file starting at addr and continuing - * for len bytes. + * image_ptr: Pointer to a buffer of length len containing the + * contents of the file starting at addr and continuing + * for len bytes. * - * len: Length in bytes of the in file image to be deserialized. + * len: Length in bytes of the in file image to be deserialized. * * This parameter is supplied mainly for sanity checking. * Sanity checks should be performed when compiled in debug * mode, but the parameter may be unused when compiled in * production mode. * - * udata_ptr: Pointer to user data provided in the protect call, which - * must be passed through to the deserialize callback. + * udata_ptr: Pointer to user data provided in the protect call, which + * must be passed through to the deserialize callback. * * dirty_ptr: Pointer to boolean which the deserialize function - * must use to mark the entry dirty if it has to modify - * the entry to clean up file corruption left over from - * an old bug in the HDF5 library. + * must use to mark the entry dirty if it has to modify + * the entry to clean up file corruption left over from + * an old bug in the HDF5 library. * - * Processing in the deserialize function should proceed as follows: + * Processing in the deserialize function should proceed as follows: * * If the image contains valid data, and is of the correct length, * the deserialize function must allocate space for an in-core @@ -499,7 +501,7 @@ typedef struct H5C_t H5C_t; * * IMAGE_LEN: Pointer to the image length callback. * - * The image_len callback is used to obtain the size of newly inserted + * The image_len callback is used to obtain the size of newly inserted * entries and assert verification. * * The typedef for the image_len callback is as follows: @@ -507,29 +509,29 @@ typedef struct H5C_t H5C_t; * typedef herr_t (*H5C_image_len_func_t)(void *thing, * size_t *image_len_ptr); * - * The parameters of the image_len callback are as follows: + * The parameters of the image_len callback are as follows: * - * thing: Pointer to the in core representation of the entry. + * thing: Pointer to the in core representation of the entry. * - * image_len_ptr: Pointer to size_t in which the callback will return - * the length (in bytes) of the cache entry. + * image_len_ptr: Pointer to size_t in which the callback will return + * the length (in bytes) of the cache entry. * - * Processing in the image_len function should proceed as follows: + * Processing in the image_len function should proceed as follows: * - * If successful, the function will place the length of the on disk - * image associated with the in core representation provided in the - * thing parameter in *image_len_ptr, and then return SUCCEED. + * If successful, the function will place the length of the on disk + * image associated with the in core representation provided in the + * thing parameter in *image_len_ptr, and then return SUCCEED. * - * If the function fails, it must return FAIL and push error information + * If the function fails, it must return FAIL and push error information * onto the error stack with the error API routines, and return without * modifying the values pointed to by the image_len_ptr parameter. * * * PRE_SERIALIZE: Pointer to the pre-serialize callback. * - * The pre-serialize callback is invoked by the metadata cache before - * it needs a current on-disk image of the metadata entry for purposes - * either constructing a journal or flushing the entry to disk. + * The pre-serialize callback is invoked by the metadata cache before + * it needs a current on-disk image of the metadata entry for purposes + * either constructing a journal or flushing the entry to disk. * * If the client needs to change the address or length of the entry prior * to flush, the pre-serialize callback is responsible for these actions, @@ -537,28 +539,28 @@ typedef struct H5C_t H5C_t; * responsible for serializing the data structure, not moving it on disk * or resizing it. * - * In addition, the client may use the pre-serialize callback to - * ensure that the entry is ready to be flushed -- in particular, - * if the entry contains references to other entries that are in - * temporary file space, the pre-serialize callback must move those - * entries into real file space so that the serialzed entry will - * contain no invalid data. + * In addition, the client may use the pre-serialize callback to + * ensure that the entry is ready to be flushed -- in particular, + * if the entry contains references to other entries that are in + * temporary file space, the pre-serialize callback must move those + * entries into real file space so that the serialzed entry will + * contain no invalid data. * - * One would think that the base address and length of - * the length of the entry's image on disk would be well known. - * However, that need not be the case as free space section info - * entries will change size (and possibly location) depending on the - * number of blocks of free space being manages, and fractal heap - * direct blocks can change compressed size (and possibly location) - * on serialization if compression is enabled. Similarly, it may - * be necessary to move entries from temporary to real file space. + * One would think that the base address and length of + * the length of the entry's image on disk would be well known. + * However, that need not be the case as free space section info + * entries will change size (and possibly location) depending on the + * number of blocks of free space being manages, and fractal heap + * direct blocks can change compressed size (and possibly location) + * on serialization if compression is enabled. Similarly, it may + * be necessary to move entries from temporary to real file space. * - * The pre-serialize callback must report any such changes to the - * cache, which must then update its internal structures as needed. + * The pre-serialize callback must report any such changes to the + * cache, which must then update its internal structures as needed. * - * The typedef for the pre-serialize callback is as follows: + * The typedef for the pre-serialize callback is as follows: * - * typedef herr_t (*H5C_pre_serialize_func_t)(H5F_t *f, + * typedef herr_t (*H5C_pre_serialize_func_t)(H5F_t *f, * void * thing, * haddr_t addr, * size_t len, @@ -566,154 +568,154 @@ typedef struct H5C_t H5C_t; * size_t * new_len_ptr, * unsigned * flags_ptr); * - * The parameters of the pre-serialize callback are as follows: + * The parameters of the pre-serialize callback are as follows: * - * f: File pointer -- needed if other metadata cache entries - * must be modified in the process of serializing the - * target entry. + * f: File pointer -- needed if other metadata cache entries + * must be modified in the process of serializing the + * target entry. * - * thing: Pointer to void containing the address of the in core - * representation of the target metadata cache entry. - * This is the same pointer returned by a protect of the - * addr and len given above. + * thing: Pointer to void containing the address of the in core + * representation of the target metadata cache entry. + * This is the same pointer returned by a protect of the + * addr and len given above. * - * addr: Base address in file of the entry to be serialized. + * addr: Base address in file of the entry to be serialized. * - * This parameter is supplied mainly for sanity checking. - * Sanity checks should be performed when compiled in debug - * mode, but the parameter may be unused when compiled in - * production mode. + * This parameter is supplied mainly for sanity checking. + * Sanity checks should be performed when compiled in debug + * mode, but the parameter may be unused when compiled in + * production mode. * - * len: Length in bytes of the in file image of the entry to be - * serialized. Also the size the image passed to the - * serialize callback (discussed below) unless that - * value is altered by this function. + * len: Length in bytes of the in file image of the entry to be + * serialized. Also the size the image passed to the + * serialize callback (discussed below) unless that + * value is altered by this function. * - * This parameter is supplied mainly for sanity checking. - * Sanity checks should be performed when compiled in debug - * mode, but the parameter may be unused when compiled in - * production mode. + * This parameter is supplied mainly for sanity checking. + * Sanity checks should be performed when compiled in debug + * mode, but the parameter may be unused when compiled in + * production mode. * - * new_addr_ptr: Pointer to haddr_t. If the entry is moved by - * the serialize function, the new on disk base address must - * be stored in *new_addr_ptr, and the appropriate flag set - * in *flags_ptr. + * new_addr_ptr: Pointer to haddr_t. If the entry is moved by + * the serialize function, the new on disk base address must + * be stored in *new_addr_ptr, and the appropriate flag set + * in *flags_ptr. * - * If the entry is not moved by the serialize function, - * *new_addr_ptr is undefined on pre-serialize callback - * return. + * If the entry is not moved by the serialize function, + * *new_addr_ptr is undefined on pre-serialize callback + * return. * - * new_len_ptr: Pointer to size_t. If the entry is resized by the - * serialize function, the new length of the on disk image - * must be stored in *new_len_ptr, and the appropriate flag set + * new_len_ptr: Pointer to size_t. If the entry is resized by the + * serialize function, the new length of the on disk image + * must be stored in *new_len_ptr, and the appropriate flag set * in *flags_ptr. * - * If the entry is not resized by the pre-serialize function, - * *new_len_ptr is undefined on pre-serialize callback - * return. + * If the entry is not resized by the pre-serialize function, + * *new_len_ptr is undefined on pre-serialize callback + * return. * - * flags_ptr: Pointer to an unsigned integer used to return flags - * indicating whether the preserialize function resized or moved - * the entry. If the entry was neither resized or moved, the + * flags_ptr: Pointer to an unsigned integer used to return flags + * indicating whether the preserialize function resized or moved + * the entry. If the entry was neither resized or moved, the * serialize function must set *flags_ptr to zero. The * H5C__SERIALIZE_RESIZED_FLAG or H5C__SERIALIZE_MOVED_FLAG must * be set to indicate a resize or move respectively. * - * If the H5C__SERIALIZE_RESIZED_FLAG is set, the new length - * must be stored in *new_len_ptr. + * If the H5C__SERIALIZE_RESIZED_FLAG is set, the new length + * must be stored in *new_len_ptr. * - * If the H5C__SERIALIZE_MOVED_FLAG flag is set, the - * new image base address must be stored in *new_addr_ptr. + * If the H5C__SERIALIZE_MOVED_FLAG flag is set, the + * new image base address must be stored in *new_addr_ptr. * - * Processing in the pre-serialize function should proceed as follows: + * Processing in the pre-serialize function should proceed as follows: * - * The pre-serialize function must examine the in core representation - * indicated by the thing parameter, if the pre-serialize function does + * The pre-serialize function must examine the in core representation + * indicated by the thing parameter, if the pre-serialize function does * not need to change the size or location of the on-disk image, it must * set *flags_ptr to zero. * - * If the size of the on-disk image must be changed, the pre-serialize + * If the size of the on-disk image must be changed, the pre-serialize * function must load the length of the new image into *new_len_ptr, and * set the H5C__SERIALIZE_RESIZED_FLAG in *flags_ptr. * - * If the base address of the on disk image must be changed, the + * If the base address of the on disk image must be changed, the * pre-serialize function must set *new_addr_ptr to the new base address, * and set the H5C__SERIALIZE_MOVED_FLAG in *flags_ptr. * - * In addition, the pre-serialize callback may perform any other - * processing required before the entry is written to disk + * In addition, the pre-serialize callback may perform any other + * processing required before the entry is written to disk * - * If it is successful, the function must return SUCCEED. + * If it is successful, the function must return SUCCEED. * - * If it fails for any reason, the function must return FAIL and - * push error information on the error stack with the error API - * routines. + * If it fails for any reason, the function must return FAIL and + * push error information on the error stack with the error API + * routines. * * * SERIALIZE: Pointer to the serialize callback. * - * The serialize callback is invoked by the metadata cache whenever - * it needs a current on disk image of the metadata entry for purposes - * either constructing a journal entry or flushing the entry to disk. + * The serialize callback is invoked by the metadata cache whenever + * it needs a current on disk image of the metadata entry for purposes + * either constructing a journal entry or flushing the entry to disk. * - * At this point, the base address and length of the entry's image on + * At this point, the base address and length of the entry's image on * disk must be well known and not change during the serialization * process. * - * While any size and/or location changes must have been handled - * by a pre-serialize call, the client may elect to handle any other - * changes to the entry required to place it in correct form for - * writing to disk in this call. + * While any size and/or location changes must have been handled + * by a pre-serialize call, the client may elect to handle any other + * changes to the entry required to place it in correct form for + * writing to disk in this call. * - * The typedef for the serialize callback is as follows: + * The typedef for the serialize callback is as follows: * - * typedef herr_t (*H5C_serialize_func_t)(const H5F_t *f, + * typedef herr_t (*H5C_serialize_func_t)(const H5F_t *f, * void * image_ptr, * size_t len, * void * thing); * - * The parameters of the serialize callback are as follows: + * The parameters of the serialize callback are as follows: * - * f: File pointer -- needed if other metadata cache entries - * must be modified in the process of serializing the - * target entry. + * f: File pointer -- needed if other metadata cache entries + * must be modified in the process of serializing the + * target entry. * - * image_ptr: Pointer to a buffer of length len bytes into which a - * serialized image of the target metadata cache entry is - * to be written. + * image_ptr: Pointer to a buffer of length len bytes into which a + * serialized image of the target metadata cache entry is + * to be written. * - * Note that this buffer will not in general be initialized - * to any particular value. Thus the serialize function may - * not assume any initial value and must set each byte in - * the buffer. + * Note that this buffer will not in general be initialized + * to any particular value. Thus the serialize function may + * not assume any initial value and must set each byte in + * the buffer. * - * len: Length in bytes of the in file image of the entry to be - * serialized. Also the size of *image_ptr (below). + * len: Length in bytes of the in file image of the entry to be + * serialized. Also the size of *image_ptr (below). * - * This parameter is supplied mainly for sanity checking. - * Sanity checks should be performed when compiled in debug - * mode, but the parameter may be unused when compiled in - * production mode. + * This parameter is supplied mainly for sanity checking. + * Sanity checks should be performed when compiled in debug + * mode, but the parameter may be unused when compiled in + * production mode. * - * thing: Pointer to void containing the address of the in core - * representation of the target metadata cache entry. - * This is the same pointer returned by a protect of the - * addr and len given above. + * thing: Pointer to void containing the address of the in core + * representation of the target metadata cache entry. + * This is the same pointer returned by a protect of the + * addr and len given above. * - * Processing in the serialize function should proceed as follows: + * Processing in the serialize function should proceed as follows: * - * If there are any remaining changes to the entry required before - * write to disk, they must be dealt with first. + * If there are any remaining changes to the entry required before + * write to disk, they must be dealt with first. * - * The serialize function must then examine the in core - * representation indicated by the thing parameter, and write a - * serialized image of its contents into the provided buffer. + * The serialize function must then examine the in core + * representation indicated by the thing parameter, and write a + * serialized image of its contents into the provided buffer. * - * If it is successful, the function must return SUCCEED. + * If it is successful, the function must return SUCCEED. * - * If it fails for any reason, the function must return FAIL and - * push error information on the error stack with the error API - * routines. + * If it fails for any reason, the function must return FAIL and + * push error information on the error stack with the error API + * routines. * * * NOTIFY: Pointer to the notify callback. @@ -722,98 +724,98 @@ typedef struct H5C_t H5C_t; * action on an entry has taken/will take place and the client indicates * it wishes to be notified about the action. * - * The typedef for the notify callback is as follows: + * The typedef for the notify callback is as follows: * - * typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action, + * typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action, * void *thing); * - * The parameters of the notify callback are as follows: + * The parameters of the notify callback are as follows: * - * action: An enum indicating the metadata cache action that has taken/ + * action: An enum indicating the metadata cache action that has taken/ * will take place. * - * thing: Pointer to void containing the address of the in core - * representation of the target metadata cache entry. This - * is the same pointer that would be returned by a protect - * of the addr and len of the entry. + * thing: Pointer to void containing the address of the in core + * representation of the target metadata cache entry. This + * is the same pointer that would be returned by a protect + * of the addr and len of the entry. * - * Processing in the notify function should proceed as follows: + * Processing in the notify function should proceed as follows: * - * The notify function may perform any action it would like, including + * The notify function may perform any action it would like, including * metadata cache calls. * - * If the function is successful, it must return SUCCEED. + * If the function is successful, it must return SUCCEED. * - * If it fails for any reason, the function must return FAIL and - * push error information on the error stack with the error API - * routines. + * If it fails for any reason, the function must return FAIL and + * push error information on the error stack with the error API + * routines. * * * FREE_ICR: Pointer to the free ICR callback. * - * The free ICR callback is invoked by the metadata cache when it - * wishes to evict an entry, and needs the client to free the memory - * allocated for the in core representation. + * The free ICR callback is invoked by the metadata cache when it + * wishes to evict an entry, and needs the client to free the memory + * allocated for the in core representation. * - * The typedef for the free ICR callback is as follows: + * The typedef for the free ICR callback is as follows: * - * typedef herr_t (*H5C_free_icr_func_t)(void * thing)); + * typedef herr_t (*H5C_free_icr_func_t)(void * thing)); * - * The parameters of the free ICR callback are as follows: + * The parameters of the free ICR callback are as follows: * - * thing: Pointer to void containing the address of the in core - * representation of the target metadata cache entry. This - * is the same pointer that would be returned by a protect - * of the addr and len of the entry. + * thing: Pointer to void containing the address of the in core + * representation of the target metadata cache entry. This + * is the same pointer that would be returned by a protect + * of the addr and len of the entry. * - * Processing in the free ICR function should proceed as follows: + * Processing in the free ICR function should proceed as follows: * - * The free ICR function must free all memory allocated to the - * in core representation. + * The free ICR function must free all memory allocated to the + * in core representation. * - * If the function is successful, it must return SUCCEED. + * If the function is successful, it must return SUCCEED. * - * If it fails for any reason, the function must return FAIL and - * push error information on the error stack with the error API - * routines. + * If it fails for any reason, the function must return FAIL and + * push error information on the error stack with the error API + * routines. * - * At least when compiled with debug, it would be useful if the - * free ICR call would fail if the in core representation has been - * modified since the last serialize callback. + * At least when compiled with debug, it would be useful if the + * free ICR call would fail if the in core representation has been + * modified since the last serialize callback. * * GET_FSF_SIZE: Pointer to the get file space free size callback. * - * In principle, there is no need for the get file space free size - * callback. However, as an optimization, it is sometimes convenient - * to allocate and free file space for a number of cache entries - * simultaneously in a single contiguous block of file space. + * In principle, there is no need for the get file space free size + * callback. However, as an optimization, it is sometimes convenient + * to allocate and free file space for a number of cache entries + * simultaneously in a single contiguous block of file space. * - * File space allocation is done by the client, so the metadata cache - * need not be involved. However, since the metadata cache typically + * File space allocation is done by the client, so the metadata cache + * need not be involved. However, since the metadata cache typically * handles file space release when an entry is destroyed, some - * adjustment on the part of the metadata cache is required for this - * operation. + * adjustment on the part of the metadata cache is required for this + * operation. * * The get file space free size callback exists to support this - * operation. + * operation. * - * If a group of cache entries that were allocated as a group are to - * be discarded and their file space released, the type of the first - * (i.e. lowest address) entry in the group must implement the - * get free file space size callback. + * If a group of cache entries that were allocated as a group are to + * be discarded and their file space released, the type of the first + * (i.e. lowest address) entry in the group must implement the + * get free file space size callback. * - * To free the file space of all entries in the group in a single - * operation, first expunge all entries other than the first without - * the free file space flag. + * To free the file space of all entries in the group in a single + * operation, first expunge all entries other than the first without + * the free file space flag. * - * Then, to complete the operation, unprotect or expunge the first - * entry in the block with the free file space flag set. Since - * the get free file space callback is implemented, the metadata - * cache will use this callback to get the size of the block to be - * freed, instead of using the size of the entry as is done otherwise. + * Then, to complete the operation, unprotect or expunge the first + * entry in the block with the free file space flag set. Since + * the get free file space callback is implemented, the metadata + * cache will use this callback to get the size of the block to be + * freed, instead of using the size of the entry as is done otherwise. * - * At present this callback is used only by the H5FA and H5EA dblock - * and dblock page client classes. + * At present this callback is used only by the H5FA and H5EA dblock + * and dblock page client classes. * * The typedef for the get_fsf_size callback is as follows: * @@ -827,15 +829,15 @@ typedef struct H5C_t H5C_t; * is the same pointer that would be returned by a protect() * call of the associated addr and len. * - * fs_size_ptr: Pointer to hsize_t in which the callback will return + * fs_size_ptr: Pointer to hsize_t in which the callback will return * the size of the piece of file space to be freed. Note - * that the space to be freed is presumed to have the same - * base address as the cache entry. + * that the space to be freed is presumed to have the same + * base address as the cache entry. * * The function simply returns the size of the block of file space - * to be freed in *fsf_size_ptr. + * to be freed in *fsf_size_ptr. * - * If the function is successful, it must return SUCCEED. + * If the function is successful, it must return SUCCEED. * * If it fails for any reason, the function must return FAIL and * push error information on the error stack with the error API @@ -848,11 +850,11 @@ typedef enum H5C_notify_action_t { H5C_NOTIFY_ACTION_AFTER_INSERT, /* Entry has been added to the cache * via the insert call */ - H5C_NOTIFY_ACTION_AFTER_LOAD, /* Entry has been loaded into the + H5C_NOTIFY_ACTION_AFTER_LOAD, /* Entry has been loaded into the * from file via the protect call */ - H5C_NOTIFY_ACTION_AFTER_FLUSH, /* Entry has just been flushed to - * file. + H5C_NOTIFY_ACTION_AFTER_FLUSH, /* Entry has just been flushed to + * file. */ H5C_NOTIFY_ACTION_BEFORE_EVICT, /* Entry is about to be evicted * from cache. @@ -883,20 +885,20 @@ typedef herr_t (*H5C_get_fsf_size_t)(const void * thing, hsize_t *fsf_size_ptr); /* Metadata cache client class definition */ typedef struct H5C_class_t { - int id; - const char * name; - H5FD_mem_t mem_type; - unsigned flags; - H5C_get_initial_load_size_func_t get_initial_load_size; - H5C_get_final_load_size_func_t get_final_load_size; - H5C_verify_chksum_func_t verify_chksum; - H5C_deserialize_func_t deserialize; - H5C_image_len_func_t image_len; - H5C_pre_serialize_func_t pre_serialize; - H5C_serialize_func_t serialize; - H5C_notify_func_t notify; - H5C_free_icr_func_t free_icr; - H5C_get_fsf_size_t fsf_size; + int id; + const char * name; + H5FD_mem_t mem_type; + unsigned flags; + H5C_get_initial_load_size_func_t get_initial_load_size; + H5C_get_final_load_size_func_t get_final_load_size; + H5C_verify_chksum_func_t verify_chksum; + H5C_deserialize_func_t deserialize; + H5C_image_len_func_t image_len; + H5C_pre_serialize_func_t pre_serialize; + H5C_serialize_func_t serialize; + H5C_notify_func_t notify; + H5C_free_icr_func_t free_icr; + H5C_get_fsf_size_t fsf_size; } H5C_class_t; /* Type definitions of callback functions used by the cache as a whole */ @@ -978,9 +980,9 @@ typedef int H5C_ring_t; * * The fields of this structure are discussed individually below: * - * JRM - 4/26/04 + * JRM - 4/26/04 * - * magic: Unsigned 32 bit integer that must always be set to + * magic: Unsigned 32 bit integer that must always be set to * H5C__H5C_CACHE_ENTRY_T_MAGIC when the entry is valid. * The field must be set to H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC * just before the entry is freed. @@ -999,129 +1001,129 @@ typedef int H5C_ring_t; * detect this case, and re-start its scan from the bottom * of the LRU when this situation occurs. * - * cache_ptr: Pointer to the cache that this entry is contained within. + * cache_ptr: Pointer to the cache that this entry is contained within. * - * addr: Base address of the cache entry on disk. + * addr: Base address of the cache entry on disk. * - * size: Length of the cache entry on disk in bytes Note that unlike + * size: Length of the cache entry on disk in bytes Note that unlike * normal caches, the entries in this cache are of arbitrary size. * - * The file space allocations for cache entries implied by the + * The file space allocations for cache entries implied by the * addr and size fields must be disjoint. * - * image_ptr: Pointer to void. When not NULL, this field points to a - * dynamically allocated block of size bytes in which the - * on disk image of the metadata cache entry is stored. + * image_ptr: Pointer to void. When not NULL, this field points to a + * dynamically allocated block of size bytes in which the + * on disk image of the metadata cache entry is stored. * - * If the entry is dirty, the pre-serialize and serialize - * callbacks must be used to update this image before it is - * written to disk + * If the entry is dirty, the pre-serialize and serialize + * callbacks must be used to update this image before it is + * written to disk * * image_up_to_date: Boolean flag that is set to TRUE when *image_ptr - * is up to date, and set to false when the entry is dirtied. + * is up to date, and set to false when the entry is dirtied. * - * type: Pointer to the instance of H5C_class_t containing pointers - * to the methods for cache entries of the current type. This - * field should be NULL when the instance of H5C_cache_entry_t - * is not in use. + * type: Pointer to the instance of H5C_class_t containing pointers + * to the methods for cache entries of the current type. This + * field should be NULL when the instance of H5C_cache_entry_t + * is not in use. * - * The name is not particularly descriptive, but is retained - * to avoid changes in existing code. + * The name is not particularly descriptive, but is retained + * to avoid changes in existing code. * - * is_dirty: Boolean flag indicating whether the contents of the cache - * entry has been modified since the last time it was written - * to disk. + * is_dirty: Boolean flag indicating whether the contents of the cache + * entry has been modified since the last time it was written + * to disk. * - * dirtied: Boolean flag used to indicate that the entry has been - * dirtied while protected. + * dirtied: Boolean flag used to indicate that the entry has been + * dirtied while protected. * - * This field is set to FALSE in the protect call, and may - * be set to TRUE by the H5C_mark_entry_dirty() call at any - * time prior to the unprotect call. + * This field is set to FALSE in the protect call, and may + * be set to TRUE by the H5C_mark_entry_dirty() call at any + * time prior to the unprotect call. * - * The H5C_mark_entry_dirty() call exists as a convenience - * function for the fractal heap code which may not know if - * an entry is protected or pinned, but knows that is either - * protected or pinned. The dirtied field was added as in - * the parallel case, it is necessary to know whether a - * protected entry is dirty prior to the protect call. + * The H5C_mark_entry_dirty() call exists as a convenience + * function for the fractal heap code which may not know if + * an entry is protected or pinned, but knows that is either + * protected or pinned. The dirtied field was added as in + * the parallel case, it is necessary to know whether a + * protected entry is dirty prior to the protect call. * * is_protected: Boolean flag indicating whether this entry is protected - * (or locked, to use more conventional terms). When it is - * protected, the entry cannot be flushed or accessed until - * it is unprotected (or unlocked -- again to use more - * conventional terms). + * (or locked, to use more conventional terms). When it is + * protected, the entry cannot be flushed or accessed until + * it is unprotected (or unlocked -- again to use more + * conventional terms). * - * Note that protected entries are removed from the LRU lists - * and inserted on the protected list. + * Note that protected entries are removed from the LRU lists + * and inserted on the protected list. * * is_read_only: Boolean flag that is only meaningful if is_protected is - * TRUE. In this circumstance, it indicates whether the - * entry has been protected read-only, or read/write. + * TRUE. In this circumstance, it indicates whether the + * entry has been protected read-only, or read/write. * - * If the entry has been protected read-only (i.e. is_protected - * and is_read_only are both TRUE), we allow the entry to be - * protected more than once. + * If the entry has been protected read-only (i.e. is_protected + * and is_read_only are both TRUE), we allow the entry to be + * protected more than once. * - * In this case, the number of readers is maintained in the - * ro_ref_count field (see below), and unprotect calls simply - * decrement that field until it drops to zero, at which point - * the entry is actually unprotected. + * In this case, the number of readers is maintained in the + * ro_ref_count field (see below), and unprotect calls simply + * decrement that field until it drops to zero, at which point + * the entry is actually unprotected. * * ro_ref_count: Integer field used to maintain a count of the number of - * outstanding read-only protects on this entry. This field - * must be zero whenever either is_protected or is_read_only - * are TRUE. + * outstanding read-only protects on this entry. This field + * must be zero whenever either is_protected or is_read_only + * are TRUE. * - * is_pinned: Boolean flag indicating whether the entry has been pinned - * in the cache. + * is_pinned: Boolean flag indicating whether the entry has been pinned + * in the cache. * - * For very hot entries, the protect / unprotect overhead - * can become excessive. Thus the cache has been extended - * to allow an entry to be "pinned" in the cache. + * For very hot entries, the protect / unprotect overhead + * can become excessive. Thus the cache has been extended + * to allow an entry to be "pinned" in the cache. * - * Pinning an entry in the cache has several implications: + * Pinning an entry in the cache has several implications: * - * 1) A pinned entry cannot be evicted. Thus unprotected - * pinned entries must be stored in the pinned entry - * list, instead of being managed by the replacement - * policy code (LRU at present). + * 1) A pinned entry cannot be evicted. Thus unprotected + * pinned entries must be stored in the pinned entry + * list, instead of being managed by the replacement + * policy code (LRU at present). * - * 2) A pinned entry can be accessed or modified at any time. - * This places an extra burden on the pre-serialize and - * serialize callbacks, which must ensure that a pinned - * entry is consistent and ready to write to disk before - * generating an image. + * 2) A pinned entry can be accessed or modified at any time. + * This places an extra burden on the pre-serialize and + * serialize callbacks, which must ensure that a pinned + * entry is consistent and ready to write to disk before + * generating an image. * - * 3) A pinned entry can be marked as dirty (and possibly - * change size) while it is unprotected. + * 3) A pinned entry can be marked as dirty (and possibly + * change size) while it is unprotected. * - * 4) The flush-destroy code must allow pinned entries to - * be unpinned (and possibly unprotected) during the - * flush. + * 4) The flush-destroy code must allow pinned entries to + * be unpinned (and possibly unprotected) during the + * flush. * - * JRM -- 3/16/06 + * JRM -- 3/16/06 * - * in_slist: Boolean flag indicating whether the entry is in the skip list - * As a general rule, entries are placed in the list when they + * in_slist: Boolean flag indicating whether the entry is in the skip list + * As a general rule, entries are placed in the list when they * are marked dirty. However they may remain in the list after * being flushed. * * Update: Dirty entries are now removed from the skip list - * when they are flushed. + * when they are flushed. * * flush_marker: Boolean flag indicating that the entry is to be flushed - * the next time H5C_flush_cache() is called with the - * H5C__FLUSH_MARKED_ENTRIES_FLAG. The flag is reset when - * the entry is flushed for whatever reason. + * the next time H5C_flush_cache() is called with the + * H5C__FLUSH_MARKED_ENTRIES_FLAG. The flag is reset when + * the entry is flushed for whatever reason. * * flush_me_last: Boolean flag indicating that this entry should not be - * flushed from the cache until all other entries without + * flushed from the cache until all other entries without * the flush_me_last flag set have been flushed. * - * Note: + * Note: * - * At this time, the flush_me_last + * At this time, the flush_me_last * flag will only be applied to one entry, the superblock, * and the code utilizing these flags is protected with HDasserts * to enforce this. This restraint can certainly be relaxed in @@ -1130,37 +1132,37 @@ typedef int H5C_ring_t; * will need to be expanded and tested appropriately if that * functionality is desired. * - * Update: There are now two possible last entries - * (superblock and file driver info message). This - * number will probably increase as we add superblock - * messages. JRM -- 11/18/14 + * Update: There are now two possible last entries + * (superblock and file driver info message). This + * number will probably increase as we add superblock + * messages. JRM -- 11/18/14 * * clear_on_unprotect: Boolean flag used only in PHDF5. When H5C is used - * to implement the metadata cache In the parallel case, only - * the cache with mpi rank 0 is allowed to actually write to - * file -- all other caches must retain dirty entries until they - * are advised that the entry is clean. + * to implement the metadata cache In the parallel case, only + * the cache with mpi rank 0 is allowed to actually write to + * file -- all other caches must retain dirty entries until they + * are advised that the entry is clean. * - * This flag is used in the case that such an advisory is - * received when the entry is protected. If it is set when an - * entry is unprotected, and the dirtied flag is not set in - * the unprotect, the entry's is_dirty flag is reset by flushing - * it with the H5C__FLUSH_CLEAR_ONLY_FLAG. + * This flag is used in the case that such an advisory is + * received when the entry is protected. If it is set when an + * entry is unprotected, and the dirtied flag is not set in + * the unprotect, the entry's is_dirty flag is reset by flushing + * it with the H5C__FLUSH_CLEAR_ONLY_FLAG. * * flush_immediately: Boolean flag used only in Phdf5 -- and then only - * for H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED. + * for H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED. * - * When a distributed metadata write is triggered at a - * sync point, this field is used to mark entries that - * must be flushed before leaving the sync point. At all - * other times, this field should be set to FALSE. + * When a distributed metadata write is triggered at a + * sync point, this field is used to mark entries that + * must be flushed before leaving the sync point. At all + * other times, this field should be set to FALSE. * * flush_in_progress: Boolean flag that is set to true iff the entry - * is in the process of being flushed. This allows the cache - * to detect when a call is the result of a flush callback. + * is in the process of being flushed. This allows the cache + * to detect when a call is the result of a flush callback. * * destroy_in_progress: Boolean flag that is set to true iff the entry - * is in the process of being flushed and destroyed. + * is in the process of being flushed and destroyed. * * * Fields supporting rings for flush ordering: @@ -1178,8 +1180,8 @@ typedef int H5C_ring_t; * within rings. Unlike rings, flush dependencies are applied to ALL * writes, not just those triggered by flush or serialize calls. * - * ring: Instance of H5C_ring_t indicating the ring to which this - * entry is assigned. + * ring: Instance of H5C_ring_t indicating the ring to which this + * entry is assigned. * * * Fields supporting the 'flush dependency' feature: @@ -1209,18 +1211,18 @@ typedef int H5C_ring_t; * this field is nonzero, then this entry cannot be flushed. * * flush_dep_nunser_children: Number of flush dependency children - * that are either unserialized, or have a non-zero number of - * positive number of unserialized children. + * that are either unserialized, or have a non-zero number of + * positive number of unserialized children. * - * Note that since there is no requirement that a clean entry - * be serialized, it is possible that flush_dep_nunser_children - * to be greater than flush_dep_ndirty_children. + * Note that since there is no requirement that a clean entry + * be serialized, it is possible that flush_dep_nunser_children + * to be greater than flush_dep_ndirty_children. * - * This field exist to facilitate correct ordering of entry - * serializations when it is necessary to serialize all the - * entries in the metadata cache. Thus in the cache - * serialization, no entry can be serialized unless this - * field contains 0. + * This field exist to facilitate correct ordering of entry + * serializations when it is necessary to serialize all the + * entries in the metadata cache. Thus in the cache + * serialization, no entry can be serialized unless this + * field contains 0. * * Fields supporting the hash table: * @@ -1237,25 +1239,25 @@ typedef int H5C_ring_t; * The il_next and il_prev fields discussed below were added to support * the index list. * - * ht_next: Next pointer used by the hash table to store multiple - * entries in a single hash bin. This field points to the - * next entry in the doubly linked list of entries in the - * hash bin, or NULL if there is no next entry. + * ht_next: Next pointer used by the hash table to store multiple + * entries in a single hash bin. This field points to the + * next entry in the doubly linked list of entries in the + * hash bin, or NULL if there is no next entry. * * ht_prev: Prev pointer used by the hash table to store multiple * entries in a single hash bin. This field points to the * previous entry in the doubly linked list of entries in - * the hash bin, or NULL if there is no previuos entry. + * the hash bin, or NULL if there is no previuos entry. * - * il_next: Next pointer used by the index to maintain a doubly linked - * list of all entries in the index (and thus in the cache). - * This field contains a pointer to the next entry in the - * index list, or NULL if there is no next entry. + * il_next: Next pointer used by the index to maintain a doubly linked + * list of all entries in the index (and thus in the cache). + * This field contains a pointer to the next entry in the + * index list, or NULL if there is no next entry. * - * il_prev: Prev pointer used by the index to maintain a doubly linked - * list of all entries in the index (and thus in the cache). - * This field contains a pointer to the previous entry in the - * index list, or NULL if there is no previous entry. + * il_prev: Prev pointer used by the index to maintain a doubly linked + * list of all entries in the index (and thus in the cache). + * This field contains a pointer to the previous entry in the + * index list, or NULL if there is no previous entry. * * * Fields supporting replacement policies: @@ -1292,43 +1294,43 @@ typedef int H5C_ring_t; * The use of the replacement policy fields under the Modified LRU policy * is discussed below: * - * next: Next pointer in either the LRU, the protected list, or - * the pinned list depending on the current values of - * is_protected and is_pinned. If there is no next entry - * on the list, this field should be set to NULL. + * next: Next pointer in either the LRU, the protected list, or + * the pinned list depending on the current values of + * is_protected and is_pinned. If there is no next entry + * on the list, this field should be set to NULL. * - * prev: Prev pointer in either the LRU, the protected list, - * or the pinned list depending on the current values of - * is_protected and is_pinned. If there is no previous - * entry on the list, this field should be set to NULL. + * prev: Prev pointer in either the LRU, the protected list, + * or the pinned list depending on the current values of + * is_protected and is_pinned. If there is no previous + * entry on the list, this field should be set to NULL. * - * aux_next: Next pointer on either the clean or dirty LRU lists. - * This entry should be NULL when either is_protected or - * is_pinned is true. + * aux_next: Next pointer on either the clean or dirty LRU lists. + * This entry should be NULL when either is_protected or + * is_pinned is true. * - * When is_protected and is_pinned are false, and is_dirty is - * true, it should point to the next item on the dirty LRU - * list. + * When is_protected and is_pinned are false, and is_dirty is + * true, it should point to the next item on the dirty LRU + * list. * - * When is_protected and is_pinned are false, and is_dirty is - * false, it should point to the next item on the clean LRU - * list. In either case, when there is no next item, it - * should be NULL. + * When is_protected and is_pinned are false, and is_dirty is + * false, it should point to the next item on the clean LRU + * list. In either case, when there is no next item, it + * should be NULL. * - * aux_prev: Previous pointer on either the clean or dirty LRU lists. - * This entry should be NULL when either is_protected or - * is_pinned is true. + * aux_prev: Previous pointer on either the clean or dirty LRU lists. + * This entry should be NULL when either is_protected or + * is_pinned is true. * - * When is_protected and is_pinned are false, and is_dirty is - * true, it should point to the previous item on the dirty - * LRU list. + * When is_protected and is_pinned are false, and is_dirty is + * true, it should point to the previous item on the dirty + * LRU list. * - * When is_protected and is_pinned are false, and is_dirty - * is false, it should point to the previous item on the - * clean LRU list. + * When is_protected and is_pinned are false, and is_dirty + * is false, it should point to the previous item on the + * clean LRU list. * - * In either case, when there is no previous item, it should - * be NULL. + * In either case, when there is no previous item, it should + * be NULL. * * Fields supporting the cache image feature: * @@ -1344,170 +1346,170 @@ typedef int H5C_ring_t; * further details. * * include_in_image: Boolean flag indicating whether this entry should - * be included in the metadata cache image. This field should - * always be false prior to the H5C_prep_for_file_close() call. - * During that call, it should be set to TRUE for all entries - * that are to be included in the metadata cache image. At - * present, only the superblock, the superblock extension - * object header and its chunks (if any) are omitted from - * the image. + * be included in the metadata cache image. This field should + * always be false prior to the H5C_prep_for_file_close() call. + * During that call, it should be set to TRUE for all entries + * that are to be included in the metadata cache image. At + * present, only the superblock, the superblock extension + * object header and its chunks (if any) are omitted from + * the image. * - * lru_rank: Rank of the entry in the LRU just prior to file close. + * lru_rank: Rank of the entry in the LRU just prior to file close. * - * Note that the first entry on the LRU has lru_rank 1, - * and that entries not on the LRU at that time will have - * either lru_rank -1 (if pinned) or 0 (if loaded during - * the process of flushing the cache. + * Note that the first entry on the LRU has lru_rank 1, + * and that entries not on the LRU at that time will have + * either lru_rank -1 (if pinned) or 0 (if loaded during + * the process of flushing the cache. * * image_dirty: Boolean flag indicating whether the entry should be marked - * as dirty in the metadata cache image. The flag is set to - * TRUE iff the entry is dirty when H5C_prep_for_file_close() - * is called. + * as dirty in the metadata cache image. The flag is set to + * TRUE iff the entry is dirty when H5C_prep_for_file_close() + * is called. * * fd_parent_count: If the entry is a child in one or more flush dependency - * relationships, this field contains the number of flush - * dependency parents. + * relationships, this field contains the number of flush + * dependency parents. * - * In all other cases, the field is set to zero. + * In all other cases, the field is set to zero. * - * Note that while this count is initially taken from the - * flush dependency fields above, if the entry is in the - * cache image (i.e. include_in_image is TRUE), any parents - * that are not in the image are removed from this count and - * from the fd_parent_addrs array below. + * Note that while this count is initially taken from the + * flush dependency fields above, if the entry is in the + * cache image (i.e. include_in_image is TRUE), any parents + * that are not in the image are removed from this count and + * from the fd_parent_addrs array below. * - * Finally observe that if the entry is dirty and in the - * cache image, and its parent is dirty and not in the cache - * image, then the entry must be removed from the cache image - * to avoid violating the flush dependency flush ordering. + * Finally observe that if the entry is dirty and in the + * cache image, and its parent is dirty and not in the cache + * image, then the entry must be removed from the cache image + * to avoid violating the flush dependency flush ordering. * * fd_parent_addrs: If the entry is a child in one or more flush dependency - * relationship when H5C_prep_for_file_close() is called, this - * field must contain a pointer to an array of size - * fd_parent_count containing the on disk addresses of the - * parent. + * relationship when H5C_prep_for_file_close() is called, this + * field must contain a pointer to an array of size + * fd_parent_count containing the on disk addresses of the + * parent. * - * In all other cases, the field is set to NULL. + * In all other cases, the field is set to NULL. * - * Note that while this list of addresses is initially taken - * from the flush dependency fields above, if the entry is in the - * cache image (i.e. include_in_image is TRUE), any parents - * that are not in the image are removed from this list, and - * and from the fd_parent_count above. + * Note that while this list of addresses is initially taken + * from the flush dependency fields above, if the entry is in the + * cache image (i.e. include_in_image is TRUE), any parents + * that are not in the image are removed from this list, and + * and from the fd_parent_count above. * - * Finally observe that if the entry is dirty and in the - * cache image, and its parent is dirty and not in the cache - * image, then the entry must be removed from the cache image - * to avoid violating the flush dependency flush ordering. + * Finally observe that if the entry is dirty and in the + * cache image, and its parent is dirty and not in the cache + * image, then the entry must be removed from the cache image + * to avoid violating the flush dependency flush ordering. * * fd_child_count: If the entry is a parent in a flush dependency - * relationship, this field contains the number of flush - * dependency children. + * relationship, this field contains the number of flush + * dependency children. * - * In all other cases, the field is set to zero. + * In all other cases, the field is set to zero. * - * Note that while this count is initially taken from the - * flush dependency fields above, if the entry is in the - * cache image (i.e. include_in_image is TRUE), any children - * that are not in the image are removed from this count. + * Note that while this count is initially taken from the + * flush dependency fields above, if the entry is in the + * cache image (i.e. include_in_image is TRUE), any children + * that are not in the image are removed from this count. * * fd_dirty_child_count: If the entry is a parent in a flush dependency - * relationship, this field contains the number of dirty flush - * dependency children. + * relationship, this field contains the number of dirty flush + * dependency children. * - * In all other cases, the field is set to zero. + * In all other cases, the field is set to zero. * - * Note that while this count is initially taken from the - * flush dependency fields above, if the entry is in the - * cache image (i.e. include_in_image is TRUE), any dirty - * children that are not in the image are removed from this - * count. + * Note that while this count is initially taken from the + * flush dependency fields above, if the entry is in the + * cache image (i.e. include_in_image is TRUE), any dirty + * children that are not in the image are removed from this + * count. * * image_fd_height: Flush dependency height of the entry in the cache image. * - * The flush dependency height of any entry involved in a - * flush dependency relationship is defined to be the - * longest flush dependency path from that entry to an entry - * with no flush dependency children. - * - * Since the image_fd_height is used to order entries in the - * cache image so that fd parents preceed fd children, for - * purposes of this field, and entry is at flush dependency - * level 0 if it either has no children, or if all of its - * children are not in the cache image. - * - * Note that if a child in a flush dependency relationship is - * dirty and in the cache image, and its parent is dirty and - * not in the cache image, then the child must be excluded - * from the cache image to maintain flush ordering. - * - * prefetched: Boolean flag indicating that the on disk image of the entry - * has been loaded into the cache prior any request for the - * entry by the rest of the library. - * - * As of this writing (8/10/15), this can only happen through - * the load of a cache image block, although other scenarios - * are contemplated for the use of this feature. Note that - * unlike the usual prefetch situation, this means that a - * prefetched entry can be dirty, and/or can be a party to - * flush dependency relationship(s). This complicates matters - * somewhat. - * - * The essential feature of a prefetched entry is that it - * consists only of a buffer containing the on disk image of - * the entry. Thus it must be deserialized before it can - * be passed back to the library on a protect call. This - * task is handled by H5C_deserialized_prefetched_entry(). - * In essence, this routine calls the deserialize callback - * provided in the protect call with the on disk image, - * deletes the prefetched entry from the cache, and replaces - * it with the deserialized entry returned by the deserialize - * callback. - * - * Further, if the prefetched entry is a flush dependency parent, - * all its flush dependency children (which must also be - * prefetched entries), must be transferred to the new cache - * entry returned by the deserialization callback. - * - * Finally, if the prefetched entry is a flush dependency child, - * this flush dependency must be destroyed prior to the - * deserialize call. - * - * In addition to the above special processing on the first - * protect call on a prefetched entry (after which is no longer - * a prefetched entry), prefetched entries also require special - * tretment on flush and evict. - * - * On flush, a dirty prefetched entry must simply be written - * to disk and marked clean without any call to any client - * callback. - * - * On eviction, if a prefetched entry is a flush dependency - * child, that flush dependency relationship must be destroyed - * just prior to the eviction. If the flush dependency code - * is working properly, it should be impossible for any entry - * that is a flush dependency parent to be evicted. + * The flush dependency height of any entry involved in a + * flush dependency relationship is defined to be the + * longest flush dependency path from that entry to an entry + * with no flush dependency children. + * + * Since the image_fd_height is used to order entries in the + * cache image so that fd parents preceed fd children, for + * purposes of this field, and entry is at flush dependency + * level 0 if it either has no children, or if all of its + * children are not in the cache image. + * + * Note that if a child in a flush dependency relationship is + * dirty and in the cache image, and its parent is dirty and + * not in the cache image, then the child must be excluded + * from the cache image to maintain flush ordering. + * + * prefetched: Boolean flag indicating that the on disk image of the entry + * has been loaded into the cache prior any request for the + * entry by the rest of the library. + * + * As of this writing (8/10/15), this can only happen through + * the load of a cache image block, although other scenarios + * are contemplated for the use of this feature. Note that + * unlike the usual prefetch situation, this means that a + * prefetched entry can be dirty, and/or can be a party to + * flush dependency relationship(s). This complicates matters + * somewhat. + * + * The essential feature of a prefetched entry is that it + * consists only of a buffer containing the on disk image of + * the entry. Thus it must be deserialized before it can + * be passed back to the library on a protect call. This + * task is handled by H5C_deserialized_prefetched_entry(). + * In essence, this routine calls the deserialize callback + * provided in the protect call with the on disk image, + * deletes the prefetched entry from the cache, and replaces + * it with the deserialized entry returned by the deserialize + * callback. + * + * Further, if the prefetched entry is a flush dependency parent, + * all its flush dependency children (which must also be + * prefetched entries), must be transferred to the new cache + * entry returned by the deserialization callback. + * + * Finally, if the prefetched entry is a flush dependency child, + * this flush dependency must be destroyed prior to the + * deserialize call. + * + * In addition to the above special processing on the first + * protect call on a prefetched entry (after which is no longer + * a prefetched entry), prefetched entries also require special + * tretment on flush and evict. + * + * On flush, a dirty prefetched entry must simply be written + * to disk and marked clean without any call to any client + * callback. + * + * On eviction, if a prefetched entry is a flush dependency + * child, that flush dependency relationship must be destroyed + * just prior to the eviction. If the flush dependency code + * is working properly, it should be impossible for any entry + * that is a flush dependency parent to be evicted. * * prefetch_type_id: Integer field containing the type ID of the prefetched - * entry. This ID must match the ID of the type provided in any - * protect call on the prefetched entry. + * entry. This ID must match the ID of the type provided in any + * protect call on the prefetched entry. * - * The value of this field is undefined in prefetched is FALSE. + * The value of this field is undefined in prefetched is FALSE. * - * age: Number of times a prefetched entry has appeared in - * subsequent cache images. The field exists to allow - * imposition of a limit on how many times a prefetched - * entry can appear in subsequent cache images without being - * converted to a regular entry. + * age: Number of times a prefetched entry has appeared in + * subsequent cache images. The field exists to allow + * imposition of a limit on how many times a prefetched + * entry can appear in subsequent cache images without being + * converted to a regular entry. * - * This field must be zero if prefetched is FALSE. + * This field must be zero if prefetched is FALSE. * * prefetched_dirty: Boolean field that must be set to FALSE unless the - * following conditions hold: + * following conditions hold: * - * 1) The file has been opened R/O. + * 1) The file has been opened R/O. * - * 2) The entry is either a prefetched entry, or was + * 2) The entry is either a prefetched entry, or was * re-constructed from a prefetched entry. * * 3) The base prefetched entry was marked dirty. @@ -1543,14 +1545,14 @@ typedef int H5C_ring_t; * we deal with this by disabling EOC in the R/O case. * * serialization_count: Integer field used to maintain a count of the - * number of times each entry is serialized during cache - * serialization. While no entry should be serialized more than - * once in any serialization call, throw an assertion if any - * flush depencency parent is serialized more than once during - * a single cache serialization. + * number of times each entry is serialized during cache + * serialization. While no entry should be serialized more than + * once in any serialization call, throw an assertion if any + * flush depencency parent is serialized more than once during + * a single cache serialization. * - * This is a debugging field, and thus is maintained only if - * NDEBUG is undefined. + * This is a debugging field, and thus is maintained only if + * NDEBUG is undefined. * * Fields supporting tagged entries: * @@ -1561,15 +1563,15 @@ typedef int H5C_ring_t; * not tagged. Tagged entries have a pointer to the tag info for the object, * which is shared state for all the entries for that object. * - * tl_next: Pointer to the next entry in the tag list for an object. - * NULL for the tail entry in the list, as well as untagged - * entries. + * tl_next: Pointer to the next entry in the tag list for an object. + * NULL for the tail entry in the list, as well as untagged + * entries. * - * tl_prev: Pointer to the previous entry in the tag list for an object. - * NULL for the head entry in the list, as well as untagged - * entries. + * tl_prev: Pointer to the previous entry in the tag list for an object. + * NULL for the head entry in the list, as well as untagged + * entries. * - * tag_info: Pointer to the common tag state for all entries belonging to + * tag_info: Pointer to the common tag state for all entries belonging to * an object. NULL for untagged entries. * * @@ -1579,43 +1581,43 @@ typedef int H5C_ring_t; * and H5C_COLLECT_CACHE_ENTRY_STATS are true. When present, they allow * collection of statistics on individual cache entries. * - * accesses: int32_t containing the number of times this cache entry has - * been referenced in its lifetime. + * accesses: int32_t containing the number of times this cache entry has + * been referenced in its lifetime. * - * clears: int32_t containing the number of times this cache entry has + * clears: int32_t containing the number of times this cache entry has * been cleared in its life time. * - * flushes: int32_t containing the number of times this cache entry has + * flushes: int32_t containing the number of times this cache entry has * been flushed to file in its life time. * - * pins: int32_t containing the number of times this cache entry has - * been pinned in cache in its life time. + * pins: int32_t containing the number of times this cache entry has + * been pinned in cache in its life time. * ****************************************************************************/ typedef struct H5C_cache_entry_t { - uint32_t magic; + uint32_t magic; H5C_t *cache_ptr; - haddr_t addr; - size_t size; - void *image_ptr; - hbool_t image_up_to_date; - const H5C_class_t *type; - hbool_t is_dirty; - hbool_t dirtied; - hbool_t is_protected; - hbool_t is_read_only; - int ro_ref_count; - hbool_t is_pinned; - hbool_t in_slist; - hbool_t flush_marker; + haddr_t addr; + size_t size; + void *image_ptr; + hbool_t image_up_to_date; + const H5C_class_t *type; + hbool_t is_dirty; + hbool_t dirtied; + hbool_t is_protected; + hbool_t is_read_only; + int ro_ref_count; + hbool_t is_pinned; + hbool_t in_slist; + hbool_t flush_marker; hbool_t flush_me_last; #ifdef H5_HAVE_PARALLEL - hbool_t clear_on_unprotect; - hbool_t flush_immediately; - hbool_t coll_access; + hbool_t clear_on_unprotect; + hbool_t flush_immediately; + hbool_t coll_access; #endif /* H5_HAVE_PARALLEL */ - hbool_t flush_in_progress; - hbool_t destroy_in_progress; + hbool_t flush_in_progress; + hbool_t destroy_in_progress; /* fields supporting rings for purposes of flush ordering */ H5C_ring_t ring; @@ -1627,8 +1629,8 @@ typedef struct H5C_cache_entry_t { unsigned flush_dep_nchildren; unsigned flush_dep_ndirty_children; unsigned flush_dep_nunser_children; - hbool_t pinned_from_client; - hbool_t pinned_from_cache; + hbool_t pinned_from_client; + hbool_t pinned_from_cache; /* fields supporting the hash table: */ struct H5C_cache_entry_t *ht_next; @@ -1660,9 +1662,9 @@ typedef struct H5C_cache_entry_t { hbool_t prefetched; int prefetch_type_id; int32_t age; - hbool_t prefetched_dirty; + hbool_t prefetched_dirty; -#ifndef NDEBUG /* debugging field */ +#ifndef NDEBUG /* debugging field */ int serialization_count; #endif /* NDEBUG */ @@ -1673,10 +1675,10 @@ typedef struct H5C_cache_entry_t { #if H5C_COLLECT_CACHE_ENTRY_STATS /* cache entry stats fields */ - int32_t accesses; - int32_t clears; - int32_t flushes; - int32_t pins; + int32_t accesses; + int32_t clears; + int32_t flushes; + int32_t pins; #endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ } H5C_cache_entry_t; @@ -1692,43 +1694,43 @@ typedef struct H5C_cache_entry_t { * * The fields of this structure are discussed individually below: * - * JRM - 8/5/15 + * JRM - 8/5/15 * - * magic: Unsigned 32 bit integer that must always be set to + * magic: Unsigned 32 bit integer that must always be set to * H5C_IMAGE_ENTRY_T_MAGIC when the entry is valid. * The field must be set to H5C_IMAGE_ENTRY_T_BAD_MAGIC * just before the entry is freed. * - * addr: Base address of the cache entry on disk. + * addr: Base address of the cache entry on disk. * - * size: Length of the cache entry on disk in bytes. + * size: Length of the cache entry on disk in bytes. * - * ring: Instance of H5C_ring_t indicating the flush ordering ring - * to which this entry is assigned. + * ring: Instance of H5C_ring_t indicating the flush ordering ring + * to which this entry is assigned. * - * age: Number of times this prefetech entry has appeared in - * the current sequence of cache images. This field is - * initialized to 0 if the instance of H5C_image_entry_t - * is constructed from a regular entry. + * age: Number of times this prefetech entry has appeared in + * the current sequence of cache images. This field is + * initialized to 0 if the instance of H5C_image_entry_t + * is constructed from a regular entry. * - * If the instance is constructed from a prefetched entry - * currently residing in the metadata cache, the field is - * set to 1 + the age of the prefetched entry, or to - * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX if that sum exceeds - * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX. + * If the instance is constructed from a prefetched entry + * currently residing in the metadata cache, the field is + * set to 1 + the age of the prefetched entry, or to + * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX if that sum exceeds + * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX. * - * type_id: Integer field containing the type ID of the entry. + * type_id: Integer field containing the type ID of the entry. * - * lru_rank: Rank of the entry in the LRU just prior to file close. + * lru_rank: Rank of the entry in the LRU just prior to file close. * - * Note that the first entry on the LRU has lru_rank 1, - * and that entries not on the LRU at that time will have - * either lru_rank -1 (if pinned) or 0 (if loaded during - * the process of flushing the cache. + * Note that the first entry on the LRU has lru_rank 1, + * and that entries not on the LRU at that time will have + * either lru_rank -1 (if pinned) or 0 (if loaded during + * the process of flushing the cache. * - * is_dirty: Boolean flag indicating whether the contents of the cache - * entry has been modified since the last time it was written - * to disk as a regular piece of metadata. + * is_dirty: Boolean flag indicating whether the contents of the cache + * entry has been modified since the last time it was written + * to disk as a regular piece of metadata. * * image_fd_height: Flush dependency height of the entry in the cache image. * @@ -1756,17 +1758,17 @@ typedef struct H5C_cache_entry_t { * * Note that while this count is initially taken from the * flush dependency fields in the associated instance of - * H5C_cache_entry_t, if the entry is in the cache image - * (i.e. include_in_image is TRUE), any parents that are - * not in the image are removed from this count and + * H5C_cache_entry_t, if the entry is in the cache image + * (i.e. include_in_image is TRUE), any parents that are + * not in the image are removed from this count and * from the fd_parent_addrs array below. * * Finally observe that if the entry is dirty and in the * cache image, and its parent is dirty and not in the cache * image, then the entry must be removed from the cache image * to avoid violating the flush dependency flush ordering. - * This should have happened before the construction of - * the instance of H5C_image_entry_t. + * This should have happened before the construction of + * the instance of H5C_image_entry_t. * * fd_parent_addrs: If the entry is a child in one or more flush dependency * relationship when H5C_prep_for_file_close() is called, this @@ -1779,27 +1781,27 @@ typedef struct H5C_cache_entry_t { * Note that while this list of addresses is initially taken * from the flush dependency fields in the associated instance of * H5C_cache_entry_t, if the entry is in the cache image - * (i.e. include_in_image is TRUE), any parents that are not - * in the image are removed from this list, and from the - * fd_parent_count above. + * (i.e. include_in_image is TRUE), any parents that are not + * in the image are removed from this list, and from the + * fd_parent_count above. * * Finally observe that if the entry is dirty and in the * cache image, and its parent is dirty and not in the cache * image, then the entry must be removed from the cache image * to avoid violating the flush dependency flush ordering. - * This should have happened before the construction of - * the instance of H5C_image_entry_t. + * This should have happened before the construction of + * the instance of H5C_image_entry_t. * * fd_child_count: If the entry is a parent in a flush dependency - * relationship, this field contains the number of flush - * dependency children. + * relationship, this field contains the number of flush + * dependency children. * - * In all other cases, the field is set to zero. + * In all other cases, the field is set to zero. * * Note that while this count is initially taken from the * flush dependency fields in the associated instance of * H5C_cache_entry_t, if the entry is in the cache image - * (i.e. include_in_image is TRUE), any children + * (i.e. include_in_image is TRUE), any children * that are not in the image are removed from this count. * * fd_dirty_child_count: If the entry is a parent in a flush dependency @@ -1811,16 +1813,16 @@ typedef struct H5C_cache_entry_t { * Note that while this count is initially taken from the * flush dependency fields in the associated instance of * H5C_cache_entry_t, if the entry is in the cache image - * (i.e. include_in_image is TRUE), any dirty children - * that are not in the image are removed from this count. + * (i.e. include_in_image is TRUE), any dirty children + * that are not in the image are removed from this count. * - * image_ptr: Pointer to void. When not NULL, this field points to a - * dynamically allocated block of size bytes in which the - * on disk image of the metadata cache entry is stored. + * image_ptr: Pointer to void. When not NULL, this field points to a + * dynamically allocated block of size bytes in which the + * on disk image of the metadata cache entry is stored. * - * If the entry is dirty, the pre-serialize and serialize - * callbacks must be used to update this image before it is - * written to disk + * If the entry is dirty, the pre-serialize and serialize + * callbacks must be used to update this image before it is + * written to disk * * ****************************************************************************/ @@ -1852,95 +1854,95 @@ typedef struct H5C_image_entry_t { * The fields of the structure are discussed individually below: * * version: Integer field containing the version number of this version - * of the H5C_auto_size_ctl_t structure. Any instance of - * H5C_auto_size_ctl_t passed to the cache must have a known - * version number, or an error will be flagged. + * of the H5C_auto_size_ctl_t structure. Any instance of + * H5C_auto_size_ctl_t passed to the cache must have a known + * version number, or an error will be flagged. * * report_fcn: Pointer to the function that is to be called to report * activities each time the auto cache resize code is executed. If the - * field is NULL, no call is made. + * field is NULL, no call is made. * - * If the field is not NULL, it must contain the address of a function - * of type H5C_auto_resize_report_fcn. + * If the field is not NULL, it must contain the address of a function + * of type H5C_auto_resize_report_fcn. * * set_initial_size: Boolean flag indicating whether the size of the - * initial size of the cache is to be set to the value given in - * the initial_size field. If set_initial_size is FALSE, the - * initial_size field is ignored. + * initial size of the cache is to be set to the value given in + * the initial_size field. If set_initial_size is FALSE, the + * initial_size field is ignored. * * initial_size: If enabled, this field contain the size the cache is - * to be set to upon receipt of this structure. Needless to say, - * initial_size must lie in the closed interval [min_size, max_size]. + * to be set to upon receipt of this structure. Needless to say, + * initial_size must lie in the closed interval [min_size, max_size]. * * min_clean_fraction: double in the range 0 to 1 indicating the fraction - * of the cache that is to be kept clean. This field is only used - * in parallel mode. Typical values are 0.1 to 0.5. + * of the cache that is to be kept clean. This field is only used + * in parallel mode. Typical values are 0.1 to 0.5. * * max_size: Maximum size to which the cache can be adjusted. The - * supplied value must fall in the closed interval - * [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, max_size must - * be greater than or equal to min_size. + * supplied value must fall in the closed interval + * [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, max_size must + * be greater than or equal to min_size. * * min_size: Minimum size to which the cache can be adjusted. The * supplied value must fall in the closed interval * [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, min_size must - * be less than or equal to max_size. + * be less than or equal to max_size. * * epoch_length: Number of accesses on the cache over which to collect - * hit rate stats before running the automatic cache resize code, + * hit rate stats before running the automatic cache resize code, * if it is enabled. * - * At the end of an epoch, we discard prior hit rate data and start - * collecting afresh. The epoch_length must lie in the closed - * interval [H5C__MIN_AR_EPOCH_LENGTH, H5C__MAX_AR_EPOCH_LENGTH]. + * At the end of an epoch, we discard prior hit rate data and start + * collecting afresh. The epoch_length must lie in the closed + * interval [H5C__MIN_AR_EPOCH_LENGTH, H5C__MAX_AR_EPOCH_LENGTH]. * * * Cache size increase control fields: * * incr_mode: Instance of the H5C_cache_incr_mode enumerated type whose - * value indicates how we determine whether the cache size should be - * increased. At present there are two possible values: + * value indicates how we determine whether the cache size should be + * increased. At present there are two possible values: * - * H5C_incr__off: Don't attempt to increase the size of the cache - * automatically. + * H5C_incr__off: Don't attempt to increase the size of the cache + * automatically. * - * When this increment mode is selected, the remaining fields - * in the cache size increase section ar ignored. + * When this increment mode is selected, the remaining fields + * in the cache size increase section ar ignored. * - * H5C_incr__threshold: Attempt to increase the size of the cache - * whenever the average hit rate over the last epoch drops - * below the value supplied in the lower_hr_threshold - * field. + * H5C_incr__threshold: Attempt to increase the size of the cache + * whenever the average hit rate over the last epoch drops + * below the value supplied in the lower_hr_threshold + * field. * - * Note that this attempt will fail if the cache is already - * at its maximum size, or if the cache is not already using - * all available space. + * Note that this attempt will fail if the cache is already + * at its maximum size, or if the cache is not already using + * all available space. * * lower_hr_threshold: Lower hit rate threshold. If the increment mode - * (incr_mode) is H5C_incr__threshold and the hit rate drops below the - * value supplied in this field in an epoch, increment the cache size by - * size_increment. Note that cache size may not be incremented above - * max_size, and that the increment may be further restricted by the - * max_increment field if it is enabled. + * (incr_mode) is H5C_incr__threshold and the hit rate drops below the + * value supplied in this field in an epoch, increment the cache size by + * size_increment. Note that cache size may not be incremented above + * max_size, and that the increment may be further restricted by the + * max_increment field if it is enabled. * - * When enabled, this field must contain a value in the range [0.0, 1.0]. - * Depending on the incr_mode selected, it may also have to be less than - * upper_hr_threshold. + * When enabled, this field must contain a value in the range [0.0, 1.0]. + * Depending on the incr_mode selected, it may also have to be less than + * upper_hr_threshold. * * increment: Double containing the multiplier used to derive the new - * cache size from the old if a cache size increment is triggered. + * cache size from the old if a cache size increment is triggered. * The increment must be greater than 1.0, and should not exceed 2.0. * - * The new cache size is obtained by multiplying the current max cache - * size by the increment, and then clamping to max_size and to stay - * within the max_increment as necessary. + * The new cache size is obtained by multiplying the current max cache + * size by the increment, and then clamping to max_size and to stay + * within the max_increment as necessary. * * apply_max_increment: Boolean flag indicating whether the max_increment - * field should be used to limit the maximum cache size increment. + * field should be used to limit the maximum cache size increment. * * max_increment: If enabled by the apply_max_increment field described - * above, this field contains the maximum number of bytes by which the - * cache size can be increased in a single re-size. + * above, this field contains the maximum number of bytes by which the + * cache size can be increased in a single re-size. * * flash_incr_mode: Instance of the H5C_cache_flash_incr_mode enumerated * type whose value indicates whether and by what algorithm we should @@ -1989,96 +1991,96 @@ typedef struct H5C_image_entry_t { * is H5C_flash_incr__add_space. * * flash_threshold: Double containing the factor by which current max cache - * size is multiplied to obtain the size threshold for the add_space - * flash increment algorithm. The field is ignored unless - * flash_incr_mode is H5C_flash_incr__add_space. + * size is multiplied to obtain the size threshold for the add_space + * flash increment algorithm. The field is ignored unless + * flash_incr_mode is H5C_flash_incr__add_space. * * * Cache size decrease control fields: * * decr_mode: Instance of the H5C_cache_decr_mode enumerated type whose - * value indicates how we determine whether the cache size should be - * decreased. At present there are four possibilities. + * value indicates how we determine whether the cache size should be + * decreased. At present there are four possibilities. * - * H5C_decr__off: Don't attempt to decrease the size of the cache - * automatically. + * H5C_decr__off: Don't attempt to decrease the size of the cache + * automatically. * - * When this increment mode is selected, the remaining fields - * in the cache size decrease section are ignored. + * When this increment mode is selected, the remaining fields + * in the cache size decrease section are ignored. * - * H5C_decr__threshold: Attempt to decrease the size of the cache - * whenever the average hit rate over the last epoch rises - * above the value supplied in the upper_hr_threshold - * field. + * H5C_decr__threshold: Attempt to decrease the size of the cache + * whenever the average hit rate over the last epoch rises + * above the value supplied in the upper_hr_threshold + * field. * - * H5C_decr__age_out: At the end of each epoch, search the cache for - * entries that have not been accessed for at least the number - * of epochs specified in the epochs_before_eviction field, and - * evict these entries. Conceptually, the maximum cache size - * is then decreased to match the new actual cache size. However, - * this reduction may be modified by the min_size, the - * max_decrement, and/or the empty_reserve. + * H5C_decr__age_out: At the end of each epoch, search the cache for + * entries that have not been accessed for at least the number + * of epochs specified in the epochs_before_eviction field, and + * evict these entries. Conceptually, the maximum cache size + * is then decreased to match the new actual cache size. However, + * this reduction may be modified by the min_size, the + * max_decrement, and/or the empty_reserve. * - * H5C_decr__age_out_with_threshold: Same as age_out, but we only - * attempt to reduce the cache size when the hit rate observed - * over the last epoch exceeds the value provided in the - * upper_hr_threshold field. + * H5C_decr__age_out_with_threshold: Same as age_out, but we only + * attempt to reduce the cache size when the hit rate observed + * over the last epoch exceeds the value provided in the + * upper_hr_threshold field. * * upper_hr_threshold: Upper hit rate threshold. The use of this field - * varies according to the current decr_mode: + * varies according to the current decr_mode: * - * H5C_decr__off or H5C_decr__age_out: The value of this field is - * ignored. + * H5C_decr__off or H5C_decr__age_out: The value of this field is + * ignored. * - * H5C_decr__threshold: If the hit rate exceeds this threshold in any - * epoch, attempt to decrement the cache size by size_decrement. + * H5C_decr__threshold: If the hit rate exceeds this threshold in any + * epoch, attempt to decrement the cache size by size_decrement. * - * Note that cache size may not be decremented below min_size. + * Note that cache size may not be decremented below min_size. * - * Note also that if the upper_threshold is 1.0, the cache size - * will never be reduced. + * Note also that if the upper_threshold is 1.0, the cache size + * will never be reduced. * - * H5C_decr__age_out_with_threshold: If the hit rate exceeds this - * threshold in any epoch, attempt to reduce the cache size - * by evicting entries that have not been accessed for more - * than the specified number of epochs. + * H5C_decr__age_out_with_threshold: If the hit rate exceeds this + * threshold in any epoch, attempt to reduce the cache size + * by evicting entries that have not been accessed for more + * than the specified number of epochs. * * decrement: This field is only used when the decr_mode is - * H5C_decr__threshold. + * H5C_decr__threshold. * - * The field is a double containing the multiplier used to derive the - * new cache size from the old if a cache size decrement is triggered. - * The decrement must be in the range 0.0 (in which case the cache will + * The field is a double containing the multiplier used to derive the + * new cache size from the old if a cache size decrement is triggered. + * The decrement must be in the range 0.0 (in which case the cache will * try to contract to its minimum size) to 1.0 (in which case the * cache will never shrink). * * apply_max_decrement: Boolean flag used to determine whether decrements - * in cache size are to be limited by the max_decrement field. + * in cache size are to be limited by the max_decrement field. * * max_decrement: Maximum number of bytes by which the cache size can be - * decreased in a single re-size. Note that decrements may also be - * restricted by the min_size of the cache, and (in age out modes) by - * the empty_reserve field. + * decreased in a single re-size. Note that decrements may also be + * restricted by the min_size of the cache, and (in age out modes) by + * the empty_reserve field. * * epochs_before_eviction: Integer field used in H5C_decr__age_out and - * H5C_decr__age_out_with_threshold decrement modes. + * H5C_decr__age_out_with_threshold decrement modes. * - * This field contains the number of epochs an entry must remain - * unaccessed before it is evicted in an attempt to reduce the - * cache size. If applicable, this field must lie in the range - * [1, H5C__MAX_EPOCH_MARKERS]. + * This field contains the number of epochs an entry must remain + * unaccessed before it is evicted in an attempt to reduce the + * cache size. If applicable, this field must lie in the range + * [1, H5C__MAX_EPOCH_MARKERS]. * * apply_empty_reserve: Boolean field controlling whether the empty_reserve - * field is to be used in computing the new cache size when the - * decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold. + * field is to be used in computing the new cache size when the + * decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold. * * empty_reserve: To avoid a constant racheting down of cache size by small - * amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold - * modes, this field allows one to require that any cache size - * reductions leave the specified fraction of unused space in the cache. + * amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold + * modes, this field allows one to require that any cache size + * reductions leave the specified fraction of unused space in the cache. * - * The value of this field must be in the range [0.0, 1.0]. I would - * expect typical values to be in the range of 0.01 to 0.1. + * The value of this field must be in the range [0.0, 1.0]. I would + * expect typical values to be in the range of 0.01 to 0.1. * ****************************************************************************/ @@ -2101,34 +2103,34 @@ typedef void (*H5C_auto_resize_rpt_fcn)(H5C_t * cache_ptr, int32_t version, typedef struct H5C_auto_size_ctl_t { /* general configuration fields: */ - int32_t version; - H5C_auto_resize_rpt_fcn rpt_fcn; - hbool_t set_initial_size; - size_t initial_size; - double min_clean_fraction; - size_t max_size; - size_t min_size; - int64_t epoch_length; + int32_t version; + H5C_auto_resize_rpt_fcn rpt_fcn; + hbool_t set_initial_size; + size_t initial_size; + double min_clean_fraction; + size_t max_size; + size_t min_size; + int64_t epoch_length; /* size increase control fields: */ - enum H5C_cache_incr_mode incr_mode; - double lower_hr_threshold; - double increment; - hbool_t apply_max_increment; - size_t max_increment; + enum H5C_cache_incr_mode incr_mode; + double lower_hr_threshold; + double increment; + hbool_t apply_max_increment; + size_t max_increment; enum H5C_cache_flash_incr_mode flash_incr_mode; double flash_multiple; double flash_threshold; /* size decrease control fields: */ - enum H5C_cache_decr_mode decr_mode; - double upper_hr_threshold; - double decrement; - hbool_t apply_max_decrement; - size_t max_decrement; - int32_t epochs_before_eviction; - hbool_t apply_empty_reserve; - double empty_reserve; + enum H5C_cache_decr_mode decr_mode; + double upper_hr_threshold; + double decrement; + hbool_t apply_max_decrement; + size_t max_decrement; + int32_t epochs_before_eviction; + hbool_t apply_empty_reserve; + double empty_reserve; } H5C_auto_size_ctl_t; /**************************************************************************** @@ -2144,12 +2146,12 @@ typedef struct H5C_auto_size_ctl_t { * The fields of the structure are discussed individually below: * * version: Integer field containing the version number of this version - * of the H5C_image_ctl_t structure. Any instance of - * H5C_image_ctl_t passed to the cache must have a known - * version number, or an error will be flagged. + * of the H5C_image_ctl_t structure. Any instance of + * H5C_image_ctl_t passed to the cache must have a known + * version number, or an error will be flagged. * * generate_image: Boolean flag indicating whether a cache image should - * be created on file close. + * be created on file close. * * save_resize_status: Boolean flag indicating whether the cache image * should include the adaptive cache resize configuration and status. @@ -2181,40 +2183,40 @@ typedef struct H5C_auto_size_ctl_t { * equivalent of H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE. * * flags: Unsigned integer containing flags controlling which aspects of the - * cache image functinality is actually executed. The primary impetus - * behind this field is to allow development of tests for partial - * implementations that will require little if any modification to run - * with the full implementation. In normal operation, all flags should - * be set. + * cache image functinality is actually executed. The primary impetus + * behind this field is to allow development of tests for partial + * implementations that will require little if any modification to run + * with the full implementation. In normal operation, all flags should + * be set. * ****************************************************************************/ -#define H5C_CI__GEN_MDCI_SBE_MESG ((unsigned)0x0001) -#define H5C_CI__GEN_MDC_IMAGE_BLK ((unsigned)0x0002) -#define H5C_CI__SUPRESS_ENTRY_WRITES ((unsigned)0x0004) -#define H5C_CI__WRITE_CACHE_IMAGE ((unsigned)0x0008) +#define H5C_CI__GEN_MDCI_SBE_MESG ((unsigned)0x0001) +#define H5C_CI__GEN_MDC_IMAGE_BLK ((unsigned)0x0002) +#define H5C_CI__SUPRESS_ENTRY_WRITES ((unsigned)0x0004) +#define H5C_CI__WRITE_CACHE_IMAGE ((unsigned)0x0008) /* This #define must set all defined H5C_CI flags. It is * used in the default value for instances of H5C_cache_image_ctl_t. * This value will only be modified in test code. */ -#define H5C_CI__ALL_FLAGS ((unsigned)0x000F) +#define H5C_CI__ALL_FLAGS ((unsigned)0x000F) #define H5C__DEFAULT_CACHE_IMAGE_CTL \ { \ - /* version = */ H5C__CURR_CACHE_IMAGE_CTL_VER, \ - /* generate_image = */ FALSE, \ - /* save_resize_status = */ FALSE, \ - /* entry_ageout = */ H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE, \ - /* flags = */ H5C_CI__ALL_FLAGS \ + H5C__CURR_CACHE_IMAGE_CTL_VER, /* = version */ \ + FALSE, /* = generate_image */ \ + FALSE, /* = save_resize_status */ \ + H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE, /* = entry_ageout */ \ + H5C_CI__ALL_FLAGS /* = flags */ \ } typedef struct H5C_cache_image_ctl_t { - int32_t version; - hbool_t generate_image; + int32_t version; + hbool_t generate_image; hbool_t save_resize_status; int32_t entry_ageout; - unsigned flags; + unsigned flags; } H5C_cache_image_ctl_t; /* The cache logging output style */ @@ -2285,7 +2287,7 @@ H5_DLL herr_t H5C_resize_entry(void *thing, size_t new_size); H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_ptr); H5_DLL herr_t H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl_t *config_ptr); -H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr, +H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled); H5_DLL herr_t H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_slist); @@ -2330,7 +2332,7 @@ H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr); #endif /* H5_HAVE_PARALLEL */ -#ifndef NDEBUG /* debugging functions */ +#ifndef NDEBUG /* debugging functions */ H5_DLL herr_t H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name); H5_DLL herr_t H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name); H5_DLL hbool_t H5C_get_serialization_in_progress(const H5C_t *cache_ptr); @@ -2338,7 +2340,7 @@ H5_DLL hbool_t H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring) H5_DLL herr_t H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn); H5_DLL herr_t H5C_get_entry_ptr_from_addr(H5C_t *cache_ptr, haddr_t addr, void **entry_ptr_ptr); -H5_DLL herr_t H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr, +H5_DLL herr_t H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr, haddr_t child_addr, hbool_t *fd_exists_ptr); H5_DLL herr_t H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_class_t *expected_type, hbool_t *in_cache_ptr, diff --git a/src/H5Dint.c b/src/H5Dint.c index f99aabb..6e247fc 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -134,10 +134,10 @@ H5FL_EXTERN(H5D_chunk_info_t); H5FL_BLK_EXTERN(type_conv); /* Disable warning for intentional identical branches here -QAK */ -H5_GCC_DIAG_OFF(larger-than=) +H5_GCC_DIAG_OFF("larger-than=") /* Define a static "default" dataset structure to use to initialize new datasets */ static H5D_shared_t H5D_def_dset; -H5_GCC_DIAG_ON(larger-than=) +H5_GCC_DIAG_ON("larger-than=") /* Dataset ID class */ static const H5I_class_t H5I_DATASET_CLS[1] = {{ @@ -155,7 +155,7 @@ static hbool_t H5D_top_package_initialize_s = FALSE; static const char *H5D_prefix_ext_env = NULL; static const char *H5D_prefix_vds_env = NULL; - + /*------------------------------------------------------------------------- * Function: H5D_init * @@ -178,7 +178,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_init() */ - + /*-------------------------------------------------------------------------- NAME H5D__init_package -- Initialize interface-specific information @@ -241,7 +241,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__init_package() */ - + /*------------------------------------------------------------------------- * Function: H5D_top_term_package * @@ -295,7 +295,7 @@ H5D_top_term_package(void) FUNC_LEAVE_NOAPI(n) } /* end H5D_top_term_package() */ - + /*------------------------------------------------------------------------- * Function: H5D_term_package * @@ -332,7 +332,7 @@ H5D_term_package(void) FUNC_LEAVE_NOAPI(n) } /* end H5D_term_package() */ - + /*------------------------------------------------------------------------- * Function: H5D__close_cb * @@ -369,7 +369,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__close_cb() */ - + /*------------------------------------------------------------------------- * Function: H5D__create_named * @@ -422,7 +422,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__create_named() */ - + /*------------------------------------------------------------------------- * Function: H5D__get_space_status * @@ -495,7 +495,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__get_space_status() */ - + /*------------------------------------------------------------------------- * Function: H5D__new * @@ -566,7 +566,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__new() */ - + /*------------------------------------------------------------------------- * Function: H5D__init_type * @@ -641,7 +641,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__init_type() */ - + /*------------------------------------------------------------------------- * Function: H5D__cache_dataspace_info * @@ -681,7 +681,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__cache_dataspace_info() */ - + /*------------------------------------------------------------------------- * Function: H5D__init_space * @@ -724,7 +724,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__init_space() */ - + /*------------------------------------------------------------------------- * Function: H5D__use_minimized_dset_headers * @@ -762,7 +762,7 @@ done: FUNC_LEAVE_NOAPI(ret_value); } /* H5D__use_minimized_dset_headers */ - + /*------------------------------------------------------------------------- * Function: H5D__calculate_minimium_header_size * @@ -882,7 +882,7 @@ done: FUNC_LEAVE_NOAPI(ret_value); } /* H5D__calculate_minimum_header_size */ - + /*------------------------------------------------------------------------- * Function: H5D__prepare_minimized_oh * @@ -925,7 +925,7 @@ done: FUNC_LEAVE_NOAPI(ret_value); } /* H5D__prepare_minimized_oh */ - + /*------------------------------------------------------------------------- * Function: H5D__update_oh_info * @@ -1131,7 +1131,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__update_oh_info() */ - + /*-------------------------------------------------------------------------- * Function: H5D__build_file_prefix @@ -1213,7 +1213,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5D__build_file_prefix() */ - + /*------------------------------------------------------------------------- * Function: H5D__create * @@ -1471,7 +1471,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__create() */ - + /*------------------------------------------------------------------------- * Function: H5D__open_name * @@ -1529,7 +1529,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__open_name() */ - + /* *------------------------------------------------------------------------- * Function: H5D_open @@ -1664,7 +1664,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_open() */ - + /* *------------------------------------------------------------------------- * Function: H5D__flush_append_setup @@ -1739,7 +1739,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5D__append_flush_setup() */ - + /*------------------------------------------------------------------------- * Function: H5D__open_oid * @@ -1909,7 +1909,7 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__open_oid() */ - + /*------------------------------------------------------------------------- * Function: H5D_close * @@ -2114,7 +2114,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_close() */ - + /*------------------------------------------------------------------------- * Function: H5D_mult_refresh_close * @@ -2194,7 +2194,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_mult_refresh_close() */ - + /*------------------------------------------------------------------------- * Function: H5D_mult_refresh_reopen * @@ -2241,7 +2241,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5D_mult_refresh_reopen() */ - + /*------------------------------------------------------------------------- * Function: H5D_oloc * @@ -2260,7 +2260,7 @@ H5D_oloc(H5D_t *dataset) FUNC_LEAVE_NOAPI(dataset ? &(dataset->oloc) : (H5O_loc_t *)NULL) } /* end H5D_oloc() */ - + /*------------------------------------------------------------------------- * Function: H5D_nameof * @@ -2279,7 +2279,7 @@ H5D_nameof(const H5D_t *dataset) FUNC_LEAVE_NOAPI(dataset ? &(dataset->path) : NULL) } /* end H5D_nameof() */ - + /*------------------------------------------------------------------------- * Function: H5D__alloc_storage * @@ -2445,7 +2445,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__alloc_storage() */ - + /*------------------------------------------------------------------------- * Function: H5D__init_storage * @@ -2517,7 +2517,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__init_storage() */ - + /*------------------------------------------------------------------------- * Function: H5D__get_storage_size * @@ -2572,7 +2572,7 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__get_storage_size() */ - + /*------------------------------------------------------------------------- * Function: H5D__get_offset * @@ -2619,7 +2619,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__get_offset() */ - + /*------------------------------------------------------------------------- * Function: H5D__vlen_get_buf_size_alloc * @@ -2657,7 +2657,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__vlen_get_buf_size_alloc() */ - + /*------------------------------------------------------------------------- * Function: H5D__vlen_get_buf_size_cb * @@ -2693,7 +2693,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__vlen_get_buf_size_cb() */ - + /*------------------------------------------------------------------------- * Function: H5D__vlen_get_buf_size * @@ -2792,7 +2792,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__vlen_get_buf_size() */ - + /*------------------------------------------------------------------------- * Function: H5D__vlen_get_buf_size_gen_cb * @@ -2848,7 +2848,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__vlen_get_buf_size_gen_cb() */ - + /*------------------------------------------------------------------------- * Function: H5D__vlen_get_buf_size_gen * @@ -2961,7 +2961,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__vlen_get_buf_size_gen() */ - + /*------------------------------------------------------------------------- * Function: H5D__check_filters * @@ -3011,7 +3011,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__check_filters() */ - + /*------------------------------------------------------------------------- * Function: H5D__set_extent * @@ -3195,7 +3195,7 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__set_extent() */ - + /*------------------------------------------------------------------------- * Function: H5D__flush_sieve_buf * @@ -3232,7 +3232,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__flush_sieve_buf() */ - + /*------------------------------------------------------------------------- * Function: H5D__flush_real * @@ -3263,7 +3263,7 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__flush_real() */ - + /*------------------------------------------------------------------------- * Function: H5D__flush * @@ -3296,7 +3296,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__flush() */ - + /*------------------------------------------------------------------------- * Function: H5D__format_convert * @@ -3447,7 +3447,7 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__format_convert() */ - + /*------------------------------------------------------------------------- * Function: H5D__mark * @@ -3508,7 +3508,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__mark() */ - + /*------------------------------------------------------------------------- * Function: H5D__flush_all_cb * @@ -3541,7 +3541,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__flush_all_cb() */ - + /*------------------------------------------------------------------------- * Function: H5D_flush_all * @@ -3569,7 +3569,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_flush_all() */ - + /*------------------------------------------------------------------------- * Function: H5D_get_create_plist * @@ -3746,7 +3746,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_get_create_plist() */ - + /*------------------------------------------------------------------------- * Function: H5D_get_access_plist * @@ -3843,7 +3843,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_get_access_plist() */ - + /*------------------------------------------------------------------------- * Function: H5D__get_space * @@ -3883,7 +3883,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__get_space() */ - + /*------------------------------------------------------------------------- * Function: H5D__get_type * @@ -3939,7 +3939,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__get_type() */ - + /*------------------------------------------------------------------------- * Function: H5D__refresh * diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 97437de..fe5baac 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -189,7 +189,7 @@ static const H5FD_class_t H5FD_core_g = { /* Define a free list to manage the region type */ H5FL_DEFINE(H5FD_core_region_t); - + /*------------------------------------------------------------------------- * Function: H5FD__core_add_dirty_region * @@ -295,7 +295,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_add_dirty_region() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_destroy_dirty_list * @@ -330,7 +330,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_destroy_dirty_list() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_write_to_bstore * @@ -403,7 +403,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_write_to_bstore() */ - + /*------------------------------------------------------------------------- * Function: H5FD__init_package * @@ -437,7 +437,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5FD__init_package() */ - + /*------------------------------------------------------------------------- * Function: H5FD_core_init * @@ -469,7 +469,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_core_init() */ - + /*--------------------------------------------------------------------------- * Function: H5FD__core_term * @@ -493,7 +493,7 @@ H5FD__core_term(void) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5FD__core_term() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_core_write_tracking * @@ -545,7 +545,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_core_write_tracking() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_core_write_tracking * @@ -587,7 +587,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_core_write_tracking() */ - + /*------------------------------------------------------------------------- * Function: H5Pset_fapl_core * @@ -631,7 +631,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_fapl_core() */ - + /*------------------------------------------------------------------------- * Function: H5Pget_fapl_core * @@ -670,7 +670,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_fapl_core() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_fapl_get * @@ -708,7 +708,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_fapl_get() */ - + /*------------------------------------------------------------------------- * Function: H5FD___core_open * @@ -964,7 +964,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_open() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_close * @@ -1015,7 +1015,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_close() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_cmp * @@ -1093,7 +1093,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_cmp() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_query * @@ -1114,6 +1114,7 @@ H5FD__core_query(const H5FD_t * _file, unsigned long *flags /* out */) FUNC_ENTER_STATIC_NOERR + /* clang-format off */ /* Set the VFL feature flags that this driver supports */ if(flags) { *flags = 0; @@ -1130,11 +1131,12 @@ H5FD__core_query(const H5FD_t * _file, unsigned long *flags /* out */) *flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */ } } /* end if */ + /* clang-format on */ FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5FD__core_query() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_get_eoa * @@ -1159,7 +1161,7 @@ H5FD__core_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) FUNC_LEAVE_NOAPI(file->eoa) } /* end H5FD__core_get_eoa() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_set_eoa * @@ -1191,7 +1193,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_set_eoa() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_get_eof * @@ -1218,7 +1220,7 @@ H5FD__core_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) FUNC_LEAVE_NOAPI(file->eof) } /* end H5FD__core_get_eof() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_get_handle * @@ -1278,7 +1280,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_get_handle() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_read * @@ -1299,7 +1301,7 @@ static herr_t H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, size_t size, void *buf/*out*/) { - H5FD_core_t *file = (H5FD_core_t*)_file; + H5FD_core_t *file = (H5FD_core_t*)_file; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1340,7 +1342,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_read() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_write * @@ -1421,7 +1423,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_write() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_flush * @@ -1483,7 +1485,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_flush() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_truncate * @@ -1508,7 +1510,7 @@ done: * If we are not closing, we realloc the buffer to size equal * to the smallest multiple of the allocation increment that * equals or exceeds the eoa and set the eof accordingly. - * Note that we no longer truncate the backing store to the + * Note that we no longer truncate the backing store to the * new eof if applicable. * -- JRM * @@ -1603,14 +1605,14 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_truncate() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_lock * * Purpose: To place an advisory lock on a file. - * The lock type to apply depends on the parameter "rw": - * TRUE--opens for write: an exclusive lock - * FALSE--opens for read: a shared lock + * The lock type to apply depends on the parameter "rw": + * TRUE--opens for write: an exclusive lock + * FALSE--opens for read: a shared lock * * Return: SUCCEED/FAIL * @@ -1653,7 +1655,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__core_lock() */ - + /*------------------------------------------------------------------------- * Function: H5FD__core_unlock * @@ -1668,7 +1670,7 @@ done: static herr_t H5FD__core_unlock(H5FD_t *_file) { - H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */ + H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index 290d743..01f87a2 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -12,38 +12,38 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke - * Monday, November 10, 1997 - * - * Purpose: Implements a family of files that acts as a single hdf5 - * file. The purpose is to be able to split a huge file on a - * 64-bit platform, transfer all the <2GB members to a 32-bit - * platform, and then access the entire huge file on the 32-bit - * platform. - * - * All family members are logically the same size although their - * physical sizes may vary. The logical member size is - * determined by looking at the physical size of the first member - * when the file is opened. When creating a file family, the - * first member is created with a predefined physical size - * (actually, this happens when the file family is flushed, and - * can be quite time consuming on file systems that don't - * implement holes, like nfs). + * Programmer: Robb Matzke + * Monday, November 10, 1997 + * + * Purpose: Implements a family of files that acts as a single hdf5 + * file. The purpose is to be able to split a huge file on a + * 64-bit platform, transfer all the <2GB members to a 32-bit + * platform, and then access the entire huge file on the 32-bit + * platform. + * + * All family members are logically the same size although their + * physical sizes may vary. The logical member size is + * determined by looking at the physical size of the first member + * when the file is opened. When creating a file family, the + * first member is created with a predefined physical size + * (actually, this happens when the file family is flushed, and + * can be quite time consuming on file systems that don't + * implement holes, like nfs). * */ #include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */ -#include "H5private.h" /* Generic Functions */ +#include "H5private.h" /* Generic Functions */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* File access */ -#include "H5FDprivate.h" /* File drivers */ -#include "H5FDfamily.h" /* Family file driver */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fprivate.h" /* File access */ +#include "H5FDprivate.h" /* File drivers */ +#include "H5FDfamily.h" /* Family file driver */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Pprivate.h" /* Property lists */ /* The size of the member name buffers */ #define H5FD_FAM_MEMB_NAME_BUF_SIZE 4096 @@ -53,19 +53,19 @@ static hid_t H5FD_FAMILY_g = 0; /* The description of a file belonging to this driver. */ typedef struct H5FD_family_t { - H5FD_t pub; /*public stuff, must be first */ - hid_t memb_fapl_id; /*file access property list for members */ - hsize_t memb_size; /*actual size of each member file */ - hsize_t pmem_size; /*member size passed in from property */ - unsigned nmembs; /*number of family members */ - unsigned amembs; /*number of member slots allocated */ - H5FD_t **memb; /*dynamic array of member pointers */ - haddr_t eoa; /*end of allocated addresses */ - char *name; /*name generator printf format */ - unsigned flags; /*flags for opening additional members */ + H5FD_t pub; /*public stuff, must be first */ + hid_t memb_fapl_id; /*file access property list for members */ + hsize_t memb_size; /*actual size of each member file */ + hsize_t pmem_size; /*member size passed in from property */ + unsigned nmembs; /*number of family members */ + unsigned amembs; /*number of member slots allocated */ + H5FD_t **memb; /*dynamic array of member pointers */ + haddr_t eoa; /*end of allocated addresses */ + char *name; /*name generator printf format */ + unsigned flags; /*flags for opening additional members */ /* Information from properties set by 'h5repart' tool */ - hsize_t mem_newsize; /*new member size passed in as private + hsize_t mem_newsize; /*new member size passed in as private * property. It's used only by h5repart */ hbool_t repart_members; /* Whether to mark the superblock dirty * when it is loaded, so that the family @@ -74,8 +74,8 @@ typedef struct H5FD_family_t { /* Driver-specific file access properties */ typedef struct H5FD_family_fapl_t { - hsize_t memb_size; /*size of each member */ - hid_t memb_fapl_id; /*file access property list of each memb*/ + hsize_t memb_size; /*size of each member */ + hid_t memb_fapl_id; /*file access property list of each memb*/ } H5FD_family_fapl_t; /* Callback prototypes */ @@ -85,11 +85,11 @@ static void *H5FD__family_fapl_copy(const void *_old_fa); static herr_t H5FD__family_fapl_free(void *_fa); static hsize_t H5FD__family_sb_size(H5FD_t *_file); static herr_t H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, - unsigned char *buf/*out*/); + unsigned char *buf/*out*/); static herr_t H5FD__family_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf); static H5FD_t *H5FD__family_open(const char *name, unsigned flags, - hid_t fapl_id, haddr_t maxaddr); + hid_t fapl_id, haddr_t maxaddr); static herr_t H5FD__family_close(H5FD_t *_file); static int H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2); static herr_t H5FD__family_query(const H5FD_t *_f1, unsigned long *flags); @@ -98,9 +98,9 @@ static herr_t H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa); static haddr_t H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle); static herr_t H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, - size_t size, void *_buf/*out*/); + size_t size, void *_buf/*out*/); static herr_t H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, - size_t size, const void *_buf); + size_t size, const void *_buf); static herr_t H5FD__family_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing); static herr_t H5FD__family_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing); static herr_t H5FD__family_lock(H5FD_t *_file, hbool_t rw); @@ -108,41 +108,41 @@ static herr_t H5FD__family_unlock(H5FD_t *_file); /* The class struct */ static const H5FD_class_t H5FD_family_g = { - "family", /* name */ - HADDR_MAX, /* maxaddr */ - H5F_CLOSE_WEAK, /* fc_degree */ + "family", /* name */ + HADDR_MAX, /* maxaddr */ + H5F_CLOSE_WEAK, /* fc_degree */ H5FD__family_term, /* terminate */ - H5FD__family_sb_size, /* sb_size */ - H5FD__family_sb_encode, /* sb_encode */ - H5FD__family_sb_decode, /* sb_decode */ - sizeof(H5FD_family_fapl_t), /* fapl_size */ - H5FD__family_fapl_get, /* fapl_get */ - H5FD__family_fapl_copy, /* fapl_copy */ - H5FD__family_fapl_free, /* fapl_free */ - 0, /* dxpl_size */ - NULL, /* dxpl_copy */ - NULL, /* dxpl_free */ - H5FD__family_open, /* open */ - H5FD__family_close, /* close */ - H5FD__family_cmp, /* cmp */ - H5FD__family_query, /* query */ - NULL, /* get_type_map */ - NULL, /* alloc */ - NULL, /* free */ - H5FD__family_get_eoa, /* get_eoa */ - H5FD__family_set_eoa, /* set_eoa */ - H5FD__family_get_eof, /* get_eof */ + H5FD__family_sb_size, /* sb_size */ + H5FD__family_sb_encode, /* sb_encode */ + H5FD__family_sb_decode, /* sb_decode */ + sizeof(H5FD_family_fapl_t), /* fapl_size */ + H5FD__family_fapl_get, /* fapl_get */ + H5FD__family_fapl_copy, /* fapl_copy */ + H5FD__family_fapl_free, /* fapl_free */ + 0, /* dxpl_size */ + NULL, /* dxpl_copy */ + NULL, /* dxpl_free */ + H5FD__family_open, /* open */ + H5FD__family_close, /* close */ + H5FD__family_cmp, /* cmp */ + H5FD__family_query, /* query */ + NULL, /* get_type_map */ + NULL, /* alloc */ + NULL, /* free */ + H5FD__family_get_eoa, /* get_eoa */ + H5FD__family_set_eoa, /* set_eoa */ + H5FD__family_get_eof, /* get_eof */ H5FD__family_get_handle, /* get_handle */ - H5FD__family_read, /* read */ - H5FD__family_write, /* write */ - H5FD__family_flush, /* flush */ - H5FD__family_truncate, /* truncate */ + H5FD__family_read, /* read */ + H5FD__family_write, /* write */ + H5FD__family_flush, /* flush */ + H5FD__family_truncate, /* truncate */ H5FD__family_lock, /* lock */ H5FD__family_unlock, /* unlock */ H5FD_FLMAP_DICHOTOMY /* fl_map */ }; - + /*-------------------------------------------------------------------------- NAME H5FD__init_package -- Initialize interface-specific information @@ -169,7 +169,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5FD__init_package() */ - + /*------------------------------------------------------------------------- * Function: H5FD_family_init * @@ -201,11 +201,11 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5FD_family_init() */ - + /*--------------------------------------------------------------------------- - * Function: H5FD__family_term + * Function: H5FD__family_term * - * Purpose: Shut down the VFD + * Purpose: Shut down the VFD * * Returns: Non-negative on success or negative on failure * @@ -225,21 +225,21 @@ H5FD__family_term(void) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5FD__family_term() */ - + /*------------------------------------------------------------------------- - * Function: H5Pset_fapl_family + * Function: H5Pset_fapl_family * - * Purpose: Sets the file access property list FAPL_ID to use the family - * driver. The MEMB_SIZE is the size in bytes of each file - * member (used only when creating a new file) and the - * MEMB_FAPL_ID is a file access property list to be used for - * each family member. + * Purpose: Sets the file access property list FAPL_ID to use the family + * driver. The MEMB_SIZE is the size in bytes of each file + * member (used only when creating a new file) and the + * MEMB_FAPL_ID is a file access property list to be used for + * each family member. * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -248,7 +248,7 @@ herr_t H5Pset_fapl_family(hid_t fapl_id, hsize_t msize, hid_t memb_fapl_id) { herr_t ret_value; - H5FD_family_fapl_t fa={0, -1}; + H5FD_family_fapl_t fa={0, -1}; H5P_genplist_t *plist; /* Property list pointer */ FUNC_ENTER_API(FAIL) @@ -275,18 +275,18 @@ done: FUNC_LEAVE_API(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5Pget_fapl_family + * Function: H5Pget_fapl_family * - * Purpose: Returns information about the family file access property - * list though the function arguments. + * Purpose: Returns information about the family file access property + * list though the function arguments. * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -295,7 +295,7 @@ herr_t H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize/*out*/, hid_t *memb_fapl_id/*out*/) { H5P_genplist_t *plist; /* Property list pointer */ - const H5FD_family_fapl_t *fa; + const H5FD_family_fapl_t *fa; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -319,18 +319,18 @@ done: FUNC_LEAVE_API(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5FD__family_fapl_get + * Function: H5FD__family_fapl_get * - * Purpose: Gets a file access property list which could be used to - * create an identical file. + * Purpose: Gets a file access property list which could be used to + * create an identical file. * - * Return: Success: Ptr to new file access property list. + * Return: Success: Ptr to new file access property list. * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, August 13, 1999 * *------------------------------------------------------------------------- @@ -338,8 +338,8 @@ done: static void * H5FD__family_fapl_get(H5FD_t *_file) { - H5FD_family_t *file = (H5FD_family_t*)_file; - H5FD_family_fapl_t *fa = NULL; + H5FD_family_t *file = (H5FD_family_t*)_file; + H5FD_family_fapl_t *fa = NULL; H5P_genplist_t *plist; /* Property list pointer */ void *ret_value = NULL; /* Return value */ @@ -364,17 +364,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5FD__family_fapl_copy + * Function: H5FD__family_fapl_copy * - * Purpose: Copies the family-specific file access properties. + * Purpose: Copies the family-specific file access properties. * - * Return: Success: Ptr to a new property list + * Return: Success: Ptr to a new property list * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -417,17 +417,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5FD__family_fapl_free + * Function: H5FD__family_fapl_free * - * Purpose: Frees the family-specific file access properties. + * Purpose: Frees the family-specific file access properties. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -435,7 +435,7 @@ done: static herr_t H5FD__family_fapl_free(void *_fa) { - H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa; + H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -448,18 +448,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5FD__family_sb_size + * Function: H5FD__family_sb_size * - * Purpose: Returns the size of the private information to be stored in - * the superblock. + * Purpose: Returns the size of the private information to be stored in + * the superblock. * - * Return: Success: The super block driver data size. + * Return: Success: The super block driver data size. * - * Failure: never fails + * Failure: never fails * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * Tuesday, May 10, 2005 * *------------------------------------------------------------------------- @@ -474,21 +474,21 @@ H5FD__family_sb_size(H5FD_t H5_ATTR_UNUSED *_file) FUNC_LEAVE_NOAPI(8) } - + /*------------------------------------------------------------------------- - * Function: H5FD__family_sb_encode + * Function: H5FD__family_sb_encode * - * Purpose: Encode driver information for the superblock. The NAME - * argument is a nine-byte buffer which will be initialized with - * an eight-character name/version number and null termination. + * Purpose: Encode driver information for the superblock. The NAME + * argument is a nine-byte buffer which will be initialized with + * an eight-character name/version number and null termination. * - * The encoding is the member file size and name template. + * The encoding is the member file size and name template. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * Tuesday, May 10, 2005 * *------------------------------------------------------------------------- @@ -496,7 +496,7 @@ H5FD__family_sb_size(H5FD_t H5_ATTR_UNUSED *_file) static herr_t H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/) { - H5FD_family_t *file = (H5FD_family_t*)_file; + H5FD_family_t *file = (H5FD_family_t*)_file; FUNC_ENTER_STATIC_NOERR @@ -517,21 +517,21 @@ H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5FD__family_sb_encode() */ - + /*------------------------------------------------------------------------- - * Function: H5FD__family_sb_decode + * Function: H5FD__family_sb_decode * - * Purpose: This function has 2 separate purpose. One is to decodes the + * Purpose: This function has 2 separate purpose. One is to decodes the * superblock information for this driver. The NAME argument is * the eight-character (plus null termination) name stored in i * the file. The FILE argument is updated according to the * information in the superblock. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * Tuesday, May 10, 2005 * *------------------------------------------------------------------------- @@ -539,7 +539,7 @@ H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out static herr_t H5FD__family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsigned char *buf) { - H5FD_family_t *file = (H5FD_family_t*)_file; + H5FD_family_t *file = (H5FD_family_t*)_file; uint64_t msize; herr_t ret_value = SUCCEED; /* Return value */ @@ -572,19 +572,19 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__family_sb_decode() */ - + /*------------------------------------------------------------------------- - * Function: H5FD__family_open + * Function: H5FD__family_open * - * Purpose: Creates and/or opens a family of files as an HDF5 file. + * Purpose: Creates and/or opens a family of files as an HDF5 file. * - * Return: Success: A pointer to a new file dat structure. The - * public fields will be initialized by the - * caller, which is always H5FD_open(). + * Return: Success: A pointer to a new file dat structure. The + * public fields will be initialized by the + * caller, which is always H5FD_open(). * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -595,16 +595,16 @@ done: * memb_name & temp in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") static H5FD_t * H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, - haddr_t maxaddr) + haddr_t maxaddr) { - H5FD_family_t *file = NULL; - char *memb_name = NULL, *temp = NULL; - hsize_t eof = HADDR_UNDEF; - unsigned t_flags = flags & ~H5F_ACC_CREAT; - H5FD_t *ret_value = NULL; + H5FD_family_t *file = NULL; + char *memb_name = NULL, *temp = NULL; + hsize_t eof = HADDR_UNDEF; + unsigned t_flags = flags & ~H5F_ACC_CREAT; + H5FD_t *ret_value = NULL; FUNC_ENTER_STATIC @@ -746,21 +746,21 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__family_open() */ -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") + - /*------------------------------------------------------------------------- - * Function: H5FD__family_close + * Function: H5FD__family_close * - * Purpose: Closes a family of files. + * Purpose: Closes a family of files. * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative with as many members closed as - * possible. The only subsequent operation - * permitted on the file is a close operation. + * Failure: Negative with as many members closed as + * possible. The only subsequent operation + * permitted on the file is a close operation. * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -769,8 +769,8 @@ static herr_t H5FD__family_close(H5FD_t *_file) { H5FD_family_t *file = (H5FD_family_t*)_file; - unsigned nerrors = 0; /* Number of errors while closing member files */ - unsigned u; /* Local index variable */ + unsigned nerrors = 0; /* Number of errors while closing member files */ + unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -800,19 +800,19 @@ H5FD__family_close(H5FD_t *_file) FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__family_close() */ - + /*------------------------------------------------------------------------- - * Function: H5FD__family_cmp + * Function: H5FD__family_cmp * - * Purpose: Compares two file families to see if they are the same. It - * does this by comparing the first member of the two families. + * Purpose: Compares two file families to see if they are the same. It + * does this by comparing the first member of the two families. * - * Return: Success: like strcmp() + * Return: Success: like strcmp() * - * Failure: never fails (arguments were checked by the - * caller). + * Failure: never fails (arguments were checked by the + * caller). * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -820,8 +820,8 @@ H5FD__family_close(H5FD_t *_file) static int H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2) { - const H5FD_family_t *f1 = (const H5FD_family_t*)_f1; - const H5FD_family_t *f2 = (const H5FD_family_t*)_f2; + const H5FD_family_t *f1 = (const H5FD_family_t*)_f1; + const H5FD_family_t *f2 = (const H5FD_family_t*)_f2; int ret_value = 0; FUNC_ENTER_STATIC_NOERR @@ -834,17 +834,17 @@ H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2) FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__family_cmp() */ - + /*------------------------------------------------------------------------- - * Function: H5FD__family_query + * Function: H5FD__family_query * - * Purpose: Set the flags that this VFL driver is capable of supporting. + * Purpose: Set the flags that this VFL driver is capable of supporting. * (listed in H5FDpublic.h) * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, August 25, 2000 * *------------------------------------------------------------------------- @@ -852,7 +852,7 @@ H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2) static herr_t H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */) { - const H5FD_family_t *file = (const H5FD_family_t*)_file; /* Family VFD info */ + const H5FD_family_t *file = (const H5FD_family_t*)_file; /* Family VFD info */ FUNC_ENTER_STATIC_NOERR @@ -872,19 +872,19 @@ H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5FD__family_query() */ - + /*------------------------------------------------------------------------- - * Function: H5FD__family_get_eoa + * Function: H5FD__family_get_eoa * - * Purpose: Returns the end-of-address marker for the file. The EOA - * marker is the first address past the last byte allocated in - * the format address space. + * Purpose: Returns the end-of-address marker for the file. The EOA + * marker is the first address past the last byte allocated in + * the format address space. * - * Return: Success: The end-of-address-marker + * Return: Success: The end-of-address-marker * - * Failure: HADDR_UNDEF + * Failure: HADDR_UNDEF * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -892,24 +892,24 @@ H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */) static haddr_t H5FD__family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) { - const H5FD_family_t *file = (const H5FD_family_t*)_file; + const H5FD_family_t *file = (const H5FD_family_t*)_file; FUNC_ENTER_STATIC_NOERR FUNC_LEAVE_NOAPI(file->eoa) } - + /*------------------------------------------------------------------------- - * Function: H5FD__family_set_eoa + * Function: H5FD__family_set_eoa * - * Purpose: Set the end-of-address marker for the file. + * Purpose: Set the end-of-address marker for the file. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -920,14 +920,14 @@ H5FD__family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) * memb_name in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") static herr_t H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa) { - H5FD_family_t *file = (H5FD_family_t*)_file; - haddr_t addr = abs_eoa; - char *memb_name = NULL; - unsigned u; /* Local index variable */ + H5FD_family_t *file = (H5FD_family_t*)_file; + haddr_t addr = abs_eoa; + char *memb_name = NULL; + unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -987,22 +987,22 @@ done: FUNC_LEAVE_NOAPI(ret_value) } -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") + - /*------------------------------------------------------------------------- - * Function: H5FD__family_get_eof + * Function: H5FD__family_get_eof * - * Purpose: Returns the end-of-file marker, which is the greater of - * either the total family size or the current EOA marker. + * Purpose: Returns the end-of-file marker, which is the greater of + * either the total family size or the current EOA marker. * - * Return: Success: End of file address, the first address past - * the end of the family of files or the current - * EOA, whichever is larger. + * Return: Success: End of file address, the first address past + * the end of the family of files or the current + * EOA, whichever is larger. * - * Failure: HADDR_UNDEF + * Failure: HADDR_UNDEF * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -1010,9 +1010,9 @@ H5_GCC_DIAG_ON(format-nonliteral) static haddr_t H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type) { - const H5FD_family_t *file = (const H5FD_family_t*)_file; - haddr_t eof=0; - int i; /* Local index variable */ + const H5FD_family_t *file = (const H5FD_family_t*)_file; + haddr_t eof=0; + int i; /* Local index variable */ haddr_t ret_value = HADDR_UNDEF; /* Return value */ FUNC_ENTER_STATIC_NOERR @@ -1045,7 +1045,7 @@ H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type) FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- * Function: H5FD__family_get_handle * @@ -1085,34 +1085,34 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5FD__family_read + * Function: H5FD__family_read * - * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR - * into buffer BUF according to data transfer properties in - * DXPL_ID. + * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR + * into buffer BUF according to data transfer properties in + * DXPL_ID. * - * Return: Success: Zero. Result is stored in caller-supplied - * buffer BUF. + * Return: Success: Zero. Result is stored in caller-supplied + * buffer BUF. * - * Failure: -1, contents of buffer BUF are undefined. + * Failure: -1, contents of buffer BUF are undefined. * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- */ static herr_t H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, - void *_buf/*out*/) + void *_buf/*out*/) { - H5FD_family_t *file = (H5FD_family_t*)_file; - unsigned char *buf = (unsigned char*)_buf; - haddr_t sub; - size_t req; + H5FD_family_t *file = (H5FD_family_t*)_file; + unsigned char *buf = (unsigned char*)_buf; + haddr_t sub; + size_t req; hsize_t tempreq; - unsigned u; /* Local index variable */ + unsigned u; /* Local index variable */ H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value=SUCCEED; /* Return value */ @@ -1131,12 +1131,12 @@ H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s sub = addr % file->memb_size; - /* This check is for mainly for IA32 architecture whose size_t's size - * is 4 bytes, to prevent overflow when user application is trying to - * write files bigger than 4GB. */ + /* This check is for mainly for IA32 architecture whose size_t's size + * is 4 bytes, to prevent overflow when user application is trying to + * write files bigger than 4GB. */ tempreq = file->memb_size-sub; - if(tempreq > SIZET_MAX) - tempreq = SIZET_MAX; + if(tempreq > SIZET_MAX) + tempreq = SIZET_MAX; req = MIN(size, (size_t)tempreq); HDassert(u<file->nmembs); @@ -1153,33 +1153,33 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5FD__family_write + * Function: H5FD__family_write * - * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR - * from buffer BUF according to data transfer properties in - * DXPL_ID. + * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR + * from buffer BUF according to data transfer properties in + * DXPL_ID. * - * Return: Success: Zero + * Return: Success: Zero * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- */ static herr_t H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, - const void *_buf) + const void *_buf) { - H5FD_family_t *file = (H5FD_family_t*)_file; - const unsigned char *buf = (const unsigned char*)_buf; - haddr_t sub; - size_t req; + H5FD_family_t *file = (H5FD_family_t*)_file; + const unsigned char *buf = (const unsigned char*)_buf; + haddr_t sub; + size_t req; hsize_t tempreq; - unsigned u; /* Local index variable */ + unsigned u; /* Local index variable */ H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1202,8 +1202,8 @@ H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, * is 4 bytes, to prevent overflow when user application is trying to * write files bigger than 4GB. */ tempreq = file->memb_size-sub; - if(tempreq > SIZET_MAX) - tempreq = SIZET_MAX; + if(tempreq > SIZET_MAX) + tempreq = SIZET_MAX; req = MIN(size, (size_t)tempreq); HDassert(u<file->nmembs); @@ -1220,16 +1220,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5FD__family_flush + * Function: H5FD__family_flush * - * Purpose: Flushes all family members. + * Purpose: Flushes all family members. * - * Return: Success: 0 - * Failure: -1, as many files flushed as possible. + * Return: Success: 0 + * Failure: -1, as many files flushed as possible. * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -1237,8 +1237,8 @@ done: static herr_t H5FD__family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing) { - H5FD_family_t *file = (H5FD_family_t*)_file; - unsigned u, nerrors = 0; + H5FD_family_t *file = (H5FD_family_t*)_file; + unsigned u, nerrors = 0; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1254,17 +1254,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__family_flush() */ - + /*------------------------------------------------------------------------- - * Function: H5FD__family_truncate + * Function: H5FD__family_truncate * - * Purpose: Truncates all family members. + * Purpose: Truncates all family members. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1, as many files truncated as possible. + * Failure: -1, as many files truncated as possible. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, February 23, 2008 * *------------------------------------------------------------------------- @@ -1272,9 +1272,9 @@ done: static herr_t H5FD__family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing) { - H5FD_family_t *file = (H5FD_family_t*)_file; - unsigned u, nerrors = 0; - herr_t ret_value = SUCCEED; /* Return value */ + H5FD_family_t *file = (H5FD_family_t*)_file; + unsigned u, nerrors = 0; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1289,7 +1289,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__family_truncate() */ - + /*------------------------------------------------------------------------- * Function: H5FD__family_lock * @@ -1309,7 +1309,7 @@ H5FD__family_lock(H5FD_t *_file, hbool_t rw) { H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */ unsigned u; /* Local index variable */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1337,7 +1337,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD__family_lock() */ - + /*------------------------------------------------------------------------- * Function: H5FD__family_unlock * @@ -1352,8 +1352,8 @@ done: static herr_t H5FD__family_unlock(H5FD_t *_file) { - H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */ - unsigned u; /* Local index variable */ + H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */ + unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index d183511..bb26451 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -12,15 +12,15 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke - * Monday, November 10, 1997 - * - * Purpose: Implements a file driver which dispatches I/O requests to - * other file drivers depending on the purpose of the address - * region being accessed. For instance, all meta-data could be - * place in one file while all raw data goes to some other file. - * This also serves as an example of coding a complex file driver, - * therefore, it should not use any non-public definitions. + * Programmer: Robb Matzke + * Monday, November 10, 1997 + * + * Purpose: Implements a file driver which dispatches I/O requests to + * other file drivers depending on the purpose of the address + * region being accessed. For instance, all meta-data could be + * place in one file while all raw data goes to some other file. + * This also serves as an example of coding a complex file driver, + * therefore, it should not use any non-public definitions. */ #include <assert.h> #include <stdlib.h> @@ -30,23 +30,23 @@ #ifndef FALSE -#define FALSE 0 +#define FALSE 0 #endif #ifndef TRUE -#define TRUE 1 +#define TRUE 1 #endif /* Loop through all mapped files */ -#define UNIQUE_MEMBERS_CORE(MAP, ITER, SEEN, LOOPVAR) { \ - H5FD_mem_t ITER, LOOPVAR; \ - unsigned SEEN[H5FD_MEM_NTYPES]; \ - \ - memset(SEEN, 0, sizeof SEEN); \ +#define UNIQUE_MEMBERS_CORE(MAP, ITER, SEEN, LOOPVAR) { \ + H5FD_mem_t ITER, LOOPVAR; \ + unsigned SEEN[H5FD_MEM_NTYPES]; \ + \ + memset(SEEN, 0, sizeof SEEN); \ for (ITER=H5FD_MEM_SUPER; ITER<H5FD_MEM_NTYPES; ITER=(H5FD_mem_t)(ITER+1)) { \ - LOOPVAR = MAP[ITER]; \ - if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=ITER; \ - assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \ - if (SEEN[LOOPVAR]++) continue; \ + LOOPVAR = MAP[ITER]; \ + if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=ITER; \ + assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \ + if (SEEN[LOOPVAR]++) continue; \ /* Need two front-ends, since they are nested sometimes */ #define UNIQUE_MEMBERS(MAP, LOOPVAR) \ @@ -54,12 +54,12 @@ #define UNIQUE_MEMBERS2(MAP, LOOPVAR) \ UNIQUE_MEMBERS_CORE(MAP, _unmapped2, _seen2, LOOPVAR) -#define ALL_MEMBERS(LOOPVAR) { \ - H5FD_mem_t LOOPVAR; \ +#define ALL_MEMBERS(LOOPVAR) { \ + H5FD_mem_t LOOPVAR; \ for (LOOPVAR=H5FD_MEM_DEFAULT; LOOPVAR<H5FD_MEM_NTYPES; LOOPVAR=(H5FD_mem_t)(LOOPVAR+1)) { -#define END_MEMBERS }} +#define END_MEMBERS }} #define H5FD_MULT_MAX_FILE_NAME_LEN 1024 @@ -72,7 +72,7 @@ typedef struct H5FD_multi_fapl_t { hid_t memb_fapl[H5FD_MEM_NTYPES]; /*member access properties */ char *memb_name[H5FD_MEM_NTYPES]; /*name generators */ haddr_t memb_addr[H5FD_MEM_NTYPES]; /*starting addr per member */ - hbool_t relax; /*less stringent error checking */ + hbool_t relax; /*less stringent error checking */ } H5FD_multi_fapl_t; /* @@ -97,7 +97,7 @@ typedef struct H5FD_multi_t { /* Driver specific data transfer properties */ typedef struct H5FD_multi_dxpl_t { - hid_t memb_dxpl[H5FD_MEM_NTYPES];/*member data xfer properties*/ + hid_t memb_dxpl[H5FD_MEM_NTYPES];/*member data xfer properties*/ } H5FD_multi_dxpl_t; /* Private functions */ @@ -109,14 +109,14 @@ static int open_members(H5FD_multi_t *file); static herr_t H5FD_multi_term(void); static hsize_t H5FD_multi_sb_size(H5FD_t *file); static herr_t H5FD_multi_sb_encode(H5FD_t *file, char *name/*out*/, - unsigned char *buf/*out*/); + unsigned char *buf/*out*/); static herr_t H5FD_multi_sb_decode(H5FD_t *file, const char *name, - const unsigned char *buf); + const unsigned char *buf); static void *H5FD_multi_fapl_get(H5FD_t *file); static void *H5FD_multi_fapl_copy(const void *_old_fa); static herr_t H5FD_multi_fapl_free(void *_fa); static H5FD_t *H5FD_multi_open(const char *name, unsigned flags, - hid_t fapl_id, haddr_t maxaddr); + hid_t fapl_id, haddr_t maxaddr); static herr_t H5FD_multi_close(H5FD_t *_file); static int H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2); static herr_t H5FD_multi_query(const H5FD_t *_f1, unsigned long *flags); @@ -127,11 +127,11 @@ static haddr_t H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle); static haddr_t H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size); static herr_t H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, - hsize_t size); + hsize_t size); static herr_t H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, - size_t size, void *_buf/*out*/); + size_t size, void *_buf/*out*/); static herr_t H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, - size_t size, const void *_buf); + size_t size, const void *_buf); static herr_t H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing); static herr_t H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing); static herr_t H5FD_multi_lock(H5FD_t *_file, hbool_t rw); @@ -139,51 +139,51 @@ static herr_t H5FD_multi_unlock(H5FD_t *_file); /* The class struct */ static const H5FD_class_t H5FD_multi_g = { - "multi", /*name */ - HADDR_MAX, /*maxaddr */ - H5F_CLOSE_WEAK, /* fc_degree */ + "multi", /*name */ + HADDR_MAX, /*maxaddr */ + H5F_CLOSE_WEAK, /* fc_degree */ H5FD_multi_term, /*terminate */ - H5FD_multi_sb_size, /*sb_size */ - H5FD_multi_sb_encode, /*sb_encode */ - H5FD_multi_sb_decode, /*sb_decode */ - sizeof(H5FD_multi_fapl_t), /*fapl_size */ - H5FD_multi_fapl_get, /*fapl_get */ - H5FD_multi_fapl_copy, /*fapl_copy */ - H5FD_multi_fapl_free, /*fapl_free */ - 0, /*dxpl_size */ - NULL, /*dxpl_copy */ - NULL, /*dxpl_free */ - H5FD_multi_open, /*open */ - H5FD_multi_close, /*close */ - H5FD_multi_cmp, /*cmp */ - H5FD_multi_query, /*query */ - H5FD_multi_get_type_map, /*get_type_map */ - H5FD_multi_alloc, /*alloc */ - H5FD_multi_free, /*free */ - H5FD_multi_get_eoa, /*get_eoa */ - H5FD_multi_set_eoa, /*set_eoa */ - H5FD_multi_get_eof, /*get_eof */ + H5FD_multi_sb_size, /*sb_size */ + H5FD_multi_sb_encode, /*sb_encode */ + H5FD_multi_sb_decode, /*sb_decode */ + sizeof(H5FD_multi_fapl_t), /*fapl_size */ + H5FD_multi_fapl_get, /*fapl_get */ + H5FD_multi_fapl_copy, /*fapl_copy */ + H5FD_multi_fapl_free, /*fapl_free */ + 0, /*dxpl_size */ + NULL, /*dxpl_copy */ + NULL, /*dxpl_free */ + H5FD_multi_open, /*open */ + H5FD_multi_close, /*close */ + H5FD_multi_cmp, /*cmp */ + H5FD_multi_query, /*query */ + H5FD_multi_get_type_map, /*get_type_map */ + H5FD_multi_alloc, /*alloc */ + H5FD_multi_free, /*free */ + H5FD_multi_get_eoa, /*get_eoa */ + H5FD_multi_set_eoa, /*set_eoa */ + H5FD_multi_get_eof, /*get_eof */ H5FD_multi_get_handle, /*get_handle */ - H5FD_multi_read, /*read */ - H5FD_multi_write, /*write */ - H5FD_multi_flush, /*flush */ - H5FD_multi_truncate, /*truncate */ + H5FD_multi_read, /*read */ + H5FD_multi_write, /*write */ + H5FD_multi_flush, /*flush */ + H5FD_multi_truncate, /*truncate */ H5FD_multi_lock, /*lock */ H5FD_multi_unlock, /*unlock */ - H5FD_FLMAP_DEFAULT /*fl_map */ + H5FD_FLMAP_DEFAULT /*fl_map */ }; - + /*------------------------------------------------------------------------- - * Function: my_strdup + * Function: my_strdup * - * Purpose: Private version of strdup() + * Purpose: Private version of strdup() * - * Return: Success: Ptr to new copy of string + * Return: Success: Ptr to new copy of string * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, August 13, 1999 * *------------------------------------------------------------------------- @@ -204,7 +204,7 @@ my_strdup(const char *s) return x; } - + /*------------------------------------------------------------------------- * Function: H5FD_multi_init * @@ -231,11 +231,11 @@ H5FD_multi_init(void) return H5FD_MULTI_g; } /* end H5FD_multi_init() */ - + /*--------------------------------------------------------------------------- - * Function: H5FD_multi_term + * Function: H5FD_multi_term * - * Purpose: Shut down the VFD + * Purpose: Shut down the VFD * * Returns: Non-negative on success or negative on failure * @@ -253,33 +253,33 @@ H5FD_multi_term(void) return 0; } /* end H5FD_multi_term() */ - + /*------------------------------------------------------------------------- - * Function: H5Pset_fapl_split + * Function: H5Pset_fapl_split * - * Purpose: Compatibility function. Makes the multi driver act like the - * old split driver which stored meta data in one file and raw - * data in another file. + * Purpose: Compatibility function. Makes the multi driver act like the + * old split driver which stored meta data in one file and raw + * data in another file. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 11, 1999 * *------------------------------------------------------------------------- */ herr_t H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id, - const char *raw_ext, hid_t raw_plist_id) + const char *raw_ext, hid_t raw_plist_id) { - H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; - hid_t memb_fapl[H5FD_MEM_NTYPES]; - const char *memb_name[H5FD_MEM_NTYPES]; - char meta_name[H5FD_MULT_MAX_FILE_NAME_LEN]; - char raw_name[H5FD_MULT_MAX_FILE_NAME_LEN]; - haddr_t memb_addr[H5FD_MEM_NTYPES]; + H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; + hid_t memb_fapl[H5FD_MEM_NTYPES]; + const char *memb_name[H5FD_MEM_NTYPES]; + char meta_name[H5FD_MULT_MAX_FILE_NAME_LEN]; + char raw_name[H5FD_MULT_MAX_FILE_NAME_LEN]; + haddr_t memb_addr[H5FD_MEM_NTYPES]; /*NO TRACE*/ @@ -288,11 +288,11 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id, /* Initialize */ ALL_MEMBERS(mt) { - /* Treat global heap as raw data, not metadata */ - memb_map[mt] = ((mt == H5FD_MEM_DRAW || mt == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : H5FD_MEM_SUPER); - memb_fapl[mt] = -1; - memb_name[mt] = NULL; - memb_addr[mt] = HADDR_UNDEF; + /* Treat global heap as raw data, not metadata */ + memb_map[mt] = ((mt == H5FD_MEM_DRAW || mt == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : H5FD_MEM_SUPER); + memb_fapl[mt] = -1; + memb_name[mt] = NULL; + memb_addr[mt] = HADDR_UNDEF; } END_MEMBERS; /* The file access properties */ @@ -302,36 +302,36 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id, /* The names */ /* process meta filename */ if(meta_ext) { - if(strstr(meta_ext, "%s")) { + if(strstr(meta_ext, "%s")) { /* Note: this doesn't accommodate for when the '%s' in the user's * string is at a position >sizeof(meta_name) - QK & JK - 2013/01/17 */ - strncpy(meta_name, meta_ext, sizeof(meta_name)); + strncpy(meta_name, meta_ext, sizeof(meta_name)); meta_name[sizeof(meta_name) - 1] = '\0'; } - else - sprintf(meta_name, "%%s%s", meta_ext); + else + sprintf(meta_name, "%%s%s", meta_ext); } else { - strncpy(meta_name, "%s.meta", sizeof(meta_name)); + strncpy(meta_name, "%s.meta", sizeof(meta_name)); meta_name[sizeof(meta_name) - 1] = '\0'; } memb_name[H5FD_MEM_SUPER] = meta_name; /* process raw filename */ if(raw_ext) { - if(strstr(raw_ext, "%s")) { + if(strstr(raw_ext, "%s")) { /* Note: this doesn't accommodate for when the '%s' in the user's * string is at a position >sizeof(raw_name) - QK & JK - 2013/01/17 */ - strncpy(raw_name, raw_ext, sizeof(raw_name)); + strncpy(raw_name, raw_ext, sizeof(raw_name)); raw_name[sizeof(raw_name) - 1] = '\0'; } - else - sprintf(raw_name, "%%s%s", raw_ext); + else + sprintf(raw_name, "%%s%s", raw_ext); } else { - strncpy(raw_name, "%s.raw", sizeof(raw_name)); + strncpy(raw_name, "%s.raw", sizeof(raw_name)); raw_name[sizeof(raw_name) - 1] = '\0'; } memb_name[H5FD_MEM_DRAW] = raw_name; @@ -343,96 +343,96 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id, return H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE); } - + /*------------------------------------------------------------------------- - * Function: H5Pset_fapl_multi + * Function: H5Pset_fapl_multi * - * Purpose: Sets the file access property list FAPL_ID to use the multi - * driver. The MEMB_MAP array maps memory usage types to other - * memory usage types and is the mechanism which allows the - * caller to specify how many files are created. The array - * contains H5FD_MEM_NTYPES entries which are either the value - * H5FD_MEM_DEFAULT or a memory usage type and the number of - * unique values determines the number of files which are - * opened. For each memory usage type which will be associated - * with a file the MEMB_FAPL array should have a property list - * and the MEMB_NAME array should be a name generator (a - * printf-style format with a %s which will be replaced with the - * name passed to H5FDopen(), usually from H5Fcreate() or - * H5Fopen()). + * Purpose: Sets the file access property list FAPL_ID to use the multi + * driver. The MEMB_MAP array maps memory usage types to other + * memory usage types and is the mechanism which allows the + * caller to specify how many files are created. The array + * contains H5FD_MEM_NTYPES entries which are either the value + * H5FD_MEM_DEFAULT or a memory usage type and the number of + * unique values determines the number of files which are + * opened. For each memory usage type which will be associated + * with a file the MEMB_FAPL array should have a property list + * and the MEMB_NAME array should be a name generator (a + * printf-style format with a %s which will be replaced with the + * name passed to H5FDopen(), usually from H5Fcreate() or + * H5Fopen()). * - * If RELAX is set then opening an existing file for read-only - * access will not fail if some file members are missing. This - * allows a file to be accessed in a limited sense if just the - * meta data is available. + * If RELAX is set then opening an existing file for read-only + * access will not fail if some file members are missing. This + * allows a file to be accessed in a limited sense if just the + * meta data is available. * - * Defaults: Default values for each of the optional arguments are: + * Defaults: Default values for each of the optional arguments are: * - * memb_map: The default member map has the value - * H5FD_MEM_DEFAULT for each element. + * memb_map: The default member map has the value + * H5FD_MEM_DEFAULT for each element. * - * memb_fapl: The value H5P_DEFAULT for each element. + * memb_fapl: The value H5P_DEFAULT for each element. * - * memb_name: The string `%s-X.h5' where `X' is one of the - * letters `s' (H5FD_MEM_SUPER), - * `b' (H5FD_MEM_BTREE), `r' (H5FD_MEM_DRAW), - * `g' (H5FD_MEM_GHEAP), 'l' (H5FD_MEM_LHEAP), - * `o' (H5FD_MEM_OHDR). + * memb_name: The string `%s-X.h5' where `X' is one of the + * letters `s' (H5FD_MEM_SUPER), + * `b' (H5FD_MEM_BTREE), `r' (H5FD_MEM_DRAW), + * `g' (H5FD_MEM_GHEAP), 'l' (H5FD_MEM_LHEAP), + * `o' (H5FD_MEM_OHDR). * - * memb_addr: The value HADDR_UNDEF for each element. + * memb_addr: The value HADDR_UNDEF for each element. * * - * Example: To set up a multi file access property list which partitions - * data into meta and raw files each being 1/2 of the address - * space one would say: + * Example: To set up a multi file access property list which partitions + * data into meta and raw files each being 1/2 of the address + * space one would say: * - * H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES]; - * hid_t memb_fapl[H5FD_MEM_NTYPES]; - * const char *memb[H5FD_MEM_NTYPES]; - * haddr_t memb_addr[H5FD_MEM_NTYPES]; + * H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES]; + * hid_t memb_fapl[H5FD_MEM_NTYPES]; + * const char *memb[H5FD_MEM_NTYPES]; + * haddr_t memb_addr[H5FD_MEM_NTYPES]; * - * // The mapping... - * for (mt=0; mt<H5FD_MEM_NTYPES; mt++) { - * memb_map[mt] = H5FD_MEM_SUPER; - * } - * memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW; + * // The mapping... + * for (mt=0; mt<H5FD_MEM_NTYPES; mt++) { + * memb_map[mt] = H5FD_MEM_SUPER; + * } + * memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW; * - * // Member information - * memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT; - * memb_name[H5FD_MEM_SUPER] = "%s.meta"; - * memb_addr[H5FD_MEM_SUPER] = 0; + * // Member information + * memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT; + * memb_name[H5FD_MEM_SUPER] = "%s.meta"; + * memb_addr[H5FD_MEM_SUPER] = 0; * - * memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT; - * memb_name[H5FD_MEM_DRAW] = "%s.raw"; - * memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2; + * memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT; + * memb_name[H5FD_MEM_DRAW] = "%s.raw"; + * memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2; * - * hid_t fapl = H5Pcreate(H5P_FILE_ACCESS); - * H5Pset_fapl_multi(fapl, memb_map, memb_fapl, - * memb_name, memb_addr, TRUE); + * hid_t fapl = H5Pcreate(H5P_FILE_ACCESS); + * H5Pset_fapl_multi(fapl, memb_map, memb_fapl, + * memb_name, memb_addr, TRUE); * * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- */ herr_t H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, - const hid_t *memb_fapl, const char * const *memb_name, - const haddr_t *memb_addr, hbool_t relax) + const hid_t *memb_fapl, const char * const *memb_name, + const haddr_t *memb_addr, hbool_t relax) { - H5FD_multi_fapl_t fa; - H5FD_mem_t mt, mmt; - H5FD_mem_t _memb_map[H5FD_MEM_NTYPES]; - hid_t _memb_fapl[H5FD_MEM_NTYPES]; - char _memb_name[H5FD_MEM_NTYPES][16]; - const char *_memb_name_ptrs[H5FD_MEM_NTYPES]; - haddr_t _memb_addr[H5FD_MEM_NTYPES]; - static const char *letters = "Xsbrglo"; + H5FD_multi_fapl_t fa; + H5FD_mem_t mt, mmt; + H5FD_mem_t _memb_map[H5FD_MEM_NTYPES]; + hid_t _memb_fapl[H5FD_MEM_NTYPES]; + char _memb_name[H5FD_MEM_NTYPES][16]; + const char *_memb_name_ptrs[H5FD_MEM_NTYPES]; + haddr_t _memb_addr[H5FD_MEM_NTYPES]; + static const char *letters = "Xsbrglo"; static const char *func="H5FDset_fapl_multi"; /* Function Name for error reporting */ /*NO TRACE*/ @@ -445,45 +445,45 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS)) H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1) if (!memb_map) { - for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) - _memb_map[mt] = H5FD_MEM_DEFAULT; - memb_map = _memb_map; + for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) + _memb_map[mt] = H5FD_MEM_DEFAULT; + memb_map = _memb_map; } if (!memb_fapl) { - for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) - _memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS); - memb_fapl = _memb_fapl; + for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) + _memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS); + memb_fapl = _memb_fapl; } if (!memb_name) { - assert(strlen(letters)==H5FD_MEM_NTYPES); - for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) { - sprintf(_memb_name[mt], "%%s-%c.h5", letters[mt]); - _memb_name_ptrs[mt] = _memb_name[mt]; - } - memb_name = _memb_name_ptrs; + assert(strlen(letters)==H5FD_MEM_NTYPES); + for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) { + sprintf(_memb_name[mt], "%%s-%c.h5", letters[mt]); + _memb_name_ptrs[mt] = _memb_name[mt]; + } + memb_name = _memb_name_ptrs; } if (!memb_addr) { - for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) - _memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * (HADDR_MAX / (H5FD_MEM_NTYPES-1)); - memb_addr = _memb_addr; + for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) + _memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * (HADDR_MAX / (H5FD_MEM_NTYPES-1)); + memb_addr = _memb_addr; } for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) { - /* Map usage type */ - mmt = memb_map[mt]; - if (mmt<0 || mmt>=H5FD_MEM_NTYPES) + /* Map usage type */ + mmt = memb_map[mt]; + if (mmt<0 || mmt>=H5FD_MEM_NTYPES) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADRANGE, "file resource type out of range", -1) - if (H5FD_MEM_DEFAULT==mmt) mmt = mt; + if (H5FD_MEM_DEFAULT==mmt) mmt = mt; - /* - * All members of MEMB_FAPL must be either defaults or actual file - * access property lists. - */ - if (H5P_DEFAULT!=memb_fapl[mmt] && TRUE!=H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS)) + /* + * All members of MEMB_FAPL must be either defaults or actual file + * access property lists. + */ + if (H5P_DEFAULT!=memb_fapl[mmt] && TRUE!=H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS)) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1) - /* All names must be defined */ - if (!memb_name[mmt] || !memb_name[mmt][0]) + /* All names must be defined */ + if (!memb_name[mmt] || !memb_name[mmt][0]) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1) } @@ -506,30 +506,30 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, return H5Pset_driver(fapl_id, H5FD_MULTI, &fa); } - + /*------------------------------------------------------------------------- - * Function: H5Pget_fapl_multi + * Function: H5Pget_fapl_multi * - * Purpose: Returns information about the multi file access property - * list though the function arguments which are the same as for - * H5Pset_fapl_multi() above. + * Purpose: Returns information about the multi file access property + * list though the function arguments which are the same as for + * H5Pset_fapl_multi() above. * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- */ herr_t H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/, - hid_t *memb_fapl/*out*/, char **memb_name/*out*/, - haddr_t *memb_addr/*out*/, hbool_t *relax) + hid_t *memb_fapl/*out*/, char **memb_name/*out*/, + haddr_t *memb_addr/*out*/, hbool_t *relax) { const H5FD_multi_fapl_t *fa; - H5FD_mem_t mt; + H5FD_mem_t mt; static const char *func="H5FDget_fapl_multi"; /* Function Name for error reporting */ /*NO TRACE*/ @@ -548,41 +548,41 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/, if (memb_map) memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES*sizeof(H5FD_mem_t)); if (memb_fapl) { - for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) { - if (fa->memb_fapl[mt]>=0) - memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]); - else - memb_fapl[mt] = fa->memb_fapl[mt]; /*default or bad ID*/ - } + for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) { + if (fa->memb_fapl[mt]>=0) + memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]); + else + memb_fapl[mt] = fa->memb_fapl[mt]; /*default or bad ID*/ + } } if(memb_name) { - for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) { - if(fa->memb_name[mt]) - memb_name[mt] = my_strdup(fa->memb_name[mt]); - else - memb_name[mt] = NULL; - } + for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) { + if(fa->memb_name[mt]) + memb_name[mt] = my_strdup(fa->memb_name[mt]); + else + memb_name[mt] = NULL; + } } if (memb_addr) - memcpy(memb_addr, fa->memb_addr, H5FD_MEM_NTYPES*sizeof(haddr_t)); + memcpy(memb_addr, fa->memb_addr, H5FD_MEM_NTYPES*sizeof(haddr_t)); if (relax) - *relax = fa->relax; + *relax = fa->relax; return 0; } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_sb_size + * Function: H5FD_multi_sb_size * - * Purpose: Returns the size of the private information to be stored in - * the superblock. + * Purpose: Returns the size of the private information to be stored in + * the superblock. * - * Return: Success: The super block driver data size. + * Return: Success: The super block driver data size. * - * Failure: never fails + * Failure: never fails * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, August 16, 1999 * *------------------------------------------------------------------------- @@ -590,16 +590,16 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/, static hsize_t H5FD_multi_sb_size(H5FD_t *_file) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - unsigned nseen = 0; - hsize_t nbytes = 8; /*size of header*/ + H5FD_multi_t *file = (H5FD_multi_t*)_file; + unsigned nseen = 0; + hsize_t nbytes = 8; /*size of header*/ /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); /* How many unique files? */ UNIQUE_MEMBERS(file->fa.memb_map, mt) { - nseen++; + nseen++; } END_MEMBERS; /* Addresses and EOA markers */ @@ -614,40 +614,40 @@ H5FD_multi_sb_size(H5FD_t *_file) return nbytes; } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_sb_encode + * Function: H5FD_multi_sb_encode * - * Purpose: Encode driver information for the superblock. The NAME - * argument is a nine-byte buffer which will be initialized with - * an eight-character name/version number and null termination. + * Purpose: Encode driver information for the superblock. The NAME + * argument is a nine-byte buffer which will be initialized with + * an eight-character name/version number and null termination. * - * The encoding is a six-byte member mapping followed two bytes - * which are unused. For each unique file in usage-type order - * encode all the starting addresses as unsigned 64-bit integers, - * then all the EOA values as unsigned 64-bit integers, then all - * the template names as null terminated strings which are - * multiples of 8 characters. + * The encoding is a six-byte member mapping followed two bytes + * which are unused. For each unique file in usage-type order + * encode all the starting addresses as unsigned 64-bit integers, + * then all the EOA values as unsigned 64-bit integers, then all + * the template names as null terminated strings which are + * multiples of 8 characters. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, August 16, 1999 * *------------------------------------------------------------------------- */ static herr_t H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/, - unsigned char *buf/*out*/) + unsigned char *buf/*out*/) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - haddr_t memb_eoa; - unsigned char *p; - size_t nseen; - size_t i; - H5FD_mem_t m; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + haddr_t memb_eoa; + unsigned char *p; + size_t nseen; + size_t i; + H5FD_mem_t m; static const char *func="H5FD_multi_sb_encode"; /* Function Name for error reporting */ /* Clear the error stack */ @@ -698,23 +698,23 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/, return 0; } /* end H5FD_multi_sb_encode() */ - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_sb_decode + * Function: H5FD_multi_sb_decode * - * Purpose: Decodes the superblock information for this driver. The NAME - * argument is the eight-character (plus null termination) name - * stored in the file. + * Purpose: Decodes the superblock information for this driver. The NAME + * argument is the eight-character (plus null termination) name + * stored in the file. * - * The FILE argument is updated according to the information in - * the superblock. This may mean that some member files are - * closed and others are opened. + * The FILE argument is updated according to the information in + * the superblock. This may mean that some member files are + * closed and others are opened. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, August 16, 1999 * *------------------------------------------------------------------------- @@ -722,17 +722,17 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/, static herr_t H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - char x[2*H5FD_MEM_NTYPES*8]; - H5FD_mem_t map[H5FD_MEM_NTYPES]; - int i; - size_t nseen=0; - hbool_t map_changed=FALSE; - hbool_t in_use[H5FD_MEM_NTYPES]; - const char *memb_name[H5FD_MEM_NTYPES]; - haddr_t memb_addr[H5FD_MEM_NTYPES]; - haddr_t memb_eoa[H5FD_MEM_NTYPES]; - haddr_t *ap; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + char x[2*H5FD_MEM_NTYPES*8]; + H5FD_mem_t map[H5FD_MEM_NTYPES]; + int i; + size_t nseen=0; + hbool_t map_changed=FALSE; + hbool_t in_use[H5FD_MEM_NTYPES]; + const char *memb_name[H5FD_MEM_NTYPES]; + haddr_t memb_addr[H5FD_MEM_NTYPES]; + haddr_t memb_eoa[H5FD_MEM_NTYPES]; + haddr_t *ap; static const char *func="H5FD_multi_sb_decode"; /* Function Name for error reporting */ /* Clear the error stack */ @@ -839,20 +839,20 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) return 0; } /* end H5FD_multi_sb_decode() */ - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_fapl_get + * Function: H5FD_multi_fapl_get * - * Purpose: Returns a file access property list which indicates how the - * specified file is being accessed. The return list could be - * used to access another file the same way. + * Purpose: Returns a file access property list which indicates how the + * specified file is being accessed. The return list could be + * used to access another file the same way. * - * Return: Success: Ptr to new file access property list with all - * members copied from the file struct. + * Return: Success: Ptr to new file access property list with all + * members copied from the file struct. * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, August 13, 1999 * *------------------------------------------------------------------------- @@ -860,7 +860,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) static void * H5FD_multi_fapl_get(H5FD_t *_file) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; + H5FD_multi_t *file = (H5FD_multi_t*)_file; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -868,17 +868,17 @@ H5FD_multi_fapl_get(H5FD_t *_file) return H5FD_multi_fapl_copy(&(file->fa)); } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_fapl_copy + * Function: H5FD_multi_fapl_copy * - * Purpose: Copies the multi-specific file access properties. + * Purpose: Copies the multi-specific file access properties. * - * Return: Success: Ptr to a new property list + * Return: Success: Ptr to a new property list * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -898,20 +898,20 @@ H5FD_multi_fapl_copy(const void *_old_fa) memcpy(new_fa, old_fa, sizeof(H5FD_multi_fapl_t)); ALL_MEMBERS(mt) { - if (old_fa->memb_fapl[mt]>=0) { - if (H5Iinc_ref(old_fa->memb_fapl[mt]) < 0) { + if (old_fa->memb_fapl[mt]>=0) { + if (H5Iinc_ref(old_fa->memb_fapl[mt]) < 0) { nerrors++; break; } - new_fa->memb_fapl[mt] = old_fa->memb_fapl[mt]; - } - if (old_fa->memb_name[mt]) { - new_fa->memb_name[mt] = my_strdup(old_fa->memb_name[mt]); + new_fa->memb_fapl[mt] = old_fa->memb_fapl[mt]; + } + if (old_fa->memb_name[mt]) { + new_fa->memb_name[mt] = my_strdup(old_fa->memb_name[mt]); if (NULL == new_fa->memb_name[mt]) { nerrors++; break; } - } + } } END_MEMBERS; if (nerrors) { @@ -927,17 +927,17 @@ H5FD_multi_fapl_copy(const void *_old_fa) return new_fa; } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_fapl_free + * Function: H5FD_multi_fapl_free * - * Purpose: Frees the multi-specific file access properties. + * Purpose: Frees the multi-specific file access properties. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -945,17 +945,17 @@ H5FD_multi_fapl_copy(const void *_old_fa) static herr_t H5FD_multi_fapl_free(void *_fa) { - H5FD_multi_fapl_t *fa = (H5FD_multi_fapl_t*)_fa; + H5FD_multi_fapl_t *fa = (H5FD_multi_fapl_t*)_fa; static const char *func="H5FD_multi_fapl_free"; /* Function Name for error reporting */ /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); ALL_MEMBERS(mt) { - if (fa->memb_fapl[mt]>=0) + if (fa->memb_fapl[mt]>=0) if(H5Idec_ref(fa->memb_fapl[mt])<0) H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", -1) - if (fa->memb_name[mt]) + if (fa->memb_name[mt]) free(fa->memb_name[mt]); } END_MEMBERS; free(fa); @@ -963,19 +963,19 @@ H5FD_multi_fapl_free(void *_fa) return 0; } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_open + * Function: H5FD_multi_open * - * Purpose: Creates and/or opens a multi HDF5 file. + * Purpose: Creates and/or opens a multi HDF5 file. * - * Return: Success: A pointer to a new file data structure. The - * public fields will be initialized by the - * caller, which is always H5FD_open(). + * Return: Success: A pointer to a new file data structure. The + * public fields will be initialized by the + * caller, which is always H5FD_open(). * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -983,10 +983,10 @@ H5FD_multi_fapl_free(void *_fa) static H5FD_t * H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) { - H5FD_multi_t *file=NULL; - hid_t close_fapl=-1; + H5FD_multi_t *file=NULL; + hid_t close_fapl=-1; const H5FD_multi_fapl_t *fa; - H5FD_mem_t m; + H5FD_mem_t m; static const char *func="H5FD_multi_open"; /* Function Name for error reporting */ /* Clear the error stack */ @@ -1060,19 +1060,19 @@ error: return NULL; } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_close + * Function: H5FD_multi_close * - * Purpose: Closes a multi file. + * Purpose: Closes a multi file. * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative with as many members closed as - * possible. The only subsequent operation - * permitted on the file is a close operation. + * Failure: Negative with as many members closed as + * possible. The only subsequent operation + * permitted on the file is a close operation. * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -1080,8 +1080,8 @@ error: static herr_t H5FD_multi_close(H5FD_t *_file) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - int nerrors=0; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + int nerrors=0; static const char *func="H5FD_multi_close"; /* Function Name for error reporting */ /* Clear the error stack */ @@ -1089,21 +1089,21 @@ H5FD_multi_close(H5FD_t *_file) /* Close as many members as possible */ ALL_MEMBERS(mt) { - if (file->memb[mt]) { - if (H5FDclose(file->memb[mt])<0) { + if (file->memb[mt]) { + if (H5FDclose(file->memb[mt])<0) { nerrors++; - } else { + } else { file->memb[mt] = NULL; - } - } + } + } } END_MEMBERS; if (nerrors) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1) /* Clean up other stuff */ ALL_MEMBERS(mt) { - if (file->fa.memb_fapl[mt]>=0) (void)H5Idec_ref(file->fa.memb_fapl[mt]); - if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]); + if (file->fa.memb_fapl[mt]>=0) (void)H5Idec_ref(file->fa.memb_fapl[mt]); + if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]); } END_MEMBERS; free(file->name); @@ -1111,22 +1111,22 @@ H5FD_multi_close(H5FD_t *_file) return 0; } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_cmp + * Function: H5FD_multi_cmp * - * Purpose: Compares two file families to see if they are the same. It - * does this by comparing the first common member of the two - * families. If the families have no members in common then the - * file with the earliest member is smaller than the other file. - * We abort if neither file has any members. + * Purpose: Compares two file families to see if they are the same. It + * does this by comparing the first common member of the two + * families. If the families have no members in common then the + * file with the earliest member is smaller than the other file. + * We abort if neither file has any members. * - * Return: Success: like strcmp() + * Return: Success: like strcmp() * - * Failure: never fails (arguments were checked by the - * caller). + * Failure: never fails (arguments were checked by the + * caller). * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -1134,24 +1134,24 @@ H5FD_multi_close(H5FD_t *_file) static int H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2) { - const H5FD_multi_t *f1 = (const H5FD_multi_t*)_f1; - const H5FD_multi_t *f2 = (const H5FD_multi_t*)_f2; - H5FD_mem_t out_mt = H5FD_MEM_DEFAULT; - int cmp=0; + const H5FD_multi_t *f1 = (const H5FD_multi_t*)_f1; + const H5FD_multi_t *f2 = (const H5FD_multi_t*)_f2; + H5FD_mem_t out_mt = H5FD_MEM_DEFAULT; + int cmp=0; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); ALL_MEMBERS(mt) { out_mt = mt; - if(f1->memb[mt] && f2->memb[mt]) + if(f1->memb[mt] && f2->memb[mt]) break; - if(!cmp) { - if(f1->memb[mt]) + if(!cmp) { + if(f1->memb[mt]) cmp = -1; - else if(f2->memb[mt]) + else if(f2->memb[mt]) cmp = 1; - } + } } END_MEMBERS; assert(cmp || out_mt<H5FD_MEM_NTYPES); if(out_mt>=H5FD_MEM_NTYPES) @@ -1160,18 +1160,18 @@ H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2) return H5FDcmp(f1->memb[out_mt], f2->memb[out_mt]); } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_query + * Function: H5FD_multi_query * - * Purpose: Set the flags that this VFL driver is capable of supporting. + * Purpose: Set the flags that this VFL driver is capable of supporting. * (listed in H5FDpublic.h) * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, September 26, 2000 * *------------------------------------------------------------------------- @@ -1194,16 +1194,16 @@ H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */) return(0); } /* end H5FD_multi_query() */ - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_get_type_map + * Function: H5FD_multi_get_type_map * - * Purpose: Retrieve the memory type mapping for this file + * Purpose: Retrieve the memory type mapping for this file * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, October 9, 2008 * *------------------------------------------------------------------------- @@ -1211,7 +1211,7 @@ H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */) static herr_t H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map) { - const H5FD_multi_t *file = (const H5FD_multi_t*)_file; + const H5FD_multi_t *file = (const H5FD_multi_t*)_file; /* Copy file's free space type mapping */ memcpy(type_map, file->fa.memb_map, sizeof(file->fa.memb_map)); @@ -1219,19 +1219,19 @@ H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map) return(0); } /* end H5FD_multi_get_type_map() */ - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_get_eoa + * Function: H5FD_multi_get_eoa * - * Purpose: Returns the end-of-address marker for the file. The EOA - * marker is the first address past the last byte allocated in - * the format address space. + * Purpose: Returns the end-of-address marker for the file. The EOA + * marker is the first address past the last byte allocated in + * the format address space. * - * Return: Success: The end-of-address-marker + * Return: Success: The end-of-address-marker * - * Failure: HADDR_UNDEF + * Failure: HADDR_UNDEF * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -1239,7 +1239,7 @@ H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map) static haddr_t H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) { - const H5FD_multi_t *file = (const H5FD_multi_t*)_file; + const H5FD_multi_t *file = (const H5FD_multi_t*)_file; haddr_t eoa = 0; static const char *func="H5FD_multi_get_eoa"; /* Function Name for error reporting */ @@ -1256,26 +1256,26 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) UNIQUE_MEMBERS(file->fa.memb_map, mt) { haddr_t memb_eoa; - if (file->memb[mt]) { + if (file->memb[mt]) { /* Retrieve EOA */ - H5E_BEGIN_TRY { + H5E_BEGIN_TRY { memb_eoa = H5FDget_eoa(file->memb[mt], mt); - } H5E_END_TRY; + } H5E_END_TRY; - if(HADDR_UNDEF == memb_eoa) + if(HADDR_UNDEF == memb_eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF) if(memb_eoa>0) memb_eoa += file->fa.memb_addr[mt]; - } else if(file->fa.relax) { - /* - * The member is not open yet (maybe it doesn't exist). Make the - * best guess about the end-of-file. - */ - memb_eoa = file->memb_next[mt]; - assert(HADDR_UNDEF != memb_eoa); - } else { + } else if(file->fa.relax) { + /* + * The member is not open yet (maybe it doesn't exist). Make the + * best guess about the end-of-file. + */ + memb_eoa = file->memb_next[mt]; + assert(HADDR_UNDEF != memb_eoa); + } else { H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF) - } + } if(memb_eoa > eoa) eoa = memb_eoa; @@ -1286,44 +1286,44 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) if(H5FD_MEM_DEFAULT == mmt) mmt = type; - if(file->memb[mmt]) { + if(file->memb[mmt]) { H5E_BEGIN_TRY { - eoa = H5FDget_eoa(file->memb[mmt], mmt); + eoa = H5FDget_eoa(file->memb[mmt], mmt); } H5E_END_TRY; - if(HADDR_UNDEF == eoa) + if(HADDR_UNDEF == eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF) - if(eoa > 0) + if(eoa > 0) eoa += file->fa.memb_addr[mmt]; - } else if(file->fa.relax) { - /* - * The member is not open yet (maybe it doesn't exist). Make the - * best guess about the end-of-file. - */ - eoa = file->memb_next[mmt]; - assert(HADDR_UNDEF != eoa); - } else { + } else if(file->fa.relax) { + /* + * The member is not open yet (maybe it doesn't exist). Make the + * best guess about the end-of-file. + */ + eoa = file->memb_next[mmt]; + assert(HADDR_UNDEF != eoa); + } else { H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF) - } + } } return eoa; } /* end H5FD_multi_get_eoa() */ - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_set_eoa + * Function: H5FD_multi_set_eoa * - * Purpose: Set the end-of-address marker for the file by savig the new - * EOA value in the file struct. Also set the EOA marker for the - * subfile in which the new EOA value falls. We don't set the - * EOA values of any other subfiles. + * Purpose: Set the end-of-address marker for the file by savig the new + * EOA value in the file struct. Also set the EOA marker for the + * subfile in which the new EOA value falls. We don't set the + * EOA values of any other subfiles. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -1331,9 +1331,9 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) static herr_t H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - H5FD_mem_t mmt; - herr_t status; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + H5FD_mem_t mmt; + herr_t status; static const char *func="H5FD_multi_set_eoa"; /* Function Name for error reporting */ /* Clear the error stack */ @@ -1364,7 +1364,7 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa) assert(eoa < file->memb_next[mmt]); H5E_BEGIN_TRY { - status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt])); + status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt])); } H5E_END_TRY; if(status < 0) H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1) @@ -1372,20 +1372,20 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa) return 0; } /* end H5FD_multi_set_eoa() */ - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_get_eof + * Function: H5FD_multi_get_eof * - * Purpose: Returns the end-of-file marker, which is the greater of - * either the total multi size or the current EOA marker. + * Purpose: Returns the end-of-file marker, which is the greater of + * either the total multi size or the current EOA marker. * - * Return: Success: End of file address, the first address past - * the end of the multi of files or the current - * EOA, whichever is larger. + * Return: Success: End of file address, the first address past + * the end of the multi of files or the current + * EOA, whichever is larger. * - * Failure: HADDR_UNDEF + * Failure: HADDR_UNDEF * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -1393,8 +1393,8 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa) static haddr_t H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) { - const H5FD_multi_t *file = (const H5FD_multi_t*)_file; - haddr_t eof = 0; + const H5FD_multi_t *file = (const H5FD_multi_t*)_file; + haddr_t eof = 0; static const char *func="H5FD_multi_get_eof"; /* Function Name for error reporting */ /* Clear the error stack */ @@ -1433,31 +1433,31 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) if(H5FD_MEM_DEFAULT == mmt) mmt = type; - if(file->memb[mmt]) { + if(file->memb[mmt]) { /* Retrieve EOF */ H5E_BEGIN_TRY { - eof = H5FDget_eof(file->memb[mmt], mmt); + eof = H5FDget_eof(file->memb[mmt], mmt); } H5E_END_TRY; - if(HADDR_UNDEF == eof) + if(HADDR_UNDEF == eof) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", HADDR_UNDEF) - if(eof > 0) + if(eof > 0) eof += file->fa.memb_addr[mmt]; - } else if(file->fa.relax) { - /* - * The member is not open yet (maybe it doesn't exist). Make the - * best guess about the end-of-file. - */ - eof = file->memb_next[mmt]; - assert(HADDR_UNDEF != eof); - } else { + } else if(file->fa.relax) { + /* + * The member is not open yet (maybe it doesn't exist). Make the + * best guess about the end-of-file. + */ + eof = file->memb_next[mmt]; + assert(HADDR_UNDEF != eof); + } else { H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF) - } + } } return eof; } - + /*------------------------------------------------------------------------- * Function: H5FD_multi_get_handle * @@ -1488,17 +1488,17 @@ H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle) return (H5FDget_vfd_handle(file->memb[mmt], fapl, file_handle)); } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_alloc + * Function: H5FD_multi_alloc * - * Purpose: Allocate file memory. + * Purpose: Allocate file memory. * - * Return: Success: Address of new memory + * Return: Success: Address of new memory * - * Failure: HADDR_UNDEF + * Failure: HADDR_UNDEF * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, August 12, 1999 * *------------------------------------------------------------------------- @@ -1506,9 +1506,9 @@ H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle) static haddr_t H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - H5FD_mem_t mmt; - haddr_t addr; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + H5FD_mem_t mmt; + haddr_t addr; static const char *func="H5FD_multi_alloc"; /* Function Name for error reporting */ mmt = file->fa.memb_map[type]; @@ -1529,31 +1529,31 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) /*#ifdef TMP if ( addr + size > file->eoa ) { - if ( H5FD_multi_set_eoa(_file, addr + size) < 0 ) { + if ( H5FD_multi_set_eoa(_file, addr + size) < 0 ) { H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, \ - "can't set eoa", HADDR_UNDEF) - } + "can't set eoa", HADDR_UNDEF) + } } #else if ( addr + size > file->eoa ) - file->eoa = addr + size; + file->eoa = addr + size; #endif */ return addr; } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_free + * Function: H5FD_multi_free * - * Purpose: Frees memory + * Purpose: Frees memory * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, August 12, 1999 * *------------------------------------------------------------------------- @@ -1561,8 +1561,8 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) static herr_t H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - H5FD_mem_t mmt; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + H5FD_mem_t mmt; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -1575,20 +1575,20 @@ H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsi return H5FDfree(file->memb[mmt], mmt, dxpl_id, addr-file->fa.memb_addr[mmt], size); } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_read + * Function: H5FD_multi_read * - * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR - * into buffer BUF according to data transfer properties in - * DXPL_ID. + * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR + * into buffer BUF according to data transfer properties in + * DXPL_ID. * - * Return: Success: Zero. Result is stored in caller-supplied - * buffer BUF. + * Return: Success: Zero. Result is stored in caller-supplied + * buffer BUF. * - * Failure: -1, contents of buffer BUF are undefined. + * Failure: -1, contents of buffer BUF are undefined. * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -1597,26 +1597,26 @@ static herr_t H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *_buf/*out*/) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; - haddr_t start_addr = 0; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; + haddr_t start_addr = 0; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); /* Find the file to which this address belongs */ for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) { - mmt = file->fa.memb_map[mt]; - if(H5FD_MEM_DEFAULT == mmt) + mmt = file->fa.memb_map[mt]; + if(H5FD_MEM_DEFAULT == mmt) mmt = mt; - assert(mmt > 0 && mmt < H5FD_MEM_NTYPES); + assert(mmt > 0 && mmt < H5FD_MEM_NTYPES); - if(file->fa.memb_addr[mmt] > addr) + if(file->fa.memb_addr[mmt] > addr) continue; - if(file->fa.memb_addr[mmt] >= start_addr) { - start_addr = file->fa.memb_addr[mmt]; - hi = mmt; - } /* end if */ + if(file->fa.memb_addr[mmt] >= start_addr) { + start_addr = file->fa.memb_addr[mmt]; + hi = mmt; + } /* end if */ } /* end for */ assert(hi > 0); @@ -1624,19 +1624,19 @@ H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, return H5FDread(file->memb[hi], type, dxpl_id, addr - start_addr, size, _buf); } /* end H5FD_multi_read() */ - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_write + * Function: H5FD_multi_write * - * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR - * from buffer BUF according to data transfer properties in - * DXPL_ID. + * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR + * from buffer BUF according to data transfer properties in + * DXPL_ID. * - * Return: Success: Zero + * Return: Success: Zero * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -1645,26 +1645,26 @@ static herr_t H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *_buf) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; - haddr_t start_addr = 0; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; + haddr_t start_addr = 0; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); /* Find the file to which this address belongs */ for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) { - mmt = file->fa.memb_map[mt]; - if(H5FD_MEM_DEFAULT == mmt) + mmt = file->fa.memb_map[mt]; + if(H5FD_MEM_DEFAULT == mmt) mmt = mt; - assert(mmt > 0 && mmt<H5FD_MEM_NTYPES); + assert(mmt > 0 && mmt<H5FD_MEM_NTYPES); - if(file->fa.memb_addr[mmt] > addr) + if(file->fa.memb_addr[mmt] > addr) continue; - if(file->fa.memb_addr[mmt] >= start_addr) { - start_addr = file->fa.memb_addr[mmt]; - hi = mmt; - } /* end if */ + if(file->fa.memb_addr[mmt] >= start_addr) { + start_addr = file->fa.memb_addr[mmt]; + hi = mmt; + } /* end if */ } /* end for */ assert(hi > 0); @@ -1672,17 +1672,17 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, return H5FDwrite(file->memb[hi], type, dxpl_id, addr - start_addr, size, _buf); } /* end H5FD_multi_write() */ - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_flush + * Function: H5FD_multi_flush * - * Purpose: Flushes all multi members. + * Purpose: Flushes all multi members. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1, as many files flushed as possible. + * Failure: -1, as many files flushed as possible. * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, August 4, 1999 * *------------------------------------------------------------------------- @@ -1690,13 +1690,13 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, static herr_t H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - H5FD_mem_t mt; - int nerrors=0; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + H5FD_mem_t mt; + int nerrors=0; static const char *func="H5FD_multi_flush"; /* Function Name for error reporting */ #if 0 - H5FD_mem_t mmt; + H5FD_mem_t mmt; /* Debugging stuff... */ fprintf(stderr, "multifile access information:\n"); @@ -1704,9 +1704,9 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) /* print the map */ fprintf(stderr, " map="); for (mt=1; mt<H5FD_MEM_NTYPES; mt++) { - mmt = file->memb_map[mt]; - if (H5FD_MEM_DEFAULT==mmt) mmt = mt; - fprintf(stderr, "%s%d", 1==mt?"":",", (int)mmt); + mmt = file->memb_map[mt]; + if (H5FD_MEM_DEFAULT==mmt) mmt = mt; + fprintf(stderr, "%s%d", 1==mt?"":",", (int)mmt); } fprintf(stderr, "\n"); @@ -1716,14 +1716,14 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) fprintf(stderr, " ------ -------------------- -------------------- -------------------- ------------------------------\n"); for (mt=1; mt<H5FD_MEM_NTYPES; mt++) { - if (HADDR_UNDEF!=file->memb_addr[mt]) { - haddr_t eoa = H5FDget_eoa(file->memb[mt], mt); - fprintf(stderr, " %6d %20llu %20llu %20llu %s\n", - (int)mt, (unsigned long long)(file->memb_addr[mt]), - (unsigned long long)eoa, - (unsigned long long)(file->memb_next[mt]), - file->memb_name[mt]); - } + if (HADDR_UNDEF!=file->memb_addr[mt]) { + haddr_t eoa = H5FDget_eoa(file->memb[mt], mt); + fprintf(stderr, " %6d %20llu %20llu %20llu %s\n", + (int)mt, (unsigned long long)(file->memb_addr[mt]), + (unsigned long long)eoa, + (unsigned long long)(file->memb_next[mt]), + file->memb_name[mt]); + } } #endif @@ -1732,11 +1732,11 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) /* Flush each file */ for (mt=H5FD_MEM_SUPER; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) { - if (file->memb[mt]) { - H5E_BEGIN_TRY { - if (H5FDflush(file->memb[mt],dxpl_id,closing)<0) nerrors++; - } H5E_END_TRY; - } + if (file->memb[mt]) { + H5E_BEGIN_TRY { + if (H5FDflush(file->memb[mt],dxpl_id,closing)<0) nerrors++; + } H5E_END_TRY; + } } if (nerrors) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error flushing member files", -1) @@ -1744,16 +1744,16 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) return 0; } - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_truncate + * Function: H5FD_multi_truncate * - * Purpose: Truncates all multi members. + * Purpose: Truncates all multi members. * - * Return: Success: 0 - * Failure: -1, as many files truncated as possible. + * Return: Success: 0 + * Failure: -1, as many files truncated as possible. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, January 31, 2008 * *------------------------------------------------------------------------- @@ -1761,9 +1761,9 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) static herr_t H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - H5FD_mem_t mt; - int nerrors=0; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + H5FD_mem_t mt; + int nerrors=0; static const char *func="H5FD_multi_truncate"; /* Function Name for error reporting */ /* Clear the error stack */ @@ -1771,12 +1771,12 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) /* Truncate each file */ for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) { - if(file->memb[mt]) { - H5E_BEGIN_TRY { - if(H5FDtruncate(file->memb[mt], dxpl_id, closing) < 0) + if(file->memb[mt]) { + H5E_BEGIN_TRY { + if(H5FDtruncate(file->memb[mt], dxpl_id, closing) < 0) nerrors++; - } H5E_END_TRY; - } + } H5E_END_TRY; + } } if(nerrors) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error truncating member files", -1) @@ -1784,28 +1784,28 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) return 0; } /* end H5FD_multi_truncate() */ - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_lock + * Function: H5FD_multi_lock * - * Purpose: Place a lock on all multi members. - * When there is error in locking a member file, it will not - * proceed further and will try to remove the locks of those - * member files that are locked before error is encountered. + * Purpose: Place a lock on all multi members. + * When there is error in locking a member file, it will not + * proceed further and will try to remove the locks of those + * member files that are locked before error is encountered. * - * Return: Success: 0 - * Failure: -1 + * Return: Success: 0 + * Failure: -1 * - * Programmer: Vailin Choi; March 2015 + * Programmer: Vailin Choi; March 2015 * *------------------------------------------------------------------------- */ static herr_t H5FD_multi_lock(H5FD_t *_file, hbool_t rw) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - int nerrors = 0; - H5FD_mem_t out_mt; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + int nerrors = 0; + H5FD_mem_t out_mt; static const char *func="H5FD_multi_unlock"; /* Function Name for error reporting */ /* Clear the error stack */ @@ -1842,26 +1842,26 @@ H5FD_multi_lock(H5FD_t *_file, hbool_t rw) } /* H5FD_multi_lock() */ - + /*------------------------------------------------------------------------- - * Function: H5FD_multi_unlock + * Function: H5FD_multi_unlock * - * Purpose: Remove the lock on all multi members. - * It will try to unlock all member files but will record error - * encountered. + * Purpose: Remove the lock on all multi members. + * It will try to unlock all member files but will record error + * encountered. * - * Return: Success: 0 - * Failure: -1 + * Return: Success: 0 + * Failure: -1 * - * Programmer: Vailin Choi; March 2015 + * Programmer: Vailin Choi; March 2015 * *------------------------------------------------------------------------- */ static herr_t H5FD_multi_unlock(H5FD_t *_file) { - H5FD_multi_t *file = (H5FD_multi_t*)_file; - int nerrors=0; + H5FD_multi_t *file = (H5FD_multi_t*)_file; + int nerrors=0; static const char *func="H5FD_multi_unlock"; /* Function Name for error reporting */ /* Clear the error stack */ @@ -1870,7 +1870,7 @@ H5FD_multi_unlock(H5FD_t *_file) ALL_MEMBERS(mt) { if(file->memb[mt]) if(H5FDunlock(file->memb[mt]) < 0) - nerrors++; + nerrors++; } END_MEMBERS; if(nerrors) @@ -1879,18 +1879,18 @@ H5FD_multi_unlock(H5FD_t *_file) return 0; } /* H5FD_multi_unlock() */ - + /*------------------------------------------------------------------------- - * Function: compute_next + * Function: compute_next * - * Purpose: Compute the memb_next[] values of the file based on the - * file's member map and the member starting addresses. + * Purpose: Compute the memb_next[] values of the file based on the + * file's member map and the member starting addresses. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, August 23, 1999 * *------------------------------------------------------------------------- @@ -1902,36 +1902,36 @@ compute_next(H5FD_multi_t *file) H5Eclear2(H5E_DEFAULT); ALL_MEMBERS(mt) { - file->memb_next[mt] = HADDR_UNDEF; + file->memb_next[mt] = HADDR_UNDEF; } END_MEMBERS; UNIQUE_MEMBERS(file->fa.memb_map, mt1) { - UNIQUE_MEMBERS2(file->fa.memb_map, mt2) { - if (file->fa.memb_addr[mt1]<file->fa.memb_addr[mt2] && - (HADDR_UNDEF==file->memb_next[mt1] || - file->memb_next[mt1]>file->fa.memb_addr[mt2])) { - file->memb_next[mt1] = file->fa.memb_addr[mt2]; - } - } END_MEMBERS; - if (HADDR_UNDEF==file->memb_next[mt1]) { - file->memb_next[mt1] = HADDR_MAX; /*last member*/ - } + UNIQUE_MEMBERS2(file->fa.memb_map, mt2) { + if (file->fa.memb_addr[mt1]<file->fa.memb_addr[mt2] && + (HADDR_UNDEF==file->memb_next[mt1] || + file->memb_next[mt1]>file->fa.memb_addr[mt2])) { + file->memb_next[mt1] = file->fa.memb_addr[mt2]; + } + } END_MEMBERS; + if (HADDR_UNDEF==file->memb_next[mt1]) { + file->memb_next[mt1] = HADDR_MAX; /*last member*/ + } } END_MEMBERS; return 0; } - + /*------------------------------------------------------------------------- - * Function: open_members + * Function: open_members * - * Purpose: Opens all members which are not opened yet. + * Purpose: Opens all members which are not opened yet. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, August 23, 1999 * *------------------------------------------------------------------------- @@ -1942,7 +1942,7 @@ compute_next(H5FD_multi_t *file) * tmp in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") static int open_members(H5FD_multi_t *file) { @@ -1976,9 +1976,9 @@ open_members(H5FD_multi_t *file) return 0; } -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") + - #ifdef _H5private_H /* * This is not related to the functionality of the driver code. diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h index c5d1be1..dcca0f6 100644 --- a/src/H5FDprivate.h +++ b/src/H5FDprivate.h @@ -22,13 +22,13 @@ #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 */ /**************************/ @@ -75,16 +75,16 @@ typedef struct { /* Define default file image info */ #define H5FD_DEFAULT_FILE_IMAGE_INFO { \ - /* file image buffer */ NULL, \ - /* buffer size */ 0, \ + NULL, /* file image buffer */ \ + 0, /* buffer size */ \ { /* Callbacks */ \ - /* image_malloc */ NULL, \ - /* image_memcpy */ NULL, \ - /* image_realloc */ NULL, \ - /* image_free */ NULL, \ - /* udata_copy */ NULL, \ - /* udata_free */ NULL, \ - /* udata */ NULL, \ + NULL, /* image_malloc */ \ + NULL, /* image_memcpy */ \ + NULL, /* image_realloc */ \ + NULL, /* image_free */ \ + NULL, /* udata_copy */ \ + NULL, /* udata_free */ \ + NULL, /* udata */ \ } \ } @@ -117,7 +117,7 @@ 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); + 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*/); diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 395f482..fdbafc2 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -246,6 +246,7 @@ typedef struct H5F_t H5F_t; (p) += 8; \ } +/* clang-format off */ /* Address-related macros */ #define H5F_addr_overflow(X,Z) (HADDR_UNDEF==(X) || \ HADDR_UNDEF==(X)+(haddr_t)(Z) || \ @@ -274,6 +275,7 @@ typedef struct H5F_t H5F_t; #define H5F_addr_pow2(N) ((haddr_t)1<<(N)) #define H5F_addr_overlap(O1,L1,O2,L2) (((O1) < (O2) && ((O1) + (L1)) > (O2)) || \ ((O1) >= (O2) && (O1) < ((O2) + (L2)))) +/* clang-format on */ /* If the module using this macro is allowed access to the private variables, access them directly */ #ifdef H5F_MODULE @@ -469,9 +471,11 @@ typedef struct H5F_t H5F_t; #define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */ #define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */ #define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */ -#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" /* Number of shared object header message indexes */ +/* Number of shared object header message indexes */ +#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" #define H5F_CRT_SHMSG_INDEX_TYPES_NAME "shmsg_message_types" /* Types of message in each index */ -#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" /* Minimum size of messages in each index */ +/* Minimum size of messages in each index */ +#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" #define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */ #define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */ #define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */ diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h index 9289ab5..4dd3c88 100644 --- a/src/H5Gpkg.h +++ b/src/H5Gpkg.h @@ -47,7 +47,7 @@ /* Size of a symbol table node on disk */ #define H5G_NODE_SIZE(f) ( \ /* General metadata fields */ \ - H5_SIZEOF_MAGIC \ + H5_SIZEOF_MAGIC /*magic number */ \ + 1 /* Version */ \ + 1 /* Reserved */ \ + 2 /* Number of symbols */ \ diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index 96e695d..09b2dd3 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -61,6 +61,7 @@ /* Definitions for link info settings */ #define H5G_CRT_LINK_INFO_NAME "link info" #define H5G_CRT_LINK_INFO_SIZE sizeof(H5O_linfo_t) +/* clang-format off */ #define H5G_CRT_LINK_INFO_DEF {H5G_CRT_LINFO_TRACK_CORDER, \ H5G_CRT_LINFO_INDEX_CORDER, \ H5G_CRT_LINFO_MAX_CORDER, \ @@ -69,6 +70,7 @@ H5G_CRT_LINFO_LINK_FHEAP_ADDR, \ H5G_CRT_LINFO_NAME_BT2_ADDR \ } +/* clang-format on */ /* Defaults for group info values */ #define H5G_CRT_GINFO_LHEAP_SIZE_HINT 0 @@ -82,6 +84,7 @@ /* Definitions for group info settings */ #define H5G_CRT_GROUP_INFO_NAME "group info" #define H5G_CRT_GROUP_INFO_SIZE sizeof(H5O_ginfo_t) +/* clang-format off */ #define H5G_CRT_GROUP_INFO_DEF {H5G_CRT_GINFO_LHEAP_SIZE_HINT, \ H5G_CRT_GINFO_STORE_LINK_PHASE_CHANGE, \ H5G_CRT_GINFO_MAX_COMPACT, \ @@ -90,6 +93,7 @@ H5G_CRT_GINFO_EST_NUM_ENTRIES, \ H5G_CRT_GINFO_EST_NAME_LEN \ } +/* clang-format on */ /* If the module using this macro is allowed access to the private variables, access them directly */ #ifdef H5G_MODULE diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h index df842f3..1e096ef 100644 --- a/src/H5Lprivate.h +++ b/src/H5Lprivate.h @@ -22,8 +22,8 @@ #include "H5Lpublic.h" /* Private headers needed by this file */ -#include "H5Gprivate.h" /* Groups */ -#include "H5Oprivate.h" /* Object headers */ +#include "H5Gprivate.h" /* Groups */ +#include "H5Oprivate.h" /* Object headers */ /**************************/ @@ -37,11 +37,16 @@ #define H5L_CRT_INTERMEDIATE_GROUP_NAME "intermediate_group" /* Create intermediate groups flag */ /* ======== Link access property names ======== */ -#define H5L_ACS_NLINKS_NAME "max soft links" /* Number of soft links to traverse */ -#define H5L_ACS_ELINK_PREFIX_NAME "external link prefix" /* External link prefix */ -#define H5L_ACS_ELINK_FAPL_NAME "external link fapl" /* file access property list for external link access */ -#define H5L_ACS_ELINK_FLAGS_NAME "external link flags" /* file access flags for external link traversal */ -#define H5L_ACS_ELINK_CB_NAME "external link callback" /* callback function for external link traversal */ +/* Number of soft links to traverse */ +#define H5L_ACS_NLINKS_NAME "max soft links" +/* External link prefix */ +#define H5L_ACS_ELINK_PREFIX_NAME "external link prefix" +/* file access property list for external link access */ +#define H5L_ACS_ELINK_FAPL_NAME "external link fapl" +/* file access flags for external link traversal */ +#define H5L_ACS_ELINK_FLAGS_NAME "external link flags" +/* callback function for external link traversal */ +#define H5L_ACS_ELINK_CB_NAME "external link callback" /****************************/ diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h index 861fafc..62a0b3e 100644 --- a/src/H5Lpublic.h +++ b/src/H5Lpublic.h @@ -25,10 +25,10 @@ #define _H5Lpublic_H /* Public headers needed by this file */ -#include "H5public.h" /* Generic Functions */ -#include "H5Ipublic.h" /* IDs */ -#include "H5Opublic.h" /* Object Headers */ -#include "H5Tpublic.h" /* Datatypes */ +#include "H5public.h" /* Generic Functions */ +#include "H5Ipublic.h" /* IDs */ +#include "H5Opublic.h" /* Object Headers */ +#include "H5Tpublic.h" /* Datatypes */ /*****************/ /* Public Macros */ @@ -65,10 +65,12 @@ typedef enum { H5L_TYPE_HARD = 0, /* Hard link id */ H5L_TYPE_SOFT = 1, /* Soft link id */ H5L_TYPE_EXTERNAL = 64, /* External link id */ - H5L_TYPE_MAX = 255 /* Maximum link type id */ + H5L_TYPE_MAX = 255 /* Maximum link type id */ } H5L_type_t; -#define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT /* Maximum value link value for "built-in" link types */ -#define H5L_TYPE_UD_MIN H5L_TYPE_EXTERNAL /* Link ids at or above this value are "user-defined" link types. */ +/* Maximum value link value for "built-in" link types */ +#define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT +/* Link ids at or above this value are "user-defined" link types. */ +#define H5L_TYPE_UD_MIN H5L_TYPE_EXTERNAL /* Information struct for link (for H5Lget_info2/H5Lget_info_by_idx2) * H5O_token_t version used in VOL layer and future public API calls diff --git a/src/H5MFpkg.h b/src/H5MFpkg.h index 7d72658..ef03f48 100644 --- a/src/H5MFpkg.h +++ b/src/H5MFpkg.h @@ -30,7 +30,7 @@ #include "H5MFprivate.h" /* Other private headers needed by this file */ -#include "H5FSprivate.h" /* File free space */ +#include "H5FSprivate.h" /* File free space */ /**************************/ @@ -51,9 +51,12 @@ /* Free-space section types for file */ /* (values stored in free space data structures in file) */ -#define H5MF_FSPACE_SECT_SIMPLE 0 /* For non-paged aggregation: section is a range of actual bytes in file */ -#define H5MF_FSPACE_SECT_SMALL 1 /* For paged aggregation: "small" meta/raw data section which is < fsp_size) */ -#define H5MF_FSPACE_SECT_LARGE 2 /* For paged aggregation: "large" Section which is >= fsp_size) */ +/* For non-paged aggregation: section is a range of actual bytes in file */ +#define H5MF_FSPACE_SECT_SIMPLE 0 +/* For paged aggregation: "small" meta/raw data section which is < fsp_size) */ +#define H5MF_FSPACE_SECT_SMALL 1 +/* For paged aggregation: "large" Section which is >= fsp_size) */ +#define H5MF_FSPACE_SECT_LARGE 2 /* Get section class type based on size */ #define H5MF_SECT_CLASS_TYPE(F, S) \ @@ -155,7 +158,7 @@ typedef struct H5MF_fs_t { H5F_fs_state_t *fs_state; haddr_t *fs_addr; H5FS_t **fs_man; - hsize_t align_thres; /* Threshold for alignment */ + hsize_t align_thres; /* Threshold for alignment */ hsize_t alignment; /* Alignment */ } H5MF_fs_t; diff --git a/src/H5PLint.c b/src/H5PLint.c index b69a788..7e8ad89 100644 --- a/src/H5PLint.c +++ b/src/H5PLint.c @@ -77,7 +77,7 @@ static unsigned int H5PL_plugin_control_mask_g = H5PL_ALL_PLUGIN; static hbool_t H5PL_allow_plugins_g = TRUE; - + /*------------------------------------------------------------------------- * Function: H5PL__get_plugin_control_mask * @@ -104,7 +104,7 @@ H5PL__get_plugin_control_mask(unsigned int *mask /*out*/) } /* end H5PL__get_plugin_control_mask() */ - + /*------------------------------------------------------------------------- * Function: H5PL__set_plugin_control_mask * @@ -133,7 +133,7 @@ H5PL__set_plugin_control_mask(unsigned int mask) } /* end H5PL__set_plugin_control_mask() */ - + /*------------------------------------------------------------------------- * Function: H5PL__init_package * @@ -174,7 +174,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__init_package() */ - + /*------------------------------------------------------------------------- * Function: H5PL_term_package * @@ -219,7 +219,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL_term_package() */ - + /*------------------------------------------------------------------------- * Function: H5PL_load * @@ -281,7 +281,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL_load() */ - + /*------------------------------------------------------------------------- * Function: H5PL__open * @@ -304,7 +304,7 @@ done: * get_plugin_info function pointer, but early (4.4.7, at least) gcc * only allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(pedantic) +H5_GCC_DIAG_OFF("pedantic") herr_t H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *success, const void **plugin_info) @@ -416,9 +416,9 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__open() */ -H5_GCC_DIAG_ON(pedantic) +H5_GCC_DIAG_ON("pedantic") + - /*------------------------------------------------------------------------- * Function: H5PL__close * diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c index c58828f..5a8b595 100644 --- a/src/H5PLplugin_cache.c +++ b/src/H5PLplugin_cache.c @@ -93,7 +93,7 @@ static unsigned int H5PL_num_plugins_g = 0; static unsigned int H5PL_cache_capacity_g = 0; - + /*------------------------------------------------------------------------- * Function: H5PL__create_plugin_cache * @@ -130,7 +130,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__create_plugin_cache() */ - + /*------------------------------------------------------------------------- * Function: H5PL__close_plugin_cache * @@ -170,7 +170,7 @@ H5PL__close_plugin_cache(hbool_t *already_closed /*out*/) FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__close_plugin_cache() */ - + /*------------------------------------------------------------------------- * Function: H5PL__expand_cache * @@ -205,7 +205,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__expand_cache() */ - + /*------------------------------------------------------------------------- * Function: H5PL__add_plugin * @@ -238,7 +238,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__add_plugin() */ - + /*------------------------------------------------------------------------- * Function: H5PL__find_plugin_in_cache * @@ -253,7 +253,7 @@ done: /* See the other use of H5PL_GET_LIB_FUNC() for an explanation * for why we disable -Wpedantic here. */ -H5_GCC_DIAG_OFF(pedantic) +H5_GCC_DIAG_OFF("pedantic") herr_t H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *found, const void **plugin_info) { @@ -302,5 +302,5 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__find_plugin_in_cache() */ -H5_GCC_DIAG_ON(pedantic) +H5_GCC_DIAG_ON("pedantic") diff --git a/src/H5Tconv.c b/src/H5Tconv.c index f644b21..fa2be10 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Module Info: Datatype conversions for the H5T interface. + * Module Info: Datatype conversions for the H5T interface. */ /****************/ @@ -25,15 +25,15 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ +#include "H5private.h" /* Generic Functions */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Dprivate.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5Tpkg.h" /* Datatypes */ +#include "H5Dprivate.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5Tpkg.h" /* Datatypes */ /****************/ @@ -56,57 +56,57 @@ * source value has a magnitude that cannot be represented by the destination * type. * - * Suffix Description - * ------ ----------- - * sS: Signed integers to signed integers where the destination is - * at least as wide as the source. This case cannot generate - * overflows. + * Suffix Description + * ------ ----------- + * sS: Signed integers to signed integers where the destination is + * at least as wide as the source. This case cannot generate + * overflows. * - * sU: Signed integers to unsigned integers where the destination is - * at least as wide as the source. This case experiences - * overflows when the source value is negative. + * sU: Signed integers to unsigned integers where the destination is + * at least as wide as the source. This case experiences + * overflows when the source value is negative. * - * uS: Unsigned integers to signed integers where the destination is - * at least as wide as the source. This case can experience - * overflows when the source and destination are the same size. + * uS: Unsigned integers to signed integers where the destination is + * at least as wide as the source. This case can experience + * overflows when the source and destination are the same size. * - * uU: Unsigned integers to unsigned integers where the destination - * is at least as wide as the source. Overflows are not - * possible in this case. + * uU: Unsigned integers to unsigned integers where the destination + * is at least as wide as the source. Overflows are not + * possible in this case. * - * Ss: Signed integers to signed integers where the source is at - * least as large as the destination. Overflows can occur when - * the destination is narrower than the source. + * Ss: Signed integers to signed integers where the source is at + * least as large as the destination. Overflows can occur when + * the destination is narrower than the source. * - * Su: Signed integers to unsigned integers where the source is at - * least as large as the destination. Overflows occur when the - * source value is negative and can also occur if the - * destination is narrower than the source. + * Su: Signed integers to unsigned integers where the source is at + * least as large as the destination. Overflows occur when the + * source value is negative and can also occur if the + * destination is narrower than the source. * - * Us: Unsigned integers to signed integers where the source is at - * least as large as the destination. Overflows can occur for - * all sizes. + * Us: Unsigned integers to signed integers where the source is at + * least as large as the destination. Overflows can occur for + * all sizes. * - * Uu: Unsigned integers to unsigned integers where the source is at - * least as large as the destination. Overflows can occur if the - * destination is narrower than the source. + * Uu: Unsigned integers to unsigned integers where the source is at + * least as large as the destination. Overflows can occur if the + * destination is narrower than the source. * - * su: Conversion from signed integers to unsigned integers where - * the source and destination are the same size. Overflow occurs - * when the source value is negative. + * su: Conversion from signed integers to unsigned integers where + * the source and destination are the same size. Overflow occurs + * when the source value is negative. * - * us: Conversion from unsigned integers to signed integers where - * the source and destination are the same size. Overflow - * occurs when the source magnitude is too large for the - * destination. + * us: Conversion from unsigned integers to signed integers where + * the source and destination are the same size. Overflow + * occurs when the source magnitude is too large for the + * destination. * - * fF: Floating-point values to floating-point values where the - * destination is at least as wide as the source. This case + * fF: Floating-point values to floating-point values where the + * destination is at least as wide as the source. This case * cannot generate overflows. * - * Ff: Floating-point values to floating-point values the source is at - * least as large as the destination. Overflows can occur when - * the destination is narrower than the source. + * Ff: Floating-point values to floating-point values the source is at + * least as large as the destination. Overflows can occur when + * the destination is narrower than the source. * * xF: Integers to float-point(float or double) values where the destination * is at least as wide as the source. This case cannot generate @@ -118,29 +118,29 @@ * * The macros take a subset of these arguments in the order listed here: * - * CDATA: A pointer to the H5T_cdata_t structure that was passed to the - * conversion function. + * CDATA: A pointer to the H5T_cdata_t structure that was passed to the + * conversion function. * - * STYPE: The hid_t value for the source datatype. + * STYPE: The hid_t value for the source datatype. * - * DTYPE: The hid_t value for the destination datatype. + * DTYPE: The hid_t value for the destination datatype. * - * BUF: A pointer to the conversion buffer. + * BUF: A pointer to the conversion buffer. * - * NELMTS: The number of values to be converted. + * NELMTS: The number of values to be converted. * - * ST: The C name for source datatype (e.g., int) + * ST: The C name for source datatype (e.g., int) * - * DT: The C name for the destination datatype (e.g., signed char) + * DT: The C name for the destination datatype (e.g., signed char) * - * D_MIN: The minimum possible destination value. For unsigned - * destination types this should be zero. For signed - * destination types it's a negative value with a magnitude that - * is usually one greater than D_MAX. Source values which are - * smaller than D_MIN generate overflows. + * D_MIN: The minimum possible destination value. For unsigned + * destination types this should be zero. For signed + * destination types it's a negative value with a magnitude that + * is usually one greater than D_MAX. Source values which are + * smaller than D_MIN generate overflows. * - * D_MAX: The maximum possible destination value. Source values which - * are larger than D_MAX generate overflows. + * D_MAX: The maximum possible destination value. Source values which + * are larger than D_MAX generate overflows. * * The macros are implemented with a generic programming technique, similar * to templates in C++. The macro which defines the "core" part of the @@ -155,25 +155,25 @@ * * The generic "core" macros are: (others are specific to particular conversion) * - * Suffix Description - * ------ ----------- - * xX: Generic Conversion where the destination is at least as + * Suffix Description + * ------ ----------- + * xX: Generic Conversion where the destination is at least as * wide as the source. This case cannot generate overflows. * - * Xx: Generic signed conversion where the source is at least as large + * Xx: Generic signed conversion where the source is at least as large * as the destination. Overflows can occur when the destination is * narrower than the source. * - * Ux: Generic conversion for the `Us', `Uu' & `us' cases - * Overflow occurs when the source magnitude is too large for the - * destination. + * Ux: Generic conversion for the `Us', `Uu' & `us' cases + * Overflow occurs when the source magnitude is too large for the + * destination. * */ -#define H5T_CONV_xX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ - *(D) = (DT)(*(S)); \ +#define H5T_CONV_xX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_xX_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ - *(D) = (DT)(*(S)); \ +#define H5T_CONV_xX_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ + *(D) = (DT)(*(S)); \ } /* Added a condition branch(else if (*(S) == (DT)(D_MAX))) which seems redundant. @@ -183,13 +183,13 @@ * equal. In this case, do not return exception but make sure the maximum is assigned * to the destination. SLU - 2005/06/29 */ -#define H5T_CONV_Xx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_Xx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if (*(S) > (ST)(D_MAX)) { \ H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = (DT)(D_MAX); \ + *(D) = (DT)(D_MAX); \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ @@ -198,69 +198,69 @@ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = (DT)(D_MIN); \ + *(D) = (DT)(D_MIN); \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ - } else \ - *(D) = (DT)(*(S)); \ + } else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_Xx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_Xx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if (*(S) > (ST)(D_MAX)) { \ - *(D) = (DT)(D_MAX); \ + *(D) = (DT)(D_MAX); \ } else if (*(S) < (ST)(D_MIN)) { \ - *(D) = (DT)(D_MIN); \ - } else \ - *(D) = (DT)(*(S)); \ + *(D) = (DT)(D_MIN); \ + } else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_Ux_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_Ux_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if (*(S) > (ST)(D_MAX)) { \ H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = (DT)(D_MAX); \ + *(D) = (DT)(D_MAX); \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ - } else \ - *(D) = (DT)(*(S)); \ + } else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_Ux_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_Ux_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if (*(S) > (ST)(D_MAX)) { \ - *(D) = (DT)(D_MAX); \ - } else \ - *(D) = (DT)(*(S)); \ + *(D) = (DT)(D_MAX); \ + } else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_sS(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ - HDcompile_assert(sizeof(ST)<=sizeof(DT)); \ +#define H5T_CONV_sS(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + HDcompile_assert(sizeof(ST)<=sizeof(DT)); \ H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } -#define H5T_CONV_sU_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_sU_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if (*(S) < 0) { \ H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = 0; \ + *(D) = 0; \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ - } else \ - *(D) = (DT)(*(S)); \ + } else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_sU_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_sU_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if(*(S) < 0) \ - *(D) = 0; \ - else \ - *(D) = (DT)(*(S)); \ + *(D) = 0; \ + else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_sU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ - HDcompile_assert(sizeof(ST)<=sizeof(DT)); \ +#define H5T_CONV_sU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + HDcompile_assert(sizeof(ST)<=sizeof(DT)); \ H5T_CONV(H5T_CONV_sU, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } @@ -348,23 +348,23 @@ H5T_CONV(H5T_CONV_uS, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } -#define H5T_CONV_uU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ - HDcompile_assert(sizeof(ST)<=sizeof(DT)); \ +#define H5T_CONV_uU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + HDcompile_assert(sizeof(ST)<=sizeof(DT)); \ H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } -#define H5T_CONV_Ss(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ - HDcompile_assert(sizeof(ST)>=sizeof(DT)); \ +#define H5T_CONV_Ss(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + HDcompile_assert(sizeof(ST)>=sizeof(DT)); \ H5T_CONV(H5T_CONV_Xx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } -#define H5T_CONV_Su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_Su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if(*(S) < 0) { \ H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = 0; \ + *(D) = 0; \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ @@ -373,106 +373,106 @@ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = (DT)(D_MAX); \ + *(D) = (DT)(D_MAX); \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ - } else \ - *(D) = (DT)(*(S)); \ + } else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_Su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_Su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if(*(S) < 0) \ - *(D) = 0; \ + *(D) = 0; \ else if (sizeof(ST)>sizeof(DT) && *(S) > (ST)(D_MAX)) \ - *(D) = (DT)(D_MAX); \ - else \ - *(D) = (DT)(*(S)); \ + *(D) = (DT)(D_MAX); \ + else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_Su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ - HDcompile_assert(sizeof(ST)>=sizeof(DT)); \ +#define H5T_CONV_Su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + HDcompile_assert(sizeof(ST)>=sizeof(DT)); \ H5T_CONV(H5T_CONV_Su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } -#define H5T_CONV_Us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ - HDcompile_assert(sizeof(ST)>=sizeof(DT)); \ +#define H5T_CONV_Us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + HDcompile_assert(sizeof(ST)>=sizeof(DT)); \ H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } -#define H5T_CONV_Uu(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ - HDcompile_assert(sizeof(ST)>=sizeof(DT)); \ +#define H5T_CONV_Uu(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + HDcompile_assert(sizeof(ST)>=sizeof(DT)); \ H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } -#define H5T_CONV_su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ - /* Assumes memory format of unsigned & signed integers is same */ \ +#define H5T_CONV_su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ + /* Assumes memory format of unsigned & signed integers is same */ \ if(*(S) < 0) { \ H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = 0; \ + *(D) = 0; \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ - } else \ - *(D) = (DT)(*(S)); \ + } else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ - /* Assumes memory format of unsigned & signed integers is same */ \ +#define H5T_CONV_su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ + /* Assumes memory format of unsigned & signed integers is same */ \ if(*(S) < 0) \ - *(D) = 0; \ - else \ - *(D) = (DT)(*(S)); \ + *(D) = 0; \ + else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ - HDcompile_assert(sizeof(ST)==sizeof(DT)); \ +#define H5T_CONV_su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + HDcompile_assert(sizeof(ST)==sizeof(DT)); \ H5T_CONV(H5T_CONV_su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } -#define H5T_CONV_us_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ - /* Assumes memory format of unsigned & signed integers is same */ \ +#define H5T_CONV_us_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ + /* Assumes memory format of unsigned & signed integers is same */ \ if (*(S) > (ST)(D_MAX)) { \ H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = (DT)(D_MAX); \ + *(D) = (DT)(D_MAX); \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ - } else \ - *(D) = (DT)(*(S)); \ + } else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_us_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ - /* Assumes memory format of unsigned & signed integers is same */ \ +#define H5T_CONV_us_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ + /* Assumes memory format of unsigned & signed integers is same */ \ if(*(S) > (ST)(D_MAX)) \ - *(D) = (DT)(D_MAX); \ - else \ - *(D) = (DT)(*(S)); \ + *(D) = (DT)(D_MAX); \ + else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ - HDcompile_assert(sizeof(ST)==sizeof(DT)); \ +#define H5T_CONV_us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + HDcompile_assert(sizeof(ST)==sizeof(DT)); \ H5T_CONV(H5T_CONV_us, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } -#define H5T_CONV_fF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ - HDcompile_assert(sizeof(ST)<=sizeof(DT)); \ +#define H5T_CONV_fF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + HDcompile_assert(sizeof(ST)<=sizeof(DT)); \ H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } /* Same as H5T_CONV_Xx_CORE, except that instead of using D_MAX and D_MIN * when an overflow occurs, use the 'float' infinity values. */ -#define H5T_CONV_Ff_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_Ff_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if(*(S) > (ST)(D_MAX)) { \ H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \ + *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ @@ -481,24 +481,24 @@ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \ + *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ - } else \ - *(D) = (DT)(*(S)); \ + } else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_Ff_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_Ff_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if(*(S) > (ST)(D_MAX)) \ - *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \ + *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \ else if (*(S) < (ST)(D_MIN)) \ - *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \ - else \ - *(D) = (DT)(*(S)); \ + *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \ + else \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_Ff(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ - HDcompile_assert(sizeof(ST)>=sizeof(DT)); \ +#define H5T_CONV_Ff(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + HDcompile_assert(sizeof(ST)>=sizeof(DT)); \ H5T_CONV(H5T_CONV_Ff, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \ } @@ -561,35 +561,35 @@ LO = count; \ } -#define H5T_CONV_xF_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ - if (sprec > dprec) { \ +#define H5T_CONV_xF_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ + if (sprec > dprec) { \ unsigned low_bit_pos, high_bit_pos; \ \ /* Detect high & low bits set in source */ \ H5T_HI_LO_BIT_SET(ST, *(S), low_bit_pos, high_bit_pos) \ \ /* Check for more bits of precision in src than available in dst */ \ - if((high_bit_pos - low_bit_pos) >= dprec) { \ + if((high_bit_pos - low_bit_pos) >= dprec) { \ H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_PRECISION, \ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = (DT)(*(S)); \ + *(D) = (DT)(*(S)); \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ - } \ + } \ else \ - *(D) = (DT)(*(S)); \ - } \ + *(D) = (DT)(*(S)); \ + } \ else \ - *(D) = (DT)(*(S)); \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_xF_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ - *(D) = (DT)(*(S)); \ +#define H5T_CONV_xF_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_xF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_xF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ H5T_CONV(H5T_CONV_xF, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \ } @@ -601,13 +601,13 @@ * (ST)(D_MAX))) is for some compilers like Sun, HP, IBM, and SGI where under * the same situation the "int" doesn't overflow. SLU - 2005/9/12 */ -#define H5T_CONV_Fx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_Fx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if(*(S) > (ST)(D_MAX) || (sprec < dprec && *(S) == (ST)(D_MAX))) { \ H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = (DT)(D_MAX); \ + *(D) = (DT)(D_MAX); \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ @@ -616,7 +616,7 @@ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = (DT)(D_MIN); \ + *(D) = (DT)(D_MIN); \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ @@ -625,24 +625,24 @@ src_id, dst_id, S, D, cb_struct.user_data); \ if(except_ret == H5T_CONV_UNHANDLED) \ /* Let compiler convert if case is ignored by user handler*/ \ - *(D) = (DT)(*(S)); \ + *(D) = (DT)(*(S)); \ else if(except_ret == H5T_CONV_ABORT) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ - } \ + } \ else \ - *(D) = (DT)(*(S)); \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_Fx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_Fx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ if(*(S) > (ST)(D_MAX)) \ - *(D) = (DT)(D_MAX); \ + *(D) = (DT)(D_MAX); \ else if(*(S) < (ST)(D_MIN)) \ - *(D) = (DT)(D_MIN); \ + *(D) = (DT)(D_MIN); \ else \ - *(D) = (DT)(*(S)); \ + *(D) = (DT)(*(S)); \ } -#define H5T_CONV_Fx(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ +#define H5T_CONV_Fx(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ H5T_CONV(H5T_CONV_Fx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \ } @@ -651,146 +651,146 @@ * to do them all. */ #ifndef H5_WANT_DCONV_EXCEPTION -#define H5T_CONV_NO_EXCEPT_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ - *(D) = (DT)(*(S)); \ +#define H5T_CONV_NO_EXCEPT_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \ + *(D) = (DT)(*(S)); \ } #endif /* H5_WANT_DCONV_EXCEPTION */ /* The main part of every integer hardware conversion macro */ -#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX,PREC) \ +#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX,PREC) \ { \ herr_t ret_value=SUCCEED; /* Return value */ \ \ FUNC_ENTER_PACKAGE \ \ { \ - size_t elmtno; /*element number */ \ + size_t elmtno; /*element number */ \ H5T_CONV_DECL_PREC(PREC) /*declare precision variables, or not */ \ - void *src_buf; /*'raw' source buffer */ \ - void *dst_buf; /*'raw' destination buffer */ \ - ST *src, *s; /*source buffer */ \ - DT *dst, *d; /*destination buffer */ \ - H5T_t *st, *dt; /*datatype descriptors */ \ - ST src_aligned; /*source aligned type */ \ - DT dst_aligned; /*destination aligned type */ \ - hbool_t s_mv, d_mv; /*move data to align it? */ \ - ssize_t s_stride, d_stride; /*src and dst strides */ \ + void *src_buf; /*'raw' source buffer */ \ + void *dst_buf; /*'raw' destination buffer */ \ + ST *src, *s; /*source buffer */ \ + DT *dst, *d; /*destination buffer */ \ + H5T_t *st, *dt; /*datatype descriptors */ \ + ST src_aligned; /*source aligned type */ \ + DT dst_aligned; /*destination aligned type */ \ + hbool_t s_mv, d_mv; /*move data to align it? */ \ + ssize_t s_stride, d_stride; /*src and dst strides */ \ size_t safe; /*how many elements are safe to process in each pass */ \ H5T_conv_cb_t cb_struct; /*conversion callback structure */ \ \ - switch (cdata->command) { \ - case H5T_CONV_INIT: \ - /* Sanity check and initialize statistics */ \ - cdata->need_bkg = H5T_BKG_NO; \ + switch (cdata->command) { \ + case H5T_CONV_INIT: \ + /* Sanity check and initialize statistics */ \ + cdata->need_bkg = H5T_BKG_NO; \ if (NULL==(st=(H5T_t*)H5I_object(src_id)) || NULL==(dt=(H5T_t*)H5I_object(dst_id))) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \ - "unable to dereference datatype object ID") \ - if (st->shared->size!=sizeof(ST) || dt->shared->size!=sizeof(DT)) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \ - "disagreement about datatype size") \ - CI_ALLOC_PRIV \ - break; \ - \ - case H5T_CONV_FREE: \ - /* Print and free statistics */ \ - CI_PRINT_STATS(STYPE,DTYPE); \ - CI_FREE_PRIV \ - break; \ - \ - case H5T_CONV_CONV: \ - /* Initialize source & destination strides */ \ - if (buf_stride) { \ - HDassert(buf_stride >= sizeof(ST)); \ - HDassert(buf_stride >= sizeof(DT)); \ - s_stride = d_stride = (ssize_t)buf_stride; \ - } else { \ - s_stride = sizeof(ST); \ - d_stride = sizeof(DT); \ - } \ - \ - /* Is alignment required for source or dest? */ \ - s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \ - ((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \ - /* Cray */ ((size_t)((ST*)buf)!=(size_t)buf) || \ - (size_t)s_stride%H5T_NATIVE_##STYPE##_ALIGN_g); \ - d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \ - ((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \ - /* Cray */ ((size_t)((DT*)buf)!=(size_t)buf) || \ - (size_t)d_stride%H5T_NATIVE_##DTYPE##_ALIGN_g); \ - CI_INC_SRC(s_mv) \ - CI_INC_DST(d_mv) \ - \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \ + "unable to dereference datatype object ID") \ + if (st->shared->size!=sizeof(ST) || dt->shared->size!=sizeof(DT)) \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \ + "disagreement about datatype size") \ + CI_ALLOC_PRIV \ + break; \ + \ + case H5T_CONV_FREE: \ + /* Print and free statistics */ \ + CI_PRINT_STATS(STYPE,DTYPE); \ + CI_FREE_PRIV \ + break; \ + \ + case H5T_CONV_CONV: \ + /* Initialize source & destination strides */ \ + if (buf_stride) { \ + HDassert(buf_stride >= sizeof(ST)); \ + HDassert(buf_stride >= sizeof(DT)); \ + s_stride = d_stride = (ssize_t)buf_stride; \ + } else { \ + s_stride = sizeof(ST); \ + d_stride = sizeof(DT); \ + } \ + \ + /* Is alignment required for source or dest? */ \ + s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \ + ((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \ + /* Cray */ ((size_t)((ST*)buf)!=(size_t)buf) || \ + (size_t)s_stride%H5T_NATIVE_##STYPE##_ALIGN_g); \ + d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \ + ((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \ + /* Cray */ ((size_t)((DT*)buf)!=(size_t)buf) || \ + (size_t)d_stride%H5T_NATIVE_##DTYPE##_ALIGN_g); \ + CI_INC_SRC(s_mv) \ + CI_INC_DST(d_mv) \ + \ /* Get conversion exception callback property */ \ if(H5CX_get_dt_conv_cb(&cb_struct) < 0) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback") \ \ - /* Get source and destination datatypes */ \ + /* Get source and destination datatypes */ \ if(NULL == (st = (H5T_t *)H5I_object(src_id)) || NULL == (dt = (H5T_t *)H5I_object(dst_id))) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to dereference datatype object ID") \ - \ + \ H5T_CONV_SET_PREC(PREC) /*init precision variables, or not */ \ \ /* The outer loop of the type conversion macro, controlling which */ \ - /* direction the buffer is walked */ \ - while (nelmts>0) { \ - /* Check if we need to go backwards through the buffer */ \ - if(d_stride>s_stride) { \ + /* direction the buffer is walked */ \ + while (nelmts>0) { \ + /* Check if we need to go backwards through the buffer */ \ + if(d_stride>s_stride) { \ /* Compute the number of "safe" destination elements at */ \ /* the end of the buffer (Those which don't overlap with */ \ /* any source elements at the beginning of the buffer) */ \ safe = nelmts - (((nelmts * (size_t)s_stride) + (size_t)(d_stride - 1)) / (size_t)d_stride); \ - \ + \ /* If we're down to the last few elements, just wrap up */ \ - /* with a "real" reverse copy */ \ - if(safe<2) { \ + /* with a "real" reverse copy */ \ + if(safe<2) { \ src = (ST *)(src_buf = (void *)((uint8_t *)buf + (nelmts - 1) * (size_t)s_stride)); \ dst = (DT *)(dst_buf = (void *)((uint8_t *)buf + (nelmts - 1) * (size_t)d_stride)); \ - s_stride = -s_stride; \ - d_stride = -d_stride; \ - \ - safe=nelmts; \ - } /* end if */ \ - else { \ + s_stride = -s_stride; \ + d_stride = -d_stride; \ + \ + safe=nelmts; \ + } /* end if */ \ + else { \ src = (ST *)(src_buf = (void *)((uint8_t *)buf + (nelmts - safe) * (size_t)s_stride)); \ dst = (DT *)(dst_buf = (void *)((uint8_t *)buf + (nelmts - safe) * (size_t)d_stride)); \ - } /* end else */ \ - } /* end if */ \ - else { \ - /* Single forward pass over all data */ \ - src = (ST *)(src_buf = buf); \ - dst = (DT *)(dst_buf = buf); \ - safe=nelmts; \ - } /* end else */ \ + } /* end else */ \ + } /* end if */ \ + else { \ + /* Single forward pass over all data */ \ + src = (ST *)(src_buf = buf); \ + dst = (DT *)(dst_buf = buf); \ + safe=nelmts; \ + } /* end else */ \ \ - /* Perform loop over elements to convert */ \ - if (s_mv && d_mv) { \ - /* Alignment is required for both source and dest */ \ - s = &src_aligned; \ + /* Perform loop over elements to convert */ \ + if (s_mv && d_mv) { \ + /* Alignment is required for both source and dest */ \ + s = &src_aligned; \ H5T_CONV_LOOP_OUTER(PRE_SALIGN,PRE_DALIGN,POST_SALIGN,POST_DALIGN,GUTS,STYPE,DTYPE,s,d,ST,DT,D_MIN,D_MAX) \ - } else if(s_mv) { \ - /* Alignment is required only for source */ \ - s = &src_aligned; \ + } else if(s_mv) { \ + /* Alignment is required only for source */ \ + s = &src_aligned; \ H5T_CONV_LOOP_OUTER(PRE_SALIGN,PRE_DNOALIGN,POST_SALIGN,POST_DNOALIGN,GUTS,STYPE,DTYPE,s,dst,ST,DT,D_MIN,D_MAX) \ - } else if(d_mv) { \ - /* Alignment is required only for destination */ \ + } else if(d_mv) { \ + /* Alignment is required only for destination */ \ H5T_CONV_LOOP_OUTER(PRE_SNOALIGN,PRE_DALIGN,POST_SNOALIGN,POST_DALIGN,GUTS,STYPE,DTYPE,src,d,ST,DT,D_MIN,D_MAX) \ - } else { \ + } else { \ /* Alignment is not required for both source and destination */ \ H5T_CONV_LOOP_OUTER(PRE_SNOALIGN,PRE_DNOALIGN,POST_SNOALIGN,POST_DNOALIGN,GUTS,STYPE,DTYPE,src,dst,ST,DT,D_MIN,D_MAX) \ - } \ - \ - /* Decrement number of elements left to convert */ \ - nelmts-=safe; \ - } /* end while */ \ - break; \ - \ - default: \ - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ - "unknown conversion command"); \ - } \ + } \ + \ + /* Decrement number of elements left to convert */ \ + nelmts-=safe; \ + } /* end while */ \ + break; \ + \ + default: \ + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ + "unknown conversion command"); \ + } \ } \ - \ + \ done: \ FUNC_LEAVE_NOAPI(ret_value) \ } @@ -799,9 +799,9 @@ done: \ #define H5T_CONV_DECL_PREC(PREC) H5_GLUE(H5T_CONV_DECL_PREC_, PREC) #define H5T_CONV_DECL_PREC_Y \ - size_t sprec; /*source precision */ \ - size_t dprec; /*destination precision */ \ - H5T_class_t tclass; /*datatype's class */ + size_t sprec; /*source precision */ \ + size_t dprec; /*destination precision */ \ + H5T_class_t tclass; /*datatype's class */ #define H5T_CONV_DECL_PREC_N /*no precision variables */ @@ -809,60 +809,60 @@ done: \ #define H5T_CONV_SET_PREC(PREC) H5_GLUE(H5T_CONV_SET_PREC_, PREC) #define H5T_CONV_SET_PREC_Y \ - /* Get source & destination precisions into a variable */ \ - tclass = st->shared->type; \ - HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \ - if(tclass == H5T_INTEGER) \ - sprec = st->shared->u.atomic.prec; \ - else \ - sprec = 1 + st->shared->u.atomic.u.f.msize; \ - tclass = dt->shared->type; \ - HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \ - if(tclass == H5T_INTEGER) \ - dprec = dt->shared->u.atomic.prec; \ - else \ + /* Get source & destination precisions into a variable */ \ + tclass = st->shared->type; \ + HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \ + if(tclass == H5T_INTEGER) \ + sprec = st->shared->u.atomic.prec; \ + else \ + sprec = 1 + st->shared->u.atomic.u.f.msize; \ + tclass = dt->shared->type; \ + HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \ + if(tclass == H5T_INTEGER) \ + dprec = dt->shared->u.atomic.prec; \ + else \ dprec = 1 + dt->shared->u.atomic.u.f.msize; #define H5T_CONV_SET_PREC_N /*don't init precision variables */ /* Macro defining action on source data which needs to be aligned (before main action) */ -#define H5T_CONV_LOOP_PRE_SALIGN(ST) { \ - H5MM_memcpy(&src_aligned, src, sizeof(ST)); \ +#define H5T_CONV_LOOP_PRE_SALIGN(ST) { \ + H5MM_memcpy(&src_aligned, src, sizeof(ST)); \ } /* Macro defining action on source data which doesn't need to be aligned (before main action) */ -#define H5T_CONV_LOOP_PRE_SNOALIGN(ST) { \ +#define H5T_CONV_LOOP_PRE_SNOALIGN(ST) { \ } /* Macro defining action on destination data which needs to be aligned (before main action) */ -#define H5T_CONV_LOOP_PRE_DALIGN(DT) { \ - d = &dst_aligned; \ +#define H5T_CONV_LOOP_PRE_DALIGN(DT) { \ + d = &dst_aligned; \ } /* Macro defining action on destination data which doesn't need to be aligned (before main action) */ -#define H5T_CONV_LOOP_PRE_DNOALIGN(DT) { \ +#define H5T_CONV_LOOP_PRE_DNOALIGN(DT) { \ } /* Macro defining action on source data which needs to be aligned (after main action) */ -#define H5T_CONV_LOOP_POST_SALIGN(ST) { \ +#define H5T_CONV_LOOP_POST_SALIGN(ST) { \ } /* Macro defining action on source data which doesn't need to be aligned (after main action) */ -#define H5T_CONV_LOOP_POST_SNOALIGN(ST) { \ +#define H5T_CONV_LOOP_POST_SNOALIGN(ST) { \ } /* Macro defining action on destination data which needs to be aligned (after main action) */ -#define H5T_CONV_LOOP_POST_DALIGN(DT) { \ - H5MM_memcpy(dst, &dst_aligned, sizeof(DT)); \ +#define H5T_CONV_LOOP_POST_DALIGN(DT) { \ + H5MM_memcpy(dst, &dst_aligned, sizeof(DT)); \ } /* Macro defining action on destination data which doesn't need to be aligned (after main action) */ -#define H5T_CONV_LOOP_POST_DNOALIGN(DT) { \ +#define H5T_CONV_LOOP_POST_DNOALIGN(DT) { \ } /* The outer wrapper for the type conversion loop, to check for an exception handling routine */ #define H5T_CONV_LOOP_OUTER(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \ - if(cb_struct.func) { \ + if(cb_struct.func) { \ H5T_CONV_LOOP(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \ } \ else { \ @@ -871,36 +871,36 @@ done: \ /* The inner loop of the type conversion macro, actually converting the elements */ #define H5T_CONV_LOOP(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \ - for (elmtno=0; elmtno<safe; elmtno++) { \ - /* Handle source pre-alignment */ \ - H5_GLUE(H5T_CONV_LOOP_,PRE_SALIGN_GUTS)(ST) \ + for (elmtno=0; elmtno<safe; elmtno++) { \ + /* Handle source pre-alignment */ \ + H5_GLUE(H5T_CONV_LOOP_,PRE_SALIGN_GUTS)(ST) \ \ - /* Handle destination pre-alignment */ \ - H5_GLUE(H5T_CONV_LOOP_,PRE_DALIGN_GUTS)(DT) \ + /* Handle destination pre-alignment */ \ + H5_GLUE(H5T_CONV_LOOP_,PRE_DALIGN_GUTS)(DT) \ \ - /* ... user-defined stuff here -- the conversion ... */ \ - H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \ + /* ... user-defined stuff here -- the conversion ... */ \ + H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \ \ - /* Handle source post-alignment */ \ - H5_GLUE(H5T_CONV_LOOP_,POST_SALIGN_GUTS)(ST) \ + /* Handle source post-alignment */ \ + H5_GLUE(H5T_CONV_LOOP_,POST_SALIGN_GUTS)(ST) \ \ - /* Handle destination post-alignment */ \ - H5_GLUE(H5T_CONV_LOOP_,POST_DALIGN_GUTS)(DT) \ + /* Handle destination post-alignment */ \ + H5_GLUE(H5T_CONV_LOOP_,POST_DALIGN_GUTS)(DT) \ \ - /* Advance pointers */ \ - src_buf = (void *)((uint8_t *)src_buf + s_stride); \ - src = (ST *)src_buf; \ - dst_buf = (void *)((uint8_t *)dst_buf + d_stride); \ - dst = (DT *)dst_buf; \ + /* Advance pointers */ \ + src_buf = (void *)((uint8_t *)src_buf + s_stride); \ + src = (ST *)src_buf; \ + dst_buf = (void *)((uint8_t *)dst_buf + d_stride); \ + dst = (DT *)dst_buf; \ } /* Macro to call the actual "guts" of the type conversion, or call the "no exception" guts */ #ifdef H5_WANT_DCONV_EXCEPTION -#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \ - /* ... user-defined stuff here -- the conversion ... */ \ +#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \ + /* ... user-defined stuff here -- the conversion ... */ \ H5_GLUE(GUTS,_CORE)(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) #else /* H5_WANT_DCONV_EXCEPTION */ -#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \ +#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \ H5_GLUE(H5T_CONV_NO_EXCEPT,_CORE)(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) #endif /* H5_WANT_DCONV_EXCEPTION */ @@ -908,27 +908,27 @@ done: \ #ifdef H5T_DEBUG /* Print alignment statistics */ -# define CI_PRINT_STATS(STYPE,DTYPE) { \ - if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \ - HDfprintf(H5DEBUG(T), \ - " %Hu src elements aligned on %lu-byte boundaries\n", \ - ((H5T_conv_hw_t *)cdata->priv)->s_aligned, \ - (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \ - } \ - if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \ - HDfprintf(H5DEBUG(T), \ - " %Hu dst elements aligned on %lu-byte boundaries\n", \ - ((H5T_conv_hw_t *)cdata->priv)->d_aligned, \ - (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \ - } \ +# define CI_PRINT_STATS(STYPE,DTYPE) { \ + if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \ + HDfprintf(H5DEBUG(T), \ + " %Hu src elements aligned on %lu-byte boundaries\n", \ + ((H5T_conv_hw_t *)cdata->priv)->s_aligned, \ + (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \ + } \ + if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \ + HDfprintf(H5DEBUG(T), \ + " %Hu dst elements aligned on %lu-byte boundaries\n", \ + ((H5T_conv_hw_t *)cdata->priv)->d_aligned, \ + (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \ + } \ } /* Allocate private alignment structure for atomic types */ # define CI_ALLOC_PRIV \ - if (NULL==(cdata->priv=H5MM_calloc(sizeof(H5T_conv_hw_t)))) { \ - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \ - "memory allocation failed"); \ - } + if (NULL==(cdata->priv=H5MM_calloc(sizeof(H5T_conv_hw_t)))) { \ + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \ + "memory allocation failed"); \ + } /* Free private alignment structure for atomic types */ # define CI_FREE_PRIV \ @@ -960,25 +960,25 @@ done: \ /* Conversion data for H5T__conv_struct() */ typedef struct H5T_conv_struct_t { - int *src2dst; /*mapping from src to dst member num */ - hid_t *src_memb_id; /*source member type ID's */ - hid_t *dst_memb_id; /*destination member type ID's */ - H5T_path_t **memb_path; /*conversion path for each member */ + int *src2dst; /*mapping from src to dst member num */ + hid_t *src_memb_id; /*source member type ID's */ + hid_t *dst_memb_id; /*destination member type ID's */ + H5T_path_t **memb_path; /*conversion path for each member */ H5T_subset_info_t subset_info; /*info related to compound subsets */ unsigned src_nmembs; /*needed by free function */ } H5T_conv_struct_t; /* Conversion data for H5T__conv_enum() */ typedef struct H5T_enum_struct_t { - int base; /*lowest `in' value */ - unsigned length; /*num elements in arrays */ - int *src2dst; /*map from src to dst index */ + int base; /*lowest `in' value */ + unsigned length; /*num elements in arrays */ + int *src2dst; /*map from src to dst index */ } H5T_enum_struct_t; /* Conversion data for the hardware conversion functions */ typedef struct H5T_conv_hw_t { - size_t s_aligned; /*number source elements aligned */ - size_t d_aligned; /*number destination elements aligned*/ + size_t s_aligned; /*number source elements aligned */ + size_t d_aligned; /*number destination elements aligned*/ } H5T_conv_hw_t; /********************/ @@ -992,7 +992,7 @@ typedef struct H5T_conv_hw_t { static herr_t H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order); - + /*********************/ /* Public Variables */ /*********************/ @@ -1021,17 +1021,17 @@ H5FL_BLK_DEFINE_STATIC(array_seq); /* Declare a free list to manage pieces of reference data */ H5FL_BLK_DEFINE_STATIC(ref_seq); - + /*------------------------------------------------------------------------- - * Function: H5T__conv_noop + * Function: H5T__conv_noop * - * Purpose: The no-op conversion. The library knows about this - * conversion without it being registered. + * Purpose: The no-op conversion. The library knows about this + * conversion without it being registered. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Wednesday, January 14, 1998 + * Programmer: Robb Matzke + * Wednesday, January 14, 1998 * *------------------------------------------------------------------------- */ @@ -1065,20 +1065,20 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_noop() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_order_opt + * Function: H5T__conv_order_opt * - * Purpose: Convert one type to another when byte order is the only - * difference. This is the optimized version of H5T__conv_order() + * Purpose: Convert one type to another when byte order is the only + * difference. This is the optimized version of H5T__conv_order() * for a handful of different sizes. * - * Note: This is a soft conversion function. + * Note: This is a soft conversion function. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Friday, January 25, 2002 + * Programmer: Robb Matzke + * Friday, January 25, 2002 * *------------------------------------------------------------------------- */ @@ -1088,9 +1088,9 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *background) { - uint8_t *buf = (uint8_t*)_buf; - H5T_t *src = NULL; - H5T_t *dst = NULL; + uint8_t *buf = (uint8_t*)_buf; + H5T_t *src = NULL; + H5T_t *dst = NULL; size_t i; herr_t ret_value = SUCCEED; /* Return value */ @@ -1480,30 +1480,30 @@ done: /*------------------------------------------------------------------------- - * Function: H5T__conv_order + * Function: H5T__conv_order * - * Purpose: Convert one type to another when byte order is the only - * difference. + * Purpose: Convert one type to another when byte order is the only + * difference. * - * Note: This is a soft conversion function. + * Note: This is a soft conversion function. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Tuesday, January 13, 1998 + * Programmer: Robb Matzke + * Tuesday, January 13, 1998 * *------------------------------------------------------------------------- */ herr_t H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *background) { - uint8_t *buf = (uint8_t*)_buf; - H5T_t *src = NULL; - H5T_t *dst = NULL; - size_t i; - size_t j, md; + uint8_t *buf = (uint8_t*)_buf; + H5T_t *src = NULL; + H5T_t *dst = NULL; + size_t i; + size_t j, md; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -1580,34 +1580,34 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_order() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_b_b + * Function: H5T__conv_b_b * - * Purpose: Convert from one bitfield to any other bitfield. + * Purpose: Convert from one bitfield to any other bitfield. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Thursday, May 20, 1999 + * Programmer: Robb Matzke + * Thursday, May 20, 1999 * *------------------------------------------------------------------------- */ herr_t H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *background) { - uint8_t *buf = (uint8_t*)_buf; - H5T_t *src = NULL, *dst = NULL; /*source and dest datatypes */ - ssize_t direction; /*direction of traversal */ - size_t elmtno; /*element number */ - size_t olap; /*num overlapping elements */ - size_t half_size; /*1/2 of total size for swapping*/ - uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ - uint8_t dbuf[256]; /*temp destination buffer */ - size_t msb_pad_offset; /*offset for dest MSB padding */ - size_t i; + uint8_t *buf = (uint8_t*)_buf; + H5T_t *src = NULL, *dst = NULL; /*source and dest datatypes */ + ssize_t direction; /*direction of traversal */ + size_t elmtno; /*element number */ + size_t olap; /*num overlapping elements */ + size_t half_size; /*1/2 of total size for swapping*/ + uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ + uint8_t dbuf[256]; /*temp destination buffer */ + size_t msb_pad_offset; /*offset for dest MSB padding */ + size_t i; uint8_t *src_rev=NULL; /*order-reversed source buffer */ H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */ H5T_conv_ret_t except_ret; /*return of callback function */ @@ -1822,17 +1822,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_b_b() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_struct_free + * Function: H5T__conv_struct_free * - * Purpose: Free the private data structure used by the compound + * Purpose: Free the private data structure used by the compound * conversion functions. * - * Return: The result of H5MM_xfree(priv) (NULL) + * Return: The result of H5MM_xfree(priv) (NULL) * - * Programmer: Neil Fortner - * Wednesday, October 1, 2008 + * Programmer: Neil Fortner + * Wednesday, October 1, 2008 * *------------------------------------------------------------------------- */ @@ -1864,24 +1864,24 @@ H5T__conv_struct_free(H5T_conv_struct_t *priv) FUNC_LEAVE_NOAPI((H5T_conv_struct_t *)H5MM_xfree(priv)) } /* end H5T__conv_struct_free() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_struct_init + * Function: H5T__conv_struct_init * - * Purpose: Initialize the `priv' field of `cdata' with conversion - * information that is relatively constant. If `priv' is - * already initialized then the member conversion functions - * are recalculated. + * Purpose: Initialize the `priv' field of `cdata' with conversion + * information that is relatively constant. If `priv' is + * already initialized then the member conversion functions + * are recalculated. * - * Priv fields are indexed by source member number or - * destination member number depending on whether the field - * contains information about the source datatype or the - * destination datatype (fields that contains the same - * information for both source and destination are indexed by - * source member number). The src2dst[] priv array maps source - * member numbers to destination member numbers, but if the - * source member doesn't have a corresponding destination member - * then the src2dst[i]=-1. + * Priv fields are indexed by source member number or + * destination member number depending on whether the field + * contains information about the source datatype or the + * destination datatype (fields that contains the same + * information for both source and destination are indexed by + * source member number). The src2dst[] priv array maps source + * member numbers to destination member numbers, but if the + * source member doesn't have a corresponding destination member + * then the src2dst[i]=-1. * * Special optimization case when the source and destination * members are a subset of each other, and the order is the same, @@ -1904,20 +1904,20 @@ H5T__conv_struct_free(H5T_conv_struct_t *priv) * The optimization is simply moving data to the appropriate * places in the buffer. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Monday, January 26, 1998 + * Programmer: Robb Matzke + * Monday, January 26, 1998 * *------------------------------------------------------------------------- */ static herr_t H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) { - H5T_conv_struct_t *priv = (H5T_conv_struct_t*)(cdata->priv); - int *src2dst = NULL; + H5T_conv_struct_t *priv = (H5T_conv_struct_t*)(cdata->priv); + int *src2dst = NULL; unsigned src_nmembs, dst_nmembs; - unsigned i, j; + unsigned i, j; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1964,8 +1964,8 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) } /* end if */ } /* end for */ if(src2dst[i] >= 0) { - hid_t tid; - H5T_t *type; + hid_t tid; + H5T_t *type; type = H5T_copy(src->shared->u.compnd.memb[i].type, H5T_COPY_ALL); tid = H5I_register(H5I_DATATYPE, type, FALSE); @@ -2055,9 +2055,9 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_struct_init() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_struct_subset + * Function: H5T__conv_struct_subset * * Purpose: A quick way to return a field in a struct private in this * file. The flag SMEMBS_SUBSET indicates whether the source @@ -2075,15 +2075,15 @@ done: * Return: A pointer to the subset info struct in p. Points directly * into the structure. * - * Programmer: Raymond Lu - * 8 June 2007 + * Programmer: Raymond Lu + * 8 June 2007 * *------------------------------------------------------------------------- */ H5T_subset_info_t * H5T__conv_struct_subset(const H5T_cdata_t *cdata) { - H5T_conv_struct_t *priv = NULL; + H5T_conv_struct_t *priv = NULL; FUNC_ENTER_PACKAGE_NOERR @@ -2095,30 +2095,30 @@ H5T__conv_struct_subset(const H5T_cdata_t *cdata) FUNC_LEAVE_NOAPI((H5T_subset_info_t *) &priv->subset_info) } /* end H5T__conv_struct_subset() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_struct + * Function: H5T__conv_struct * - * Purpose: Converts between compound datatypes. This is a soft - * conversion function. The algorithm is basically: + * Purpose: Converts between compound datatypes. This is a soft + * conversion function. The algorithm is basically: * - * For each element do - * For I=1..NELMTS do - * If sizeof destination type <= sizeof source type then - * Convert member to destination type; - * Move member as far left as possible; + * For each element do + * For I=1..NELMTS do + * If sizeof destination type <= sizeof source type then + * Convert member to destination type; + * Move member as far left as possible; * - * For I=NELMTS..1 do - * If not destination type then - * Convert member to destination type; - * Move member to correct position in BKG + * For I=NELMTS..1 do + * If not destination type then + * Convert member to destination type; + * Move member to correct position in BKG * - * Copy BKG to BUF + * Copy BKG to BUF * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Thursday, January 22, 1998 + * Programmer: Robb Matzke + * Thursday, January 22, 1998 * *------------------------------------------------------------------------- */ @@ -2126,20 +2126,20 @@ herr_t H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg) { - uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */ - uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */ + uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */ + uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */ uint8_t *xbuf = buf, *xbkg = bkg; /*temp pointers into buf and bkg*/ - H5T_t *src = NULL; /*source datatype */ - H5T_t *dst = NULL; /*destination datatype */ - int *src2dst = NULL; /*maps src member to dst member */ - H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/ - H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */ - size_t offset; /*byte offset wrt struct */ - ssize_t src_delta; /*source stride */ - ssize_t bkg_delta; /*background stride */ - size_t elmtno; - unsigned u; /*counters */ - int i; /*counters */ + H5T_t *src = NULL; /*source datatype */ + H5T_t *dst = NULL; /*destination datatype */ + int *src2dst = NULL; /*maps src member to dst member */ + H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/ + H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */ + size_t offset; /*byte offset wrt struct */ + ssize_t src_delta; /*source stride */ + ssize_t bkg_delta; /*background stride */ + size_t elmtno; + unsigned u; /*counters */ + int i; /*counters */ H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv); herr_t ret_value = SUCCEED; /* Return value */ @@ -2305,29 +2305,29 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_struct() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_struct_opt + * Function: H5T__conv_struct_opt * - * Purpose: Converts between compound datatypes in a manner more - * efficient than the general-purpose H5T__conv_struct() - * function. This function isn't applicable if the destination - * is larger than the source type. This is a soft conversion - * function. The algorithm is basically: + * Purpose: Converts between compound datatypes in a manner more + * efficient than the general-purpose H5T__conv_struct() + * function. This function isn't applicable if the destination + * is larger than the source type. This is a soft conversion + * function. The algorithm is basically: * - * For each member of the struct - * If sizeof destination type <= sizeof source type then - * Convert member to destination type for all elements - * Move memb to BKG buffer for all elements - * Else - * Move member as far left as possible for all elements + * For each member of the struct + * If sizeof destination type <= sizeof source type then + * Convert member to destination type for all elements + * Move memb to BKG buffer for all elements + * Else + * Move member as far left as possible for all elements * - * For each member of the struct (in reverse order) - * If not destination type then - * Convert member to destination type for all elements - * Move member to correct position in BKG for all elements + * For each member of the struct (in reverse order) + * If not destination type then + * Convert member to destination type for all elements + * Move member to correct position in BKG for all elements * - * Copy BKG to BUF for all elements + * Copy BKG to BUF for all elements * * Special case when the source and destination members * are a subset of each other, and the order is the same, and no @@ -2342,10 +2342,10 @@ done: * The optimization is simply moving data to the appropriate * places in the buffer. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Thursday, January 22, 1998 + * Programmer: Robb Matzke + * Thursday, January 22, 1998 * *------------------------------------------------------------------------- */ @@ -2353,22 +2353,22 @@ herr_t H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg) { - uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */ - uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */ - uint8_t *xbuf = NULL; /*temporary pointer into `buf' */ - uint8_t *xbkg = NULL; /*temporary pointer into `bkg' */ - H5T_t *src = NULL; /*source datatype */ - H5T_t *dst = NULL; /*destination datatype */ - int *src2dst = NULL; /*maps src member to dst member */ - H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/ - H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */ - size_t offset; /*byte offset wrt struct */ - size_t elmtno; /*element counter */ + uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */ + uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */ + uint8_t *xbuf = NULL; /*temporary pointer into `buf' */ + uint8_t *xbkg = NULL; /*temporary pointer into `bkg' */ + H5T_t *src = NULL; /*source datatype */ + H5T_t *dst = NULL; /*destination datatype */ + int *src2dst = NULL; /*maps src member to dst member */ + H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/ + H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */ + size_t offset; /*byte offset wrt struct */ + size_t elmtno; /*element counter */ size_t copy_size; /*size of element for copying */ - H5T_conv_struct_t *priv = NULL; /*private data */ + H5T_conv_struct_t *priv = NULL; /*private data */ hbool_t no_stride = FALSE; /*flag to indicate no stride */ - unsigned u; /*counters */ - int i; /*counters */ + unsigned u; /*counters */ + int i; /*counters */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2577,17 +2577,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_struct_opt() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_enum_init + * Function: H5T__conv_enum_init * - * Purpose: Initialize information for H5T__conv_enum(). + * Purpose: Initialize information for H5T__conv_enum(). * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, January 4, 1999 * *------------------------------------------------------------------------- @@ -2595,21 +2595,21 @@ done: static herr_t H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) { - H5T_enum_struct_t *priv = NULL; /*private conversion data */ - int n; /*src value cast as native int */ - int domain[2] = {0, 0}; /*min and max source values */ - int *map = NULL; /*map from src value to dst idx */ - unsigned length; /*nelmts in map array */ - unsigned i, j; /*counters */ + H5T_enum_struct_t *priv = NULL; /*private conversion data */ + int n; /*src value cast as native int */ + int domain[2] = {0, 0}; /*min and max source values */ + int *map = NULL; /*map from src value to dst idx */ + unsigned length; /*nelmts in map array */ + unsigned i, j; /*counters */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC cdata->need_bkg = H5T_BKG_NO; if(NULL == (priv = (H5T_enum_struct_t *)(cdata->priv = H5MM_calloc(sizeof(*priv))))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") if(0 == src->shared->u.enumer.nmembs) - HGOTO_DONE(SUCCEED); + HGOTO_DONE(SUCCEED); /* * Check that the source symbol names are a subset of the destination @@ -2619,16 +2619,16 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) H5T__sort_name(src, NULL); H5T__sort_name(dst, NULL); if(NULL == (priv->src2dst = (int *)H5MM_malloc(src->shared->u.enumer.nmembs * sizeof(int)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") for(i = 0, j = 0; i < src->shared->u.enumer.nmembs && j < dst->shared->u.enumer.nmembs; i++, j++) { - while(j < dst->shared->u.enumer.nmembs && - HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j])) + while(j < dst->shared->u.enumer.nmembs && + HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j])) j++; - if(j >= dst->shared->u.enumer.nmembs) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "source type is not a subset of destination type") - priv->src2dst[i] = (int)j; + if(j >= dst->shared->u.enumer.nmembs) + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "source type is not a subset of destination type") + priv->src2dst[i] = (int)j; } /* end for */ /* @@ -2636,12 +2636,12 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) * value converted. However, if all of the following constraints are met * then we can build a perfect hash table and use an O(1) lookup method. * - * A: The source datatype size matches one of our native datatype - * sizes. + * A: The source datatype size matches one of our native datatype + * sizes. * - * B: After casting the source value bit pattern to a native type - * the size of the range of values is less than 20% larger than - * the number of values. + * B: After casting the source value bit pattern to a native type + * the size of the range of values is less than 20% larger than + * the number of values. * * If this special case is met then we use the source bit pattern cast as * a native integer type as an index into the `val2dst'. The values of @@ -2658,53 +2658,53 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) * situations. SLU - 2011/5/24) */ if(1 == src->shared->size || sizeof(short) == src->shared->size || sizeof(int) == src->shared->size) { - for(i = 0; i < src->shared->u.enumer.nmembs; i++) { - if(1 == src->shared->size) - n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i)); - else if (sizeof(short) == src->shared->size) - n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); - else - n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); - if(0 == i) { - domain[0] = domain[1] = n; - } else { - domain[0] = MIN(domain[0], n); - domain[1] = MAX(domain[1], n); - } - } /* end for */ + for(i = 0; i < src->shared->u.enumer.nmembs; i++) { + if(1 == src->shared->size) + n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i)); + else if (sizeof(short) == src->shared->size) + n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); + else + n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); + if(0 == i) { + domain[0] = domain[1] = n; + } else { + domain[0] = MIN(domain[0], n); + domain[1] = MAX(domain[1], n); + } + } /* end for */ HDassert(domain[1] >= domain[0]); - length = (unsigned)(domain[1] - domain[0]) + 1; - if(src->shared->u.enumer.nmembs < 2 || + length = (unsigned)(domain[1] - domain[0]) + 1; + if(src->shared->u.enumer.nmembs < 2 || (double)length / src->shared->u.enumer.nmembs < (double)(1.2f)) { - priv->base = domain[0]; - priv->length = length; - if(NULL == (map = (int *)H5MM_malloc(length * sizeof(int)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") - for(i = 0; i < length; i++) + priv->base = domain[0]; + priv->length = length; + if(NULL == (map = (int *)H5MM_malloc(length * sizeof(int)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + for(i = 0; i < length; i++) map[i] = -1; /*entry unused*/ - for(i = 0; i < src->shared->u.enumer.nmembs; i++) { - if(1 == src->shared->size) - n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i)); - else if(sizeof(short) == src->shared->size) - n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); - else - n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); - n -= priv->base; - HDassert(n >= 0 && (unsigned)n < priv->length); - HDassert(map[n] < 0); - map[n] = priv->src2dst[i]; - } /* end for */ - - /* - * Replace original src2dst array with our new one. The original - * was indexed by source member number while the new one is - * indexed by source values. - */ - H5MM_xfree(priv->src2dst); - priv->src2dst = map; - HGOTO_DONE(SUCCEED); - } + for(i = 0; i < src->shared->u.enumer.nmembs; i++) { + if(1 == src->shared->size) + n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i)); + else if(sizeof(short) == src->shared->size) + n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); + else + n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); + n -= priv->base; + HDassert(n >= 0 && (unsigned)n < priv->length); + HDassert(map[n] < 0); + map[n] = priv->src2dst[i]; + } /* end for */ + + /* + * Replace original src2dst array with our new one. The original + * was indexed by source member number while the new one is + * indexed by source values. + */ + H5MM_xfree(priv->src2dst); + priv->src2dst = map; + HGOTO_DONE(SUCCEED); + } } /* Sort source type by value and adjust src2dst[] appropriately */ @@ -2712,24 +2712,24 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) done: if (ret_value<0 && priv) { - H5MM_xfree(priv->src2dst); - H5MM_xfree(priv); - cdata->priv = NULL; + H5MM_xfree(priv->src2dst); + H5MM_xfree(priv); + cdata->priv = NULL; } FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_enum + * Function: H5T__conv_enum * - * Purpose: Converts one type of enumerated data to another. + * Purpose: Converts one type of enumerated data to another. * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, January 4, 1999 *------------------------------------------------------------------------- */ @@ -2738,15 +2738,15 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *bkg) { - uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */ - H5T_t *src = NULL, *dst = NULL; /*src and dst datatypes */ - uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */ - ssize_t src_delta, dst_delta; /*conversion strides */ - int n; /*src value cast as native int */ + uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */ + H5T_t *src = NULL, *dst = NULL; /*src and dst datatypes */ + uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */ + ssize_t src_delta, dst_delta; /*conversion strides */ + int n; /*src value cast as native int */ H5T_enum_struct_t *priv = (H5T_enum_struct_t*)(cdata->priv); H5T_conv_cb_t cb_struct; /*conversion callback structure */ H5T_conv_ret_t except_ret; /*return of callback function */ - size_t i; /*counters */ + size_t i; /*counters */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2908,30 +2908,30 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_enum() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_enum_numeric + * Function: H5T__conv_enum_numeric * - * Purpose: Converts enumerated data to a numeric type (integer or + * Purpose: Converts enumerated data to a numeric type (integer or * floating-point number). This function is registered into * the conversion table twice in H5T_init_interface in H5T.c. * Once for enum-integer conversion. Once for enum-float conversion. * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 12 October 2012 *------------------------------------------------------------------------- */ herr_t H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, + size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *bkg) { - H5T_t *src, *dst; /*src and dst datatypes */ - H5T_t *src_parent; /*parent type for src */ + H5T_t *src, *dst; /*src and dst datatypes */ + H5T_t *src_parent; /*parent type for src */ hid_t src_parent_id = -1; /*ID for parent of the source */ H5T_path_t *tpath; /* Conversion information */ herr_t ret_value = SUCCEED; /* Return value */ @@ -2988,28 +2988,28 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_enum_numeric() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_vlen + * Function: H5T__conv_vlen * - * Purpose: Converts between VL datatypes in memory and on disk. - * This is a soft conversion function. The algorithm is - * basically: + * Purpose: Converts between VL datatypes in memory and on disk. + * This is a soft conversion function. The algorithm is + * basically: * - * For every VL struct in the main buffer: - * 1. Allocate space for temporary dst VL data (reuse buffer - * if possible) + * For every VL struct in the main buffer: + * 1. Allocate space for temporary dst VL data (reuse buffer + * if possible) * 2. Copy VL data from src buffer into dst buffer * 3. Convert VL data into dst representation * 4. Allocate buffer in dst heap - * 5. Free heap objects storing old data + * 5. Free heap objects storing old data * 6. Write dst VL data into dst heap * 7. Store (heap ID or pointer) and length in main dst buffer * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Wednesday, May 26, 1999 + * Programmer: Quincey Koziol + * Wednesday, May 26, 1999 * *------------------------------------------------------------------------- */ @@ -3018,27 +3018,27 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg) { H5T_vlen_alloc_info_t vl_alloc_info;/* VL allocation info */ - H5T_path_t *tpath = NULL; /* Type conversion path */ + H5T_path_t *tpath = NULL; /* Type conversion path */ hbool_t noop_conv = FALSE; /* Flag to indicate a noop conversion */ hbool_t write_to_file = FALSE; /* Flag to indicate writing to file */ htri_t parent_is_vlen; /* Flag to indicate parent is vlen datatyp */ - size_t bg_seq_len = 0; /* The number of elements in the background sequence */ - hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */ - H5T_t *src = NULL; /*source datatype */ - H5T_t *dst = NULL; /*destination datatype */ - uint8_t *s = NULL; /*source buffer */ - uint8_t *d = NULL; /*destination buffer */ - uint8_t *b = NULL; /*background buffer */ - ssize_t s_stride, d_stride; /*src and dst strides */ - ssize_t b_stride; /*bkg stride */ + size_t bg_seq_len = 0; /* The number of elements in the background sequence */ + hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */ + H5T_t *src = NULL; /*source datatype */ + H5T_t *dst = NULL; /*destination datatype */ + uint8_t *s = NULL; /*source buffer */ + uint8_t *d = NULL; /*destination buffer */ + uint8_t *b = NULL; /*background buffer */ + ssize_t s_stride, d_stride; /*src and dst strides */ + ssize_t b_stride; /*bkg stride */ size_t safe; /*how many elements are safe to process in each pass */ - size_t src_base_size, dst_base_size;/*source & destination base size*/ - void *conv_buf = NULL; /*temporary conversion buffer */ - size_t conv_buf_size = 0; /*size of conversion buffer in bytes */ - void *tmp_buf = NULL; /*temporary background buffer */ - size_t tmp_buf_size = 0; /*size of temporary bkg buffer */ + size_t src_base_size, dst_base_size;/*source & destination base size*/ + void *conv_buf = NULL; /*temporary conversion buffer */ + size_t conv_buf_size = 0; /*size of conversion buffer in bytes */ + void *tmp_buf = NULL; /*temporary background buffer */ + size_t tmp_buf_size = 0; /*size of temporary bkg buffer */ hbool_t nested = FALSE; /*flag of nested VL case */ - size_t elmtno; /*element number counter */ + size_t elmtno; /*element number counter */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -3207,7 +3207,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't set VL data to 'nil'") } /* end else-if */ else { - size_t seq_len; /* The number of elements in the current sequence */ + size_t seq_len; /* The number of elements in the current sequence */ /* Get length of element sequences */ if((*(src->shared->u.vlen.cls->getlen))(src->shared->u.vlen.file, s, &seq_len) < 0) @@ -3220,7 +3220,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid source pointer") } /* end if */ else { - size_t src_size, dst_size; /*source & destination total size in bytes*/ + size_t src_size, dst_size; /*source & destination total size in bytes*/ src_size = seq_len * src_base_size; dst_size = seq_len * dst_base_size; @@ -3228,11 +3228,11 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, /* Check if conversion buffer is large enough, resize if * necessary. If the SEQ_LEN is 0, allocate a minimal size buffer. */ - if(!seq_len && !conv_buf) { + if(!seq_len && !conv_buf) { conv_buf_size = H5T_VLEN_MIN_CONF_BUF_SIZE; if(NULL == (conv_buf = H5FL_BLK_CALLOC(vlen_seq, conv_buf_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion") - } /* end if */ + } /* end if */ else if(conv_buf_size < MAX(src_size, dst_size)) { /* Only allocate conversion buffer in H5T_VLEN_MIN_CONF_BUF_SIZE increments */ conv_buf_size = ((MAX(src_size, dst_size) / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) * H5T_VLEN_MIN_CONF_BUF_SIZE; @@ -3349,17 +3349,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_vlen() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_array + * Function: H5T__conv_array * - * Purpose: Converts between array datatypes in memory and on disk. - * This is a soft conversion function. + * Purpose: Converts between array datatypes in memory and on disk. + * This is a soft conversion function. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Monday, November 6, 2000 + * Programmer: Quincey Koziol + * Monday, November 6, 2000 * *------------------------------------------------------------------------- */ @@ -3367,16 +3367,16 @@ herr_t H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void H5_ATTR_UNUSED *_bkg) { - H5T_path_t *tpath; /* Type conversion path */ - hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */ - H5T_t *src = NULL; /*source datatype */ - H5T_t *dst = NULL; /*destination datatype */ - uint8_t *sp, *dp; /*source and dest traversal ptrs */ - ssize_t src_delta, dst_delta; /*source & destination stride */ - int direction; /*direction of traversal */ - size_t elmtno; /*element number counter */ + H5T_path_t *tpath; /* Type conversion path */ + hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */ + H5T_t *src = NULL; /*source datatype */ + H5T_t *dst = NULL; /*destination datatype */ + uint8_t *sp, *dp; /*source and dest traversal ptrs */ + ssize_t src_delta, dst_delta; /*source & destination stride */ + int direction; /*direction of traversal */ + size_t elmtno; /*element number counter */ unsigned u; /* local index variable */ - void *bkg_buf = NULL; /*temporary background buffer */ + void *bkg_buf = NULL; /*temporary background buffer */ herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -3454,7 +3454,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, /* Check if we need a background buffer for this conversion */ if(tpath->cdata.need_bkg) { - size_t bkg_buf_size; /*size of background buffer in bytes */ + size_t bkg_buf_size; /*size of background buffer in bytes */ /* Allocate background buffer */ bkg_buf_size = src->shared->u.array.nelem * MAX(src->shared->size, dst->shared->size); @@ -3696,18 +3696,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_ref() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_i_i + * Function: H5T__conv_i_i * - * Purpose: Convert one integer type to another. This is the catch-all - * function for integer conversions and is probably not - * particularly fast. + * Purpose: Convert one integer type to another. This is the catch-all + * function for integer conversions and is probably not + * particularly fast. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Wednesday, June 10, 1998 + * Programmer: Robb Matzke + * Wednesday, June 10, 1998 * *------------------------------------------------------------------------- */ @@ -3715,19 +3715,19 @@ herr_t H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { - H5T_t *src = NULL; /*source datatype */ - H5T_t *dst = NULL; /*destination datatype */ - ssize_t src_delta, dst_delta; /*source & destination stride */ - int direction; /*direction of traversal */ - size_t elmtno; /*element number */ - size_t half_size; /*half the type size */ - size_t olap; /*num overlapping elements */ - uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ + H5T_t *src = NULL; /*source datatype */ + H5T_t *dst = NULL; /*destination datatype */ + ssize_t src_delta, dst_delta; /*source & destination stride */ + int direction; /*direction of traversal */ + size_t elmtno; /*element number */ + size_t half_size; /*half the type size */ + size_t olap; /*num overlapping elements */ + uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ uint8_t *src_rev=NULL; /*order-reversed source buffer */ - uint8_t dbuf[64]; /*temp destination buffer */ - size_t first; - ssize_t sfirst; /*a signed version of `first' */ - size_t i; /*Local index variables */ + uint8_t dbuf[64]; /*temp destination buffer */ + size_t first; + ssize_t sfirst; /*a signed version of `first' */ + size_t i; /*Local index variables */ H5T_conv_cb_t cb_struct={NULL, NULL}; /*conversion callback structure */ H5T_conv_ret_t except_ret; /*return of callback function */ hbool_t reverse; /*if reverse the order of destination */ @@ -4087,18 +4087,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_i_i() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_f_f + * Function: H5T__conv_f_f * - * Purpose: Convert one floating point type to another. This is a catch - * all for floating point conversions and is probably not - * particularly fast! + * Purpose: Convert one floating point type to another. This is a catch + * all for floating point conversions and is probably not + * particularly fast! * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Tuesday, June 23, 1998 + * Programmer: Robb Matzke + * Tuesday, June 23, 1998 * *------------------------------------------------------------------------- */ @@ -4107,32 +4107,32 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { /* Traversal-related variables */ - H5T_t *src_p; /*source datatype */ - H5T_t *dst_p; /*destination datatype */ - H5T_atomic_t src; /*atomic source info */ - H5T_atomic_t dst; /*atomic destination info */ - ssize_t src_delta, dst_delta; /*source & destination stride */ - int direction; /*forward or backward traversal */ - size_t elmtno; /*element number */ - size_t half_size; /*half the type size */ + H5T_t *src_p; /*source datatype */ + H5T_t *dst_p; /*destination datatype */ + H5T_atomic_t src; /*atomic source info */ + H5T_atomic_t dst; /*atomic destination info */ + ssize_t src_delta, dst_delta; /*source & destination stride */ + int direction; /*forward or backward traversal */ + size_t elmtno; /*element number */ + size_t half_size; /*half the type size */ size_t tsize; /*type size for swapping bytes */ - size_t olap; /*num overlapping elements */ - ssize_t bitno = 0; /*bit number */ - uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ + size_t olap; /*num overlapping elements */ + ssize_t bitno = 0; /*bit number */ + uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ uint8_t *src_rev = NULL; /*order-reversed source buffer */ - uint8_t dbuf[64]; /*temp destination buffer */ + uint8_t dbuf[64]; /*temp destination buffer */ uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/ /* Conversion-related variables */ - int64_t expo; /*exponent */ - hssize_t expo_max; /*maximum possible dst exponent */ - size_t msize = 0; /*useful size of mantissa in src*/ - size_t mpos; /*offset to useful mant is src */ + int64_t expo; /*exponent */ + hssize_t expo_max; /*maximum possible dst exponent */ + size_t msize = 0; /*useful size of mantissa in src*/ + size_t mpos; /*offset to useful mant is src */ uint64_t sign; /*source sign bit value */ - size_t mrsh; /*amount to right shift mantissa*/ - hbool_t carry = FALSE; /*carry after rounding mantissa */ - size_t i; /*miscellaneous counters */ - size_t implied; /*destination implied bits */ + size_t mrsh; /*amount to right shift mantissa*/ + hbool_t carry = FALSE; /*carry after rounding mantissa */ + size_t i; /*miscellaneous counters */ + size_t implied; /*destination implied bits */ hbool_t denormalized = FALSE; /*is either source or destination denormalized?*/ H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */ H5T_conv_ret_t except_ret; /*return of callback function */ @@ -4396,7 +4396,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, /* * Get the exponent as an unsigned quantity from the section of - * the source bit field where it's located. Don't worry about + * the source bit field where it's located. Don't worry about * the exponent bias yet. */ expo = (int64_t)H5T__bit_get_d(s, src.u.f.epos, src.u.f.esize); @@ -4482,7 +4482,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, else if (expo>=expo_max) { /* * The exponent is too large to fit in the available region - * or it results in the maximum possible value. Use positive + * or it results in the maximum possible value. Use positive * or negative infinity instead unless the application * specifies something else. Before calling the overflow * handler make sure the source buffer we hand it is in the @@ -4674,16 +4674,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_f_f() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_s_s + * Function: H5T__conv_s_s * - * Purpose: Convert one fixed-length string type to another. + * Purpose: Convert one fixed-length string type to another. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Friday, August 7, 1998 + * Programmer: Robb Matzke + * Friday, August 7, 1998 * *------------------------------------------------------------------------- */ @@ -4692,15 +4692,15 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { - H5T_t *src=NULL; /*source datatype */ - H5T_t *dst=NULL; /*destination datatype */ - ssize_t src_delta, dst_delta; /*source & destination stride */ - int direction; /*direction of traversal */ - size_t elmtno; /*element number */ - size_t olap; /*num overlapping elements */ - size_t nchars=0; /*number of characters copied */ - uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/ - uint8_t *dbuf=NULL; /*temp buf for overlap convers. */ + H5T_t *src=NULL; /*source datatype */ + H5T_t *dst=NULL; /*destination datatype */ + ssize_t src_delta, dst_delta; /*source & destination stride */ + int direction; /*direction of traversal */ + size_t elmtno; /*element number */ + size_t olap; /*num overlapping elements */ + size_t nchars=0; /*number of characters copied */ + uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/ + uint8_t *dbuf=NULL; /*temp buf for overlap convers. */ herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -4906,18 +4906,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_s_s() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_uchar + * Function: H5T__conv_schar_uchar * - * Purpose: Converts `signed char' to `unsigned char' + * Purpose: Converts `signed char' to `unsigned char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Programmer: Robb Matzke + * Monday, November 16, 1998 * *------------------------------------------------------------------------- */ @@ -4929,18 +4929,18 @@ H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_schar + * Function: H5T__conv_uchar_schar * - * Purpose: Converts `unsigned char' to `signed char' + * Purpose: Converts `unsigned char' to `signed char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Programmer: Robb Matzke + * Monday, November 16, 1998 * *------------------------------------------------------------------------- */ @@ -4952,18 +4952,18 @@ H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_us(UCHAR, SCHAR, unsigned char, signed char, -, SCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_short + * Function: H5T__conv_schar_short * - * Purpose: Converts `signed char' to `short' + * Purpose: Converts `signed char' to `short' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -4975,18 +4975,18 @@ H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sS(SCHAR, SHORT, signed char, short, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_ushort + * Function: H5T__conv_schar_ushort * - * Purpose: Converts `signed char' to `unsigned short' + * Purpose: Converts `signed char' to `unsigned short' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -4998,18 +4998,18 @@ H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sU(SCHAR, USHORT, signed char, unsigned short, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_short + * Function: H5T__conv_uchar_short * - * Purpose: Converts `unsigned char' to `short' + * Purpose: Converts `unsigned char' to `short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5021,18 +5021,18 @@ H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uS(UCHAR, SHORT, unsigned char, short, -, SHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_ushort + * Function: H5T__conv_uchar_ushort * - * Purpose: Converts `unsigned char' to `unsigned short' + * Purpose: Converts `unsigned char' to `unsigned short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5044,18 +5044,18 @@ H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uU(UCHAR, USHORT, unsigned char, unsigned short, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_int + * Function: H5T__conv_schar_int * - * Purpose: Converts `signed char' to `int' + * Purpose: Converts `signed char' to `int' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5067,18 +5067,18 @@ H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sS(SCHAR, INT, signed char, int, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_uint + * Function: H5T__conv_schar_uint * - * Purpose: Converts `signed char' to `unsigned int' + * Purpose: Converts `signed char' to `unsigned int' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5090,18 +5090,18 @@ H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sU(SCHAR, UINT, signed char, unsigned, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_int + * Function: H5T__conv_uchar_int * - * Purpose: Converts `unsigned char' to `int' + * Purpose: Converts `unsigned char' to `int' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5113,18 +5113,18 @@ H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uS(UCHAR, INT, unsigned char, int, -, INT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_uint + * Function: H5T__conv_uchar_uint * - * Purpose: Converts `unsigned char' to `unsigned int' + * Purpose: Converts `unsigned char' to `unsigned int' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5136,18 +5136,18 @@ H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uU(UCHAR, UINT, unsigned char, unsigned, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_long + * Function: H5T__conv_schar_long * - * Purpose: Converts `signed char' to `long' + * Purpose: Converts `signed char' to `long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5159,18 +5159,18 @@ H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sS(SCHAR, LONG, signed char, long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_ulong + * Function: H5T__conv_schar_ulong * - * Purpose: Converts `signed char' to `unsigned long' + * Purpose: Converts `signed char' to `unsigned long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5182,18 +5182,18 @@ H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_long + * Function: H5T__conv_uchar_long * - * Purpose: Converts `unsigned char' to `long' + * Purpose: Converts `unsigned char' to `long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5205,18 +5205,18 @@ H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uS(UCHAR, LONG, unsigned char, long, -, LONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_ulong + * Function: H5T__conv_uchar_ulong * - * Purpose: Converts `unsigned char' to `unsigned long' + * Purpose: Converts `unsigned char' to `unsigned long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5228,18 +5228,18 @@ H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uU(UCHAR, ULONG, unsigned char, unsigned long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_llong + * Function: H5T__conv_schar_llong * - * Purpose: Converts `signed char' to `long long' + * Purpose: Converts `signed char' to `long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5251,18 +5251,18 @@ H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sS(SCHAR, LLONG, signed char, long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_ullong + * Function: H5T__conv_schar_ullong * - * Purpose: Converts `signed char' to `unsigned long long' + * Purpose: Converts `signed char' to `unsigned long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5274,18 +5274,18 @@ H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sU(SCHAR, ULLONG, signed char, unsigned long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_llong + * Function: H5T__conv_uchar_llong * - * Purpose: Converts `unsigned char' to `long long' + * Purpose: Converts `unsigned char' to `long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5297,18 +5297,18 @@ H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uS(UCHAR, LLONG, unsigned char, long long, -, LLONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_ullong + * Function: H5T__conv_uchar_ullong * - * Purpose: Converts `unsigned char' to `unsigned long long' + * Purpose: Converts `unsigned char' to `unsigned long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5320,18 +5320,18 @@ H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uU(UCHAR, ULLONG, unsigned char, unsigned long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_schar + * Function: H5T__conv_short_schar * - * Purpose: Converts `short' to `signed char' + * Purpose: Converts `short' to `signed char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5343,18 +5343,18 @@ H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_uchar + * Function: H5T__conv_short_uchar * - * Purpose: Converts `short' to `unsigned char' + * Purpose: Converts `short' to `unsigned char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5366,18 +5366,18 @@ H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Su(SHORT, UCHAR, short, unsigned char, -, UCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_schar + * Function: H5T__conv_ushort_schar * - * Purpose: Converts `unsigned short' to `signed char' + * Purpose: Converts `unsigned short' to `signed char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5389,18 +5389,18 @@ H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Us(USHORT, SCHAR, unsigned short, signed char, -, SCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_uchar + * Function: H5T__conv_ushort_uchar * - * Purpose: Converts `unsigned short' to `unsigned char' + * Purpose: Converts `unsigned short' to `unsigned char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5412,18 +5412,18 @@ H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Uu(USHORT, UCHAR, unsigned short, unsigned char, -, UCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_ushort + * Function: H5T__conv_short_ushort * - * Purpose: Converts `short' to `unsigned short' + * Purpose: Converts `short' to `unsigned short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Programmer: Robb Matzke + * Monday, November 16, 1998 * *------------------------------------------------------------------------- */ @@ -5435,18 +5435,18 @@ H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_su(SHORT, USHORT, short, unsigned short, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_short + * Function: H5T__conv_ushort_short * - * Purpose: Converts `unsigned short' to `short' + * Purpose: Converts `unsigned short' to `short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Programmer: Robb Matzke + * Monday, November 16, 1998 * *------------------------------------------------------------------------- */ @@ -5458,18 +5458,18 @@ H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_us(USHORT, SHORT, unsigned short, short, -, SHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_int + * Function: H5T__conv_short_int * - * Purpose: Converts `short' to `int' + * Purpose: Converts `short' to `int' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5481,18 +5481,18 @@ H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sS(SHORT, INT, short, int, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_uint + * Function: H5T__conv_short_uint * - * Purpose: Converts `short' to `unsigned int' + * Purpose: Converts `short' to `unsigned int' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5504,18 +5504,18 @@ H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sU(SHORT, UINT, short, unsigned, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_int + * Function: H5T__conv_ushort_int * - * Purpose: Converts `unsigned short' to `int' + * Purpose: Converts `unsigned short' to `int' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5527,18 +5527,18 @@ H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uS(USHORT, INT, unsigned short, int, -, INT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_uint + * Function: H5T__conv_ushort_uint * - * Purpose: Converts `unsigned short' to `unsigned int' + * Purpose: Converts `unsigned short' to `unsigned int' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5550,18 +5550,18 @@ H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uU(USHORT, UINT, unsigned short, unsigned, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_long + * Function: H5T__conv_short_long * - * Purpose: Converts `short' to `long' + * Purpose: Converts `short' to `long' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5573,18 +5573,18 @@ H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sS(SHORT, LONG, short, long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_ulong + * Function: H5T__conv_short_ulong * - * Purpose: Converts `short' to `unsigned long' + * Purpose: Converts `short' to `unsigned long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5596,18 +5596,18 @@ H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sU(SHORT, ULONG, short, unsigned long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_long + * Function: H5T__conv_ushort_long * - * Purpose: Converts `unsigned short' to `long' + * Purpose: Converts `unsigned short' to `long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5619,18 +5619,18 @@ H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uS(USHORT, LONG, unsigned short, long, -, LONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_ulong + * Function: H5T__conv_ushort_ulong * - * Purpose: Converts `unsigned short' to `unsigned long' + * Purpose: Converts `unsigned short' to `unsigned long' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5642,18 +5642,18 @@ H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uU(USHORT, ULONG, unsigned short, unsigned long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_llong + * Function: H5T__conv_short_llong * - * Purpose: Converts `short' to `long long' + * Purpose: Converts `short' to `long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5665,18 +5665,18 @@ H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sS(SHORT, LLONG, short, long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_ullong + * Function: H5T__conv_short_ullong * - * Purpose: Converts `short' to `unsigned long long' + * Purpose: Converts `short' to `unsigned long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5688,18 +5688,18 @@ H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sU(SHORT, ULLONG, short, unsigned long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_llong + * Function: H5T__conv_ushort_llong * - * Purpose: Converts `unsigned short' to `long long' + * Purpose: Converts `unsigned short' to `long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5711,18 +5711,18 @@ H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uS(USHORT, LLONG, unsigned short, long long, -, LLONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_ullong + * Function: H5T__conv_ushort_ullong * - * Purpose: Converts `unsigned short' to `unsigned long long' + * Purpose: Converts `unsigned short' to `unsigned long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5734,18 +5734,18 @@ H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uU(USHORT, ULLONG, unsigned short, unsigned long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_schar + * Function: H5T__conv_int_schar * - * Purpose: Converts `int' to `signed char' + * Purpose: Converts `int' to `signed char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5757,18 +5757,18 @@ H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Ss(INT, SCHAR, int, signed char, SCHAR_MIN, SCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_uchar + * Function: H5T__conv_int_uchar * - * Purpose: Converts `int' to `unsigned char' + * Purpose: Converts `int' to `unsigned char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5780,18 +5780,18 @@ H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Su(INT, UCHAR, int, unsigned char, -, UCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_schar + * Function: H5T__conv_uint_schar * - * Purpose: Converts `unsigned int' to `signed char' + * Purpose: Converts `unsigned int' to `signed char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5803,18 +5803,18 @@ H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Us(UINT, SCHAR, unsigned, signed char, -, SCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_uchar + * Function: H5T__conv_uint_uchar * - * Purpose: Converts `unsigned int' to `unsigned char' + * Purpose: Converts `unsigned int' to `unsigned char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5826,18 +5826,18 @@ H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_short + * Function: H5T__conv_int_short * - * Purpose: Converts `int' to `short' + * Purpose: Converts `int' to `short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5849,18 +5849,18 @@ H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Ss(INT, SHORT, int, short, SHRT_MIN, SHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_ushort + * Function: H5T__conv_int_ushort * - * Purpose: Converts `int' to `unsigned short' + * Purpose: Converts `int' to `unsigned short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5872,18 +5872,18 @@ H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Su(INT, USHORT, int, unsigned short, -, USHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_short + * Function: H5T__conv_uint_short * - * Purpose: Converts `unsigned int' to `short' + * Purpose: Converts `unsigned int' to `short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5895,18 +5895,18 @@ H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Us(UINT, SHORT, unsigned, short, -, SHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_ushort + * Function: H5T__conv_uint_ushort * - * Purpose: Converts `unsigned int' to `unsigned short' + * Purpose: Converts `unsigned int' to `unsigned short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5918,18 +5918,18 @@ H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Uu(UINT, USHORT, unsigned, unsigned short, -, USHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_uint + * Function: H5T__conv_int_uint * - * Purpose: Converts `int' to `unsigned int' + * Purpose: Converts `int' to `unsigned int' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Programmer: Robb Matzke + * Monday, November 16, 1998 * *------------------------------------------------------------------------- */ @@ -5941,18 +5941,18 @@ H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_su(INT, UINT, int, unsigned, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_int + * Function: H5T__conv_uint_int * - * Purpose: Converts `unsigned int' to `int' + * Purpose: Converts `unsigned int' to `int' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Programmer: Robb Matzke + * Monday, November 16, 1998 * *------------------------------------------------------------------------- */ @@ -5964,18 +5964,18 @@ H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_us(UINT, INT, unsigned, int, -, INT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_long + * Function: H5T__conv_int_long * - * Purpose: Converts `int' to `long' + * Purpose: Converts `int' to `long' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -5987,18 +5987,18 @@ H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sS(INT, LONG, int, long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_ulong + * Function: H5T__conv_int_ulong * - * Purpose: Converts `int' to `unsigned long' + * Purpose: Converts `int' to `unsigned long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6010,18 +6010,18 @@ H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sU(INT, LONG, int, unsigned long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_long + * Function: H5T__conv_uint_long * - * Purpose: Converts `unsigned int' to `long' + * Purpose: Converts `unsigned int' to `long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6033,18 +6033,18 @@ H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uS(UINT, LONG, unsigned, long, -, LONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_ulong + * Function: H5T__conv_uint_ulong * - * Purpose: Converts `unsigned int' to `unsigned long' + * Purpose: Converts `unsigned int' to `unsigned long' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6056,18 +6056,18 @@ H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uU(UINT, ULONG, unsigned, unsigned long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_llong + * Function: H5T__conv_int_llong * - * Purpose: Converts `int' to `long long' + * Purpose: Converts `int' to `long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6079,18 +6079,18 @@ H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sS(INT, LLONG, int, long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_ullong + * Function: H5T__conv_int_ullong * - * Purpose: Converts `int' to `unsigned long long' + * Purpose: Converts `int' to `unsigned long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6102,18 +6102,18 @@ H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sU(INT, ULLONG, int, unsigned long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_llong + * Function: H5T__conv_uint_llong * - * Purpose: Converts `unsigned int' to `long long' + * Purpose: Converts `unsigned int' to `long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6125,18 +6125,18 @@ H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uS(UINT, LLONG, unsigned, long long, -, LLONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_ullong + * Function: H5T__conv_uint_ullong * - * Purpose: Converts `unsigned int' to `unsigned long long' + * Purpose: Converts `unsigned int' to `unsigned long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6148,18 +6148,18 @@ H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uU(UINT, ULLONG, unsigned, unsigned long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_schar + * Function: H5T__conv_long_schar * - * Purpose: Converts `long' to `signed char' + * Purpose: Converts `long' to `signed char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6171,18 +6171,18 @@ H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Ss(LONG, SCHAR, long, signed char, SCHAR_MIN, SCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_uchar + * Function: H5T__conv_long_uchar * - * Purpose: Converts `long' to `unsigned char' + * Purpose: Converts `long' to `unsigned char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6194,18 +6194,18 @@ H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Su(LONG, UCHAR, long, unsigned char, -, UCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_schar + * Function: H5T__conv_ulong_schar * - * Purpose: Converts `unsigned long' to `signed char' + * Purpose: Converts `unsigned long' to `signed char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6217,18 +6217,18 @@ H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Us(ULONG, SCHAR, unsigned long, signed char, -, SCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_uchar + * Function: H5T__conv_ulong_uchar * - * Purpose: Converts `unsigned long' to `unsigned char' + * Purpose: Converts `unsigned long' to `unsigned char' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6240,18 +6240,18 @@ H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Uu(ULONG, UCHAR, unsigned long, unsigned char, -, UCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_short + * Function: H5T__conv_long_short * - * Purpose: Converts `long' to `short' + * Purpose: Converts `long' to `short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6263,18 +6263,18 @@ H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Ss(LONG, SHORT, long, short, SHRT_MIN, SHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_ushort + * Function: H5T__conv_long_ushort * - * Purpose: Converts `long' to `unsigned short' + * Purpose: Converts `long' to `unsigned short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6286,18 +6286,18 @@ H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Su(LONG, USHORT, long, unsigned short, -, USHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_short + * Function: H5T__conv_ulong_short * - * Purpose: Converts `unsigned long' to `short' + * Purpose: Converts `unsigned long' to `short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6309,18 +6309,18 @@ H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Us(ULONG, SHORT, unsigned long, short, -, SHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_ushort + * Function: H5T__conv_ulong_ushort * - * Purpose: Converts `unsigned long' to `unsigned short' + * Purpose: Converts `unsigned long' to `unsigned short' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6332,18 +6332,18 @@ H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Uu(ULONG, USHORT, unsigned long, unsigned short, -, USHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_int + * Function: H5T__conv_long_int * - * Purpose: Converts `long' to `int' + * Purpose: Converts `long' to `int' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6355,18 +6355,18 @@ H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Ss(LONG, INT, long, int, INT_MIN, INT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_uint + * Function: H5T__conv_long_uint * - * Purpose: Converts `long' to `unsigned int' + * Purpose: Converts `long' to `unsigned int' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6378,18 +6378,18 @@ H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Su(LONG, UINT, long, unsigned, -, UINT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_int + * Function: H5T__conv_ulong_int * - * Purpose: Converts `unsigned long' to `int' + * Purpose: Converts `unsigned long' to `int' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6401,18 +6401,18 @@ H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Us(ULONG, INT, unsigned long, int, -, INT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_uint + * Function: H5T__conv_ulong_uint * - * Purpose: Converts `unsigned long' to `unsigned int' + * Purpose: Converts `unsigned long' to `unsigned int' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6424,18 +6424,18 @@ H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Uu(ULONG, UINT, unsigned long, unsigned, -, UINT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_ulong + * Function: H5T__conv_long_ulong * - * Purpose: Converts `long' to `unsigned long' + * Purpose: Converts `long' to `unsigned long' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Programmer: Robb Matzke + * Monday, November 16, 1998 * *------------------------------------------------------------------------- */ @@ -6447,18 +6447,18 @@ H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_su(LONG, ULONG, long, unsigned long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_long + * Function: H5T__conv_ulong_long * - * Purpose: Converts `unsigned long' to `long' + * Purpose: Converts `unsigned long' to `long' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Programmer: Robb Matzke + * Monday, November 16, 1998 * *------------------------------------------------------------------------- */ @@ -6470,18 +6470,18 @@ H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_us(ULONG, LONG, unsigned long, long, -, LONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_llong + * Function: H5T__conv_long_llong * - * Purpose: Converts `long' to `long long' + * Purpose: Converts `long' to `long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6493,18 +6493,18 @@ H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sS(LONG, LLONG, long, long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_ullong + * Function: H5T__conv_long_ullong * - * Purpose: Converts `long' to `unsigned long long' + * Purpose: Converts `long' to `unsigned long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6516,18 +6516,18 @@ H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_sU(LONG, ULLONG, long, unsigned long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_llong + * Function: H5T__conv_ulong_llong * - * Purpose: Converts `unsigned long' to `long long' + * Purpose: Converts `unsigned long' to `long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6539,18 +6539,18 @@ H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uS(ULONG, LLONG, unsigned long, long long, -, LLONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_ullong + * Function: H5T__conv_ulong_ullong * - * Purpose: Converts `unsigned long' to `unsigned long long' + * Purpose: Converts `unsigned long' to `unsigned long long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6562,18 +6562,18 @@ H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_uU(ULONG, ULLONG, unsigned long, unsigned long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_schar + * Function: H5T__conv_llong_schar * - * Purpose: Converts `long long' to `signed char' + * Purpose: Converts `long long' to `signed char' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6585,18 +6585,18 @@ H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Ss(LLONG, SCHAR, long long, signed char, SCHAR_MIN, SCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_uchar + * Function: H5T__conv_llong_uchar * - * Purpose: Converts `long long' to `unsigned char' + * Purpose: Converts `long long' to `unsigned char' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6608,18 +6608,18 @@ H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Su(LLONG, UCHAR, long long, unsigned char, -, UCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_schar + * Function: H5T__conv_ullong_schar * - * Purpose: Converts `unsigned long long' to `signed char' + * Purpose: Converts `unsigned long long' to `signed char' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6631,18 +6631,18 @@ H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Us(ULLONG, SCHAR, unsigned long long, signed char, -, SCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_uchar + * Function: H5T__conv_ullong_uchar * - * Purpose: Converts `unsigned long long' to `unsigned char' + * Purpose: Converts `unsigned long long' to `unsigned char' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6654,18 +6654,18 @@ H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Uu(ULLONG, UCHAR, unsigned long long, unsigned char, -, UCHAR_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_short + * Function: H5T__conv_llong_short * - * Purpose: Converts `long long' to `short' + * Purpose: Converts `long long' to `short' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6677,18 +6677,18 @@ H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Ss(LLONG, SHORT, long long, short, SHRT_MIN, SHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_ushort + * Function: H5T__conv_llong_ushort * - * Purpose: Converts `long long' to `unsigned short' + * Purpose: Converts `long long' to `unsigned short' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6700,18 +6700,18 @@ H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Su(LLONG, USHORT, long long, unsigned short, -, USHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_short + * Function: H5T__conv_ullong_short * - * Purpose: Converts `unsigned long long' to `short' + * Purpose: Converts `unsigned long long' to `short' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6723,18 +6723,18 @@ H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Us(ULLONG, SHORT, unsigned long long, short, -, SHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_ushort + * Function: H5T__conv_ullong_ushort * - * Purpose: Converts `unsigned long long' to `unsigned short' + * Purpose: Converts `unsigned long long' to `unsigned short' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6746,18 +6746,18 @@ H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Uu(ULLONG, USHORT, unsigned long long, unsigned short, -, USHRT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_int + * Function: H5T__conv_llong_int * - * Purpose: Converts `long long' to `int' + * Purpose: Converts `long long' to `int' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6769,18 +6769,18 @@ H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Ss(LLONG, INT, long long, int, INT_MIN, INT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_uint + * Function: H5T__conv_llong_uint * - * Purpose: Converts `long long' to `unsigned int' + * Purpose: Converts `long long' to `unsigned int' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6792,18 +6792,18 @@ H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Su(LLONG, UINT, long long, unsigned, -, UINT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_int + * Function: H5T__conv_ullong_int * - * Purpose: Converts `unsigned long long' to `int' + * Purpose: Converts `unsigned long long' to `int' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6815,18 +6815,18 @@ H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Us(ULLONG, INT, unsigned long long, int, -, INT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_uint + * Function: H5T__conv_ullong_uint * - * Purpose: Converts `unsigned long long' to `unsigned int' + * Purpose: Converts `unsigned long long' to `unsigned int' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6838,18 +6838,18 @@ H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Uu(ULLONG, UINT, unsigned long long, unsigned, -, UINT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_long + * Function: H5T__conv_llong_long * - * Purpose: Converts `long long' to `long' + * Purpose: Converts `long long' to `long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6861,18 +6861,18 @@ H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Ss(LLONG, LONG, long long, long, LONG_MIN, LONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_ulong + * Function: H5T__conv_llong_ulong * - * Purpose: Converts `long long' to `unsigned long' + * Purpose: Converts `long long' to `unsigned long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6884,18 +6884,18 @@ H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Su(LLONG, ULONG, long long, unsigned long, -, ULONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_long + * Function: H5T__conv_ullong_long * - * Purpose: Converts `unsigned long long' to `long' + * Purpose: Converts `unsigned long long' to `long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6907,18 +6907,18 @@ H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Us(ULLONG, LONG, unsigned long long, long, -, LONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_ulong + * Function: H5T__conv_ullong_ulong * - * Purpose: Converts `unsigned long long' to `unsigned long' + * Purpose: Converts `unsigned long long' to `unsigned long' * - * Return: Success: Non-negative + * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Programmer: Robb Matzke + * Friday, November 13, 1998 * *------------------------------------------------------------------------- */ @@ -6930,18 +6930,18 @@ H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Uu(ULLONG, ULONG, unsigned long long, unsigned long, -, ULONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_ullong + * Function: H5T__conv_llong_ullong * - * Purpose: Converts `long long' to `unsigned long long' + * Purpose: Converts `long long' to `unsigned long long' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Programmer: Robb Matzke + * Monday, November 16, 1998 * *------------------------------------------------------------------------- */ @@ -6953,18 +6953,18 @@ H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_su(LLONG, ULLONG, long long, unsigned long long, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_llong + * Function: H5T__conv_ullong_llong * - * Purpose: Converts `unsigned long long' to `long long' + * Purpose: Converts `unsigned long long' to `long long' * - * Return: Success: non-negative + * Return: Success: non-negative * - * Failure: negative + * Failure: negative * - * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Programmer: Robb Matzke + * Monday, November 16, 1998 * *------------------------------------------------------------------------- */ @@ -6976,17 +6976,17 @@ H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_us(ULLONG, LLONG, unsigned long long, long long, -, LLONG_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_double + * Function: H5T__conv_float_double * - * Purpose: Convert native `float' to native `double' using hardware. - * This is a fast special case. + * Purpose: Convert native `float' to native `double' using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Tuesday, June 23, 1998 + * Programmer: Robb Matzke + * Tuesday, June 23, 1998 * *------------------------------------------------------------------------- */ @@ -6998,17 +6998,17 @@ H5T__conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_fF(FLOAT, DOUBLE, float, double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_ldouble + * Function: H5T__conv_float_ldouble * - * Purpose: Convert native `float' to native `long double' using hardware. - * This is a fast special case. + * Purpose: Convert native `float' to native `long double' using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, Feb 25, 2005 + * Programmer: Raymond Lu + * Friday, Feb 25, 2005 * *------------------------------------------------------------------------- */ @@ -7022,17 +7022,17 @@ H5T__conv_float_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, } #endif /* H5_SIZEOF_LONG_DOUBLE != 0 */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_float + * Function: H5T__conv_double_float * - * Purpose: Convert native `double' to native `float' using hardware. - * This is a fast special case. + * Purpose: Convert native `double' to native `float' using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Tuesday, June 23, 1998 + * Programmer: Robb Matzke + * Tuesday, June 23, 1998 * *------------------------------------------------------------------------- */ @@ -7044,17 +7044,17 @@ H5T__conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_Ff(DOUBLE, FLOAT, double, float, -FLT_MAX, FLT_MAX); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_ldouble + * Function: H5T__conv_double_ldouble * - * Purpose: Convert native `double' to native `long double' using hardware. - * This is a fast special case. + * Purpose: Convert native `double' to native `long double' using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, Feb 25, 2005 + * Programmer: Raymond Lu + * Friday, Feb 25, 2005 * *------------------------------------------------------------------------- */ @@ -7068,17 +7068,17 @@ H5T__conv_double_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, } #endif /* H5_SIZEOF_LONG_DOUBLE != 0 */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_float + * Function: H5T__conv_ldouble_float * - * Purpose: Convert native `long double' to native `float' using hardware. - * This is a fast special case. + * Purpose: Convert native `long double' to native `float' using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, Feb 25, 2005 + * Programmer: Raymond Lu + * Friday, Feb 25, 2005 * *------------------------------------------------------------------------- */ @@ -7092,17 +7092,17 @@ H5T__conv_ldouble_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, } #endif /* H5_SIZEOF_LONG_DOUBLE != 0 */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_double + * Function: H5T__conv_ldouble_double * - * Purpose: Convert native `long double' to native `double' using hardware. - * This is a fast special case. + * Purpose: Convert native `long double' to native `double' using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, Feb 25, 2005 + * Programmer: Raymond Lu + * Friday, Feb 25, 2005 * *------------------------------------------------------------------------- */ @@ -7116,17 +7116,17 @@ H5T__conv_ldouble_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, } #endif /* H5_SIZEOF_LONG_DOUBLE != 0 */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_float + * Function: H5T__conv_schar_float * - * Purpose: Convert native signed char to native float using hardware. - * This is a fast special case. + * Purpose: Convert native signed char to native float using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7138,17 +7138,17 @@ H5T__conv_schar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_double + * Function: H5T__conv_schar_double * - * Purpose: Convert native signed char to native double using hardware. - * This is a fast special case. + * Purpose: Convert native signed char to native double using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7160,17 +7160,17 @@ H5T__conv_schar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(SCHAR, DOUBLE, signed char, double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_schar_ldouble + * Function: H5T__conv_schar_ldouble * - * Purpose: Convert native signed char to native long double using + * Purpose: Convert native signed char to native long double using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7182,17 +7182,17 @@ H5T__conv_schar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(SCHAR, LDOUBLE, signed char, long double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_float + * Function: H5T__conv_uchar_float * - * Purpose: Convert native unsigned char to native float using hardware. - * This is a fast special case. + * Purpose: Convert native unsigned char to native float using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7204,17 +7204,17 @@ H5T__conv_uchar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_double + * Function: H5T__conv_uchar_double * - * Purpose: Convert native unsigned char to native double using hardware. - * This is a fast special case. + * Purpose: Convert native unsigned char to native double using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7226,17 +7226,17 @@ H5T__conv_uchar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(UCHAR, DOUBLE, unsigned char, double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uchar_ldouble + * Function: H5T__conv_uchar_ldouble * - * Purpose: Convert native unsigned char to native long double using + * Purpose: Convert native unsigned char to native long double using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7248,17 +7248,17 @@ H5T__conv_uchar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(UCHAR, LDOUBLE, unsigned char, long double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_float + * Function: H5T__conv_short_float * - * Purpose: Convert native short to native float using hardware. - * This is a fast special case. + * Purpose: Convert native short to native float using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7270,17 +7270,17 @@ H5T__conv_short_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(SHORT, FLOAT, short, float, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_double + * Function: H5T__conv_short_double * - * Purpose: Convert native short to native double using hardware. - * This is a fast special case. + * Purpose: Convert native short to native double using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7292,17 +7292,17 @@ H5T__conv_short_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(SHORT, DOUBLE, short, double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_short_ldouble + * Function: H5T__conv_short_ldouble * - * Purpose: Convert native short to native long double using hardware. - * This is a fast special case. + * Purpose: Convert native short to native long double using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7314,17 +7314,17 @@ H5T__conv_short_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(SHORT, LDOUBLE, short, long double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_float + * Function: H5T__conv_ushort_float * - * Purpose: Convert native unsigned short to native float using hardware. - * This is a fast special case. + * Purpose: Convert native unsigned short to native float using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7336,17 +7336,17 @@ H5T__conv_ushort_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(USHORT, FLOAT, unsigned short, float, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_double + * Function: H5T__conv_ushort_double * - * Purpose: Convert native unsigned short to native double using hardware. - * This is a fast special case. + * Purpose: Convert native unsigned short to native double using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7358,17 +7358,17 @@ H5T__conv_ushort_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(USHORT, DOUBLE, unsigned short, double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ushort_ldouble + * Function: H5T__conv_ushort_ldouble * - * Purpose: Convert native unsigned short to native long double using + * Purpose: Convert native unsigned short to native long double using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7380,17 +7380,17 @@ H5T__conv_ushort_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(USHORT, LDOUBLE, unsigned short, long double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_float + * Function: H5T__conv_int_float * - * Purpose: Convert native integer to native float using hardware. - * This is a fast special case. + * Purpose: Convert native integer to native float using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7402,17 +7402,17 @@ H5T__conv_int_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(INT, FLOAT, int, float, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_double + * Function: H5T__conv_int_double * - * Purpose: Convert native integer to native double using hardware. - * This is a fast special case. + * Purpose: Convert native integer to native double using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7424,17 +7424,17 @@ H5T__conv_int_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(INT, DOUBLE, int, double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_int_ldouble + * Function: H5T__conv_int_ldouble * - * Purpose: Convert native integer to native long double using hardware. - * This is a fast special case. + * Purpose: Convert native integer to native long double using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7446,17 +7446,17 @@ H5T__conv_int_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_float + * Function: H5T__conv_uint_float * - * Purpose: Convert native unsigned integer to native float using + * Purpose: Convert native unsigned integer to native float using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7468,17 +7468,17 @@ H5T__conv_uint_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_double + * Function: H5T__conv_uint_double * - * Purpose: Convert native unsigned integer to native double using + * Purpose: Convert native unsigned integer to native double using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7490,17 +7490,17 @@ H5T__conv_uint_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_uint_ldouble + * Function: H5T__conv_uint_ldouble * - * Purpose: Convert native unsigned integer to native long double using + * Purpose: Convert native unsigned integer to native long double using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7512,17 +7512,17 @@ H5T__conv_uint_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(UINT, LDOUBLE, unsigned int, long double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_float + * Function: H5T__conv_long_float * - * Purpose: Convert native long to native float using hardware. - * This is a fast special case. + * Purpose: Convert native long to native float using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7534,17 +7534,17 @@ H5T__conv_long_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(LONG, FLOAT, long, float, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_double + * Function: H5T__conv_long_double * - * Purpose: Convert native long to native double using hardware. - * This is a fast special case. + * Purpose: Convert native long to native double using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7556,17 +7556,17 @@ H5T__conv_long_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(LONG, DOUBLE, long, double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_long_ldouble + * Function: H5T__conv_long_ldouble * - * Purpose: Convert native long to native long double using hardware. - * This is a fast special case. + * Purpose: Convert native long to native long double using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7578,17 +7578,17 @@ H5T__conv_long_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(LONG, LDOUBLE, long, long double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_float + * Function: H5T__conv_ulong_float * - * Purpose: Convert native unsigned long to native float using hardware. - * This is a fast special case. + * Purpose: Convert native unsigned long to native float using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7600,17 +7600,17 @@ H5T__conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_double + * Function: H5T__conv_ulong_double * - * Purpose: Convert native unsigned long to native double using hardware. - * This is a fast special case. + * Purpose: Convert native unsigned long to native double using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7622,17 +7622,17 @@ H5T__conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ulong_ldouble + * Function: H5T__conv_ulong_ldouble * - * Purpose: Convert native unsigned long to native long double using + * Purpose: Convert native unsigned long to native long double using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7644,17 +7644,17 @@ H5T__conv_ulong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(ULONG, LDOUBLE, unsigned long, long double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_float + * Function: H5T__conv_llong_float * - * Purpose: Convert native long long to native float using hardware. - * This is a fast special case. + * Purpose: Convert native long long to native float using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7666,17 +7666,17 @@ H5T__conv_llong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(LLONG, FLOAT, long long, float, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_double + * Function: H5T__conv_llong_double * - * Purpose: Convert native long long to native double using hardware. - * This is a fast special case. + * Purpose: Convert native long long to native double using hardware. + * This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7688,17 +7688,17 @@ H5T__conv_llong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(LLONG, DOUBLE, long long, double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_llong_ldouble + * Function: H5T__conv_llong_ldouble * - * Purpose: Convert native long long to native long double using + * Purpose: Convert native long long to native long double using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7712,17 +7712,17 @@ H5T__conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, } #endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_float + * Function: H5T__conv_ullong_float * - * Purpose: Convert native unsigned long long to native float using + * Purpose: Convert native unsigned long long to native float using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7734,17 +7734,17 @@ H5T__conv_ullong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(ULLONG, FLOAT, unsigned long long, float, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_double + * Function: H5T__conv_ullong_double * - * Purpose: Convert native unsigned long long to native double using + * Purpose: Convert native unsigned long long to native double using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7756,17 +7756,17 @@ H5T__conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_CONV_xF(ULLONG, DOUBLE, unsigned long long, double, -, -); } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ullong_ldouble + * Function: H5T__conv_ullong_ldouble * - * Purpose: Convert native unsigned long long to native long double using + * Purpose: Convert native unsigned long long to native long double using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7780,17 +7780,17 @@ H5T__conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, } #endif /*H5T_CONV_INTERNAL_ULLONG_LDOUBLE*/ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_schar + * Function: H5T__conv_float_schar * - * Purpose: Convert native float to native signed char using + * Purpose: Convert native float to native signed char using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7799,22 +7799,22 @@ H5T__conv_float_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, SCHAR, float, signed char, SCHAR_MIN, SCHAR_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_uchar + * Function: H5T__conv_float_uchar * - * Purpose: Convert native float to native unsigned char using + * Purpose: Convert native float to native unsigned char using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7823,22 +7823,22 @@ H5T__conv_float_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, UCHAR, float, unsigned char, 0, UCHAR_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_schar + * Function: H5T__conv_double_schar * - * Purpose: Convert native double to native signed char using + * Purpose: Convert native double to native signed char using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7847,22 +7847,22 @@ H5T__conv_double_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, SCHAR, double, signed char, SCHAR_MIN, SCHAR_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_uchar + * Function: H5T__conv_double_uchar * - * Purpose: Convert native double to native unsigned char using + * Purpose: Convert native double to native unsigned char using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7871,22 +7871,22 @@ H5T__conv_double_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, UCHAR, double, unsigned char, 0, UCHAR_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_schar + * Function: H5T__conv_ldouble_schar * - * Purpose: Convert native long double to native signed char using + * Purpose: Convert native long double to native signed char using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7895,22 +7895,22 @@ H5T__conv_ldouble_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, SCHAR, long double, signed char, SCHAR_MIN, SCHAR_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_uchar + * Function: H5T__conv_ldouble_uchar * - * Purpose: Convert native long double to native unsigned char using + * Purpose: Convert native long double to native unsigned char using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -7919,22 +7919,22 @@ H5T__conv_ldouble_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, UCHAR, long double, unsigned char, 0, UCHAR_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_short + * Function: H5T__conv_float_short * - * Purpose: Convert native float to native short using + * Purpose: Convert native float to native short using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7943,22 +7943,22 @@ H5T__conv_float_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, SHORT, float, short, SHRT_MIN, SHRT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_ushort + * Function: H5T__conv_float_ushort * - * Purpose: Convert native float to native unsigned short using + * Purpose: Convert native float to native unsigned short using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7967,22 +7967,22 @@ H5T__conv_float_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, USHORT, float, unsigned short, 0, USHRT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_short + * Function: H5T__conv_double_short * - * Purpose: Convert native double to native short using + * Purpose: Convert native double to native short using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -7991,22 +7991,22 @@ H5T__conv_double_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, SHORT, double, short, SHRT_MIN, SHRT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_ushort + * Function: H5T__conv_double_ushort * - * Purpose: Convert native double to native unsigned short using + * Purpose: Convert native double to native unsigned short using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8015,22 +8015,22 @@ H5T__conv_double_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, USHORT, double, unsigned short, 0, USHRT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_short + * Function: H5T__conv_ldouble_short * - * Purpose: Convert native long double to native short using + * Purpose: Convert native long double to native short using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -8039,22 +8039,22 @@ H5T__conv_ldouble_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, SHORT, long double, short, SHRT_MIN, SHRT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_ushort + * Function: H5T__conv_ldouble_ushort * - * Purpose: Convert native long double to native unsigned short using + * Purpose: Convert native long double to native unsigned short using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -8063,22 +8063,22 @@ H5T__conv_ldouble_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, USHORT, long double, unsigned short, 0, USHRT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_int + * Function: H5T__conv_float_int * - * Purpose: Convert native float to native int using + * Purpose: Convert native float to native int using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8087,22 +8087,22 @@ H5T__conv_float_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_uint + * Function: H5T__conv_float_uint * - * Purpose: Convert native float to native unsigned int using + * Purpose: Convert native float to native unsigned int using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8111,22 +8111,22 @@ H5T__conv_float_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_int + * Function: H5T__conv_double_int * - * Purpose: Convert native double to native int using + * Purpose: Convert native double to native int using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8135,22 +8135,22 @@ H5T__conv_double_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_uint + * Function: H5T__conv_double_uint * - * Purpose: Convert native double to native unsigned int using + * Purpose: Convert native double to native unsigned int using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8159,22 +8159,22 @@ H5T__conv_double_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, UINT, double, unsigned int, 0, UINT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_int + * Function: H5T__conv_ldouble_int * - * Purpose: Convert native long double to native int using + * Purpose: Convert native long double to native int using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -8183,22 +8183,22 @@ H5T__conv_ldouble_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, INT, long double, int, INT_MIN, INT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_uint + * Function: H5T__conv_ldouble_uint * - * Purpose: Convert native long double to native unsigned int using + * Purpose: Convert native long double to native unsigned int using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -8207,22 +8207,22 @@ H5T__conv_ldouble_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, UINT, long double, unsigned int, 0, UINT_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_long + * Function: H5T__conv_float_long * - * Purpose: Convert native float to native long using + * Purpose: Convert native float to native long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8231,22 +8231,22 @@ H5T__conv_float_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_ulong + * Function: H5T__conv_float_ulong * - * Purpose: Convert native float to native unsigned long using + * Purpose: Convert native float to native unsigned long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8255,22 +8255,22 @@ H5T__conv_float_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, ULONG, float, unsigned long, 0, ULONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_long + * Function: H5T__conv_double_long * - * Purpose: Convert native double to native long using + * Purpose: Convert native double to native long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8279,22 +8279,22 @@ H5T__conv_double_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, LONG, double, long, LONG_MIN, LONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_ulong + * Function: H5T__conv_double_ulong * - * Purpose: Convert native double to native unsigned long using + * Purpose: Convert native double to native unsigned long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8303,22 +8303,22 @@ H5T__conv_double_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, ULONG, double, unsigned long, 0, ULONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_long + * Function: H5T__conv_ldouble_long * - * Purpose: Convert native long double to native long using + * Purpose: Convert native long double to native long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -8327,22 +8327,22 @@ H5T__conv_ldouble_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, LONG, long double, long, LONG_MIN, LONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_ulong + * Function: H5T__conv_ldouble_ulong * - * Purpose: Convert native long double to native unsigned long using + * Purpose: Convert native long double to native unsigned long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -8351,22 +8351,22 @@ H5T__conv_ldouble_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, ULONG, long double, unsigned long, 0, ULONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_llong + * Function: H5T__conv_float_llong * - * Purpose: Convert native float to native long long using + * Purpose: Convert native float to native long long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8375,22 +8375,22 @@ H5T__conv_float_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, LLONG, float, long long, LLONG_MIN, LLONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_float_ullong + * Function: H5T__conv_float_ullong * - * Purpose: Convert native float to native unsigned long long using + * Purpose: Convert native float to native unsigned long long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8399,22 +8399,22 @@ H5T__conv_float_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, ULLONG, float, unsigned long long, 0, ULLONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_llong + * Function: H5T__conv_double_llong * - * Purpose: Convert native double to native long long using + * Purpose: Convert native double to native long long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8423,22 +8423,22 @@ H5T__conv_double_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, LLONG, double, long long, LLONG_MIN, LLONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_double_ullong + * Function: H5T__conv_double_ullong * - * Purpose: Convert native double to native unsigned long long using + * Purpose: Convert native double to native unsigned long long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, November 7, 2003 + * Programmer: Raymond Lu + * Friday, November 7, 2003 * *------------------------------------------------------------------------- */ @@ -8447,22 +8447,22 @@ H5T__conv_double_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, ULLONG, double, unsigned long long, 0, ULLONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_llong + * Function: H5T__conv_ldouble_llong * - * Purpose: Convert native long double to native long long using + * Purpose: Convert native long double to native long long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -8472,23 +8472,23 @@ H5T__conv_ldouble_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } #endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_ldouble_ullong + * Function: H5T__conv_ldouble_ullong * - * Purpose: Convert native long double to native unsigned long long using + * Purpose: Convert native long double to native unsigned long long using * hardware. This is a fast special case. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Tuesday, Febuary 1, 2005 + * Programmer: Raymond Lu + * Tuesday, Febuary 1, 2005 * *------------------------------------------------------------------------- */ @@ -8498,24 +8498,24 @@ H5T__conv_ldouble_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { -H5_GCC_DIAG_OFF(float-equal) +H5_GCC_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, ULLONG, long double, unsigned long long, 0, ULLONG_MAX); -H5_GCC_DIAG_ON(float-equal) +H5_GCC_DIAG_ON("float-equal") } #endif /*H5T_CONV_INTERNAL_LDOUBLE_ULLONG*/ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_f_i + * Function: H5T__conv_f_i * - * Purpose: Convert one floating-point type to an integer. This is + * Purpose: Convert one floating-point type to an integer. This is * the catch-all function for float-integer conversions and * is probably not particularly fast. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Wednesday, Jan 21, 2004 + * Programmer: Raymond Lu + * Wednesday, Jan 21, 2004 * *------------------------------------------------------------------------- */ @@ -8524,28 +8524,28 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { /* Traversal-related variables */ - H5T_t *src_p; /*source datatype */ - H5T_t *dst_p; /*destination datatype */ - H5T_atomic_t src; /*atomic source info */ - H5T_atomic_t dst; /*atomic destination info */ - int direction; /*forward or backward traversal */ - size_t elmtno; /*element number */ - size_t half_size; /*half the type size */ + H5T_t *src_p; /*source datatype */ + H5T_t *dst_p; /*destination datatype */ + H5T_atomic_t src; /*atomic source info */ + H5T_atomic_t dst; /*atomic destination info */ + int direction; /*forward or backward traversal */ + size_t elmtno; /*element number */ + size_t half_size; /*half the type size */ size_t tsize; /*type size for swapping bytes */ - size_t olap; /*num overlapping elements */ - uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ + size_t olap; /*num overlapping elements */ + uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ uint8_t *src_rev=NULL; /*order-reversed source buffer */ - uint8_t dbuf[64]; /*temp destination buffer */ + uint8_t dbuf[64]; /*temp destination buffer */ uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/ /* Conversion-related variables */ - hssize_t expo; /*source exponent */ + hssize_t expo; /*source exponent */ hssize_t sign; /*source sign bit value */ uint8_t *int_buf=NULL; /*buffer for temporary value */ size_t buf_size; /*buffer size for temporary value */ - size_t i; /*miscellaneous counters */ - size_t first; /*first bit(MSB) in an integer */ - ssize_t sfirst; /*a signed version of `first' */ + size_t i; /*miscellaneous counters */ + size_t first; /*first bit(MSB) in an integer */ + ssize_t sfirst; /*a signed version of `first' */ H5T_conv_cb_t cb_struct={NULL, NULL}; /*conversion callback structure */ hbool_t truncated; /*if fraction value is dropped */ hbool_t reverse; /*if reverse order of destination at the end */ @@ -9074,18 +9074,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_f_i() */ - + /*------------------------------------------------------------------------- - * Function: H5T__conv_i_f + * Function: H5T__conv_i_f * - * Purpose: Convert one integer type to a floating-point type. This is + * Purpose: Convert one integer type to a floating-point type. This is * the catch-all function for integer-float conversions and * is probably not particularly fast. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Raymond Lu - * Friday, Feb 6, 2004 + * Programmer: Raymond Lu + * Friday, Feb 6, 2004 * *------------------------------------------------------------------------- */ @@ -9094,31 +9094,31 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { /* Traversal-related variables */ - H5T_t *src_p; /*source datatype */ - H5T_t *dst_p; /*destination datatype */ - H5T_atomic_t src; /*atomic source info */ - H5T_atomic_t dst; /*atomic destination info */ - int direction; /*forward or backward traversal */ - size_t elmtno; /*element number */ - size_t half_size; /*half the type size */ + H5T_t *src_p; /*source datatype */ + H5T_t *dst_p; /*destination datatype */ + H5T_atomic_t src; /*atomic source info */ + H5T_atomic_t dst; /*atomic destination info */ + int direction; /*forward or backward traversal */ + size_t elmtno; /*element number */ + size_t half_size; /*half the type size */ size_t tsize; /*type size for swapping bytes */ - size_t olap; /*num overlapping elements */ - uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ + size_t olap; /*num overlapping elements */ + uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ uint8_t *src_rev = NULL; /*order-reversed source buffer */ - uint8_t dbuf[64]; /*temp destination buffer */ + uint8_t dbuf[64]; /*temp destination buffer */ uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/ /* Conversion-related variables */ - hsize_t expo; /*destination exponent */ - hsize_t expo_max; /*maximal possible exponent value */ + hsize_t expo; /*destination exponent */ + hsize_t expo_max; /*maximal possible exponent value */ size_t sign; /*source sign bit value */ hbool_t is_max_neg; /*source is maximal negative value*/ hbool_t do_round; /*whether there is roundup */ uint8_t *int_buf = NULL; /*buffer for temporary value */ size_t buf_size; /*buffer size for temporary value */ - size_t i; /*miscellaneous counters */ - size_t first; /*first bit(MSB) in an integer */ - ssize_t sfirst; /*a signed version of `first' */ + size_t i; /*miscellaneous counters */ + size_t first; /*first bit(MSB) in an integer */ + ssize_t sfirst; /*a signed version of `first' */ H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */ H5T_conv_ret_t except_ret; /*return of callback function */ hbool_t reverse; /*if reverse the order of destination */ @@ -9305,10 +9305,10 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, if (H5T_NORM_IMPLIED==dst.u.f.norm) { /* Imply first bit */ H5T__bit_set(int_buf, first, (size_t)1, 0); - } + } else if (H5T_NORM_NONE==dst.u.f.norm) { first++; - } + } /* Roundup for mantissa */ if(first > dst.u.f.msize) { @@ -9336,7 +9336,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, /* Check 1st dropoff bit, see if it's set. */ if(H5T__bit_get_d(int_buf, ((first - dst.u.f.msize) - 1), (size_t)1)) { - /* Check all bits after 1st dropoff bit, see if any of them is set. */ + /* Check all bits after 1st dropoff bit, see if any of them is set. */ if(((first - dst.u.f.msize) - 1) > 0 && H5T__bit_get_d(int_buf, (size_t)0, ((first - dst.u.f.msize) - 1))) do_round = 1; else { /* The .50...0 case */ @@ -9344,7 +9344,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, if(H5T__bit_get_d(int_buf, (first - dst.u.f.msize), (size_t)1)) do_round = 1; } - } + } /* Right shift to drop off extra bits */ H5T__bit_shift(int_buf, (ssize_t)(dst.u.f.msize - first), (size_t)0, buf_size * 8); @@ -9353,28 +9353,28 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, H5T__bit_inc(int_buf, (size_t)0, buf_size * 8); do_round = 0; - /* If integer is like 0x0ff...fff and we need to round up the - * last f, we get 0x100...000. Treat this special case here. - */ - if(H5T__bit_get_d(int_buf, dst.u.f.msize, (size_t)1)) { - if (H5T_NORM_IMPLIED==dst.u.f.norm) { - /* The bit at this 1's position was impled already, so this - * number should be 0x200...000. We need to increment the - * exponent in this case. - */ - expo++; - } else if (H5T_NORM_NONE==dst.u.f.norm) { - /* Right shift 1 bit to let the carried 1 fit in the mantissa, - * and increment exponent by 1. - */ + /* If integer is like 0x0ff...fff and we need to round up the + * last f, we get 0x100...000. Treat this special case here. + */ + if(H5T__bit_get_d(int_buf, dst.u.f.msize, (size_t)1)) { + if (H5T_NORM_IMPLIED==dst.u.f.norm) { + /* The bit at this 1's position was impled already, so this + * number should be 0x200...000. We need to increment the + * exponent in this case. + */ + expo++; + } else if (H5T_NORM_NONE==dst.u.f.norm) { + /* Right shift 1 bit to let the carried 1 fit in the mantissa, + * and increment exponent by 1. + */ H5T__bit_shift(int_buf, (ssize_t)-1, (size_t)0, buf_size * 8); - expo++; - } - } + expo++; + } + } } } else { /* The bit sequence can fit mantissa part. Left shift to fit in from high-order of - * bit position. */ + * bit position. */ H5T__bit_shift(int_buf, (ssize_t)(dst.u.f.msize - first), (size_t)0, dst.u.f.msize); } @@ -9484,11 +9484,11 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_i_f() */ - + /*------------------------------------------------------------------------- - * Function: H5T__reverse_order + * Function: H5T__reverse_order * - * Purpose: Internal assisting function to reverse the order of + * Purpose: Internal assisting function to reverse the order of * a sequence of byte when it's big endian or VAX order. * The byte sequence simulates the endian order. * @@ -9496,8 +9496,8 @@ done: * * Failure: Null * - * Programmer: Raymond Lu - * April 26, 2004 + * Programmer: Raymond Lu + * April 26, 2004 * *------------------------------------------------------------------------- */ @@ -9527,7 +9527,7 @@ H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order) FUNC_LEAVE_NOAPI(SUCCEED) } - + /*------------------------------------------------------------------------- * Function: H5T_reclaim * @@ -9571,7 +9571,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_reclaim() */ - + /*------------------------------------------------------------------------- * Function: H5T_reclaim_cb * diff --git a/src/H5Tnative.c b/src/H5Tnative.c index 357bb08..ab6b86c 100644 --- a/src/H5Tnative.c +++ b/src/H5Tnative.c @@ -19,13 +19,13 @@ #include "H5Tmodule.h" /* This source code file is part of the H5T module */ -#include "H5private.h" /* Generic Functions */ +#include "H5private.h" /* Generic Functions */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Tpkg.h" /* Datatypes */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* IDs */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Tpkg.h" /* Datatypes */ /* Static local functions */ static H5T_t *H5T__get_native_type(H5T_t *dt, H5T_direction_t direction, @@ -41,7 +41,7 @@ static herr_t H5T__cmp_offset(size_t *comp_size, size_t *offset, size_t elem_siz size_t nelems, size_t align, size_t *struct_align); - + /*------------------------------------------------------------------------- * Function: H5Tget_native_type * @@ -107,7 +107,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tget_native_type() */ - + /*------------------------------------------------------------------------- * Function: H5T__get_native_type * @@ -339,7 +339,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali case H5T_ENUM: { - H5T_path_t *tpath; /* Type conversion info */ + H5T_path_t *tpath; /* Type conversion info */ hid_t super_type_id, nat_super_type_id; /* Don't need to do anything special for alignment, offset since the ENUM type usually is integer. */ @@ -530,8 +530,8 @@ done: * the code below, but early (4.4.7, at least) gcc only allows * diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(duplicated-branches) - +H5_GCC_DIAG_OFF("duplicated-branches") + /*------------------------------------------------------------------------- * Function: H5T__get_native_integer * @@ -671,7 +671,7 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction, done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__get_native_integer() */ -H5_GCC_DIAG_ON(duplicated-branches) +H5_GCC_DIAG_ON("duplicated-branches") /* Disable warning for intentional identical branches here -QAK */ /* @@ -679,8 +679,8 @@ H5_GCC_DIAG_ON(duplicated-branches) * the code below, but early (4.4.7, at least) gcc only allows * diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(duplicated-branches) - +H5_GCC_DIAG_OFF("duplicated-branches") + /*------------------------------------------------------------------------- * Function: H5T__get_native_float * @@ -702,7 +702,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali H5T_t *dt=NULL; /* Appropriate native datatype to copy */ hid_t tid=(-1); /* Datatype ID of appropriate native datatype */ size_t align=0; /* Alignment necessary for native datatype */ - size_t native_size=0; /* Datatype size of the native type */ + size_t native_size=0; /* Datatype size of the native type */ enum match_type { /* The different kinds of floating point types we can match */ H5T_NATIVE_FLOAT_MATCH_FLOAT, H5T_NATIVE_FLOAT_MATCH_DOUBLE, @@ -720,50 +720,50 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali if(direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) { if(size<=sizeof(float)) { match=H5T_NATIVE_FLOAT_MATCH_FLOAT; - native_size = sizeof(float); + native_size = sizeof(float); } else if(size<=sizeof(double)) { match=H5T_NATIVE_FLOAT_MATCH_DOUBLE; - native_size = sizeof(double); + native_size = sizeof(double); } #if H5_SIZEOF_LONG_DOUBLE !=0 else if(size<=sizeof(long double)) { match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE; - native_size = sizeof(long double); + native_size = sizeof(long double); } #endif else { /* If not match, return the biggest datatype */ #if H5_SIZEOF_LONG_DOUBLE !=0 match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE; - native_size = sizeof(long double); + native_size = sizeof(long double); #else match=H5T_NATIVE_FLOAT_MATCH_DOUBLE; native_size = sizeof(double); #endif - } + } } else { #if H5_SIZEOF_LONG_DOUBLE !=0 if(size>sizeof(double)) { match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE; - native_size = sizeof(long double); + native_size = sizeof(long double); } else if(size>sizeof(float)) { match=H5T_NATIVE_FLOAT_MATCH_DOUBLE; - native_size = sizeof(double); + native_size = sizeof(double); } else { match=H5T_NATIVE_FLOAT_MATCH_FLOAT; - native_size = sizeof(float); - } + native_size = sizeof(float); + } #else if(size>sizeof(float)) { match=H5T_NATIVE_FLOAT_MATCH_DOUBLE; - native_size = sizeof(double); + native_size = sizeof(double); } else { match=H5T_NATIVE_FLOAT_MATCH_FLOAT; - native_size = sizeof(float); - } + native_size = sizeof(float); + } #endif } @@ -804,7 +804,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__get_native_float() */ -H5_GCC_DIAG_ON(duplicated-branches) +H5_GCC_DIAG_ON("duplicated-branches") /* Disable warning for intentional identical branches here -QAK */ /* @@ -812,8 +812,8 @@ H5_GCC_DIAG_ON(duplicated-branches) * the code below, but early (4.4.7, at least) gcc only allows * diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(duplicated-branches) - +H5_GCC_DIAG_OFF("duplicated-branches") + /*------------------------------------------------------------------------- * Function: H5T__get_native_bitfield * @@ -898,22 +898,22 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction, done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__get_native_bitfield() */ -H5_GCC_DIAG_ON(duplicated-branches) +H5_GCC_DIAG_ON("duplicated-branches") + - /*------------------------------------------------------------------------- - * Function: H5T__cmp_offset + * Function: H5T__cmp_offset * - * Purpose: This function is only for convenience. It computes the + * Purpose: This function is only for convenience. It computes the * compound type size, offset of the member being considered * and the alignment for the whole compound type. * - * Return: Success: Non-negative value. + * Return: Success: Non-negative value. * - * Failure: Negative value. + * Failure: Negative value. * - * Programmer: Raymond Lu - * December 10, 2002 + * Programmer: Raymond Lu + * December 10, 2002 * *------------------------------------------------------------------------- */ diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h index 5c975f6..0c69ba6 100644 --- a/src/H5VMprivate.h +++ b/src/H5VMprivate.h @@ -19,9 +19,9 @@ #define H5VMprivate_H /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5MMprivate.h" /* Memory management */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5MMprivate.h" /* Memory management */ /* Vector-Vector sequence operation callback */ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, @@ -41,7 +41,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, /* Other functions */ #define H5VM_vector_cpy(N,DST,SRC) { \ - HDassert(sizeof(*(DST))==sizeof(*(SRC))); \ + HDassert(sizeof(*(DST))==sizeof(*(SRC))); \ if (SRC) H5MM_memcpy (DST, SRC, (N)*sizeof(*(DST))); \ else HDmemset (DST, 0, (N)*sizeof(*(DST))); \ } @@ -85,32 +85,32 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, #define H5VM_ZERO NULL H5_DLL hsize_t H5VM_hyper_stride(unsigned n, const hsize_t *size, - const hsize_t *total_size, - const hsize_t *offset, - hsize_t *stride); + const hsize_t *total_size, + const hsize_t *offset, + hsize_t *stride); H5_DLL htri_t H5VM_hyper_eq(unsigned n, const hsize_t *offset1, - const hsize_t *size1, const hsize_t *offset2, - const hsize_t *size2); + const hsize_t *size1, const hsize_t *offset2, + const hsize_t *size2); H5_DLL herr_t H5VM_hyper_fill(unsigned n, const hsize_t *_size, - const hsize_t *total_size, - const hsize_t *offset, void *_dst, - unsigned fill_value); + const hsize_t *total_size, + const hsize_t *offset, void *_dst, + unsigned fill_value); H5_DLL herr_t H5VM_hyper_copy(unsigned n, const hsize_t *size, - const hsize_t *dst_total_size, - const hsize_t *dst_offset, void *_dst, - const hsize_t *src_total_size, - const hsize_t *src_offset, const void *_src); + const hsize_t *dst_total_size, + const hsize_t *dst_offset, void *_dst, + const hsize_t *src_total_size, + const hsize_t *src_offset, const void *_src); H5_DLL herr_t H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size, - const hsize_t *stride, void *_dst, - unsigned fill_value); + const hsize_t *stride, void *_dst, + unsigned fill_value); H5_DLL herr_t H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *_size, - const hsize_t *dst_stride, void *_dst, - const hsize_t *src_stride, const void *_src); + const hsize_t *dst_stride, void *_dst, + const hsize_t *src_stride, const void *_src); H5_DLL herr_t H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *_size, - const hssize_t *dst_stride, void *_dst, - const hssize_t *src_stride, const void *_src); + const hssize_t *dst_stride, void *_dst, + const hssize_t *src_stride, const void *_src); H5_DLL herr_t H5VM_array_fill(void *_dst, const void *src, size_t size, - size_t count); + size_t count); H5_DLL herr_t H5VM_array_down(unsigned n, const hsize_t *total_size, hsize_t *down); H5_DLL hsize_t H5VM_array_offset_pre(unsigned n, @@ -204,7 +204,7 @@ H5VM_vector_zerop_u(int n, const hsize_t *v) if (!v) HGOTO_DONE(TRUE) while (n--) - if (*v++) + if (*v++) HGOTO_DONE(FALSE) done: @@ -241,7 +241,7 @@ H5VM_vector_zerop_s(int n, const hssize_t *v) if (!v) HGOTO_DONE(TRUE) while (n--) - if (*v++) + if (*v++) HGOTO_DONE(FALSE) done: @@ -291,9 +291,9 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- - * Function: H5VM_vector_cmp_s + * Function: H5VM_vector_cmp_s * * Purpose: Compares two vectors of the same size and determines if V1 is * lexicographically less than, equal, or greater than V2. @@ -308,7 +308,7 @@ done: * * Failure: 0 if N is zero * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 8, 1998 * *------------------------------------------------------------------------- @@ -335,7 +335,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- * Function: H5VM_vector_inc * @@ -361,6 +361,7 @@ H5VM_vector_inc(int n, hsize_t *v1, const hsize_t *v2) /* Lookup table for general log2(n) routine */ static const unsigned char LogTable256[] = { + /* clang-clang-format off */ 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, @@ -377,9 +378,10 @@ static const unsigned char LogTable256[] = 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + /* clang-clang-format on */ }; - + /*------------------------------------------------------------------------- * Function: H5VM_log2_gen * @@ -432,7 +434,7 @@ static const unsigned MultiplyDeBruijnBitPosition[32] = 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 }; - + /*------------------------------------------------------------------------- * Function: H5VM_log2_of2 * @@ -464,19 +466,19 @@ H5VM_log2_of2(uint32_t n) return(MultiplyDeBruijnBitPosition[(n * (uint32_t)0x077CB531UL) >> 27]); } /* H5VM_log2_of2() */ - + /*------------------------------------------------------------------------- - * Function: H5VM_power2up + * Function: H5VM_power2up * - * Purpose: Round up a number to the next power of 2 + * Purpose: Round up a number to the next power of 2 * * Note: Although this routine is 'static' in this file, that's intended * only as an optimization and the naming (with a single underscore) * reflects its inclusion in a "private" header file. * - * Return: Return the number which is a power of 2 + * Return: Return the number which is a power of 2 * - * Programmer: Vailin Choi; Nov 2014 + * Programmer: Vailin Choi; Nov 2014 * *------------------------------------------------------------------------- */ @@ -495,7 +497,7 @@ H5VM_power2up(hsize_t n) return(ret_value); } /* H5VM_power2up */ - + /*------------------------------------------------------------------------- * Function: H5VM_limit_enc_size * @@ -522,15 +524,15 @@ H5VM_limit_enc_size(uint64_t limit) static const unsigned char H5VM_bit_set_g[8] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01}; static const unsigned char H5VM_bit_clear_g[8] = {0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0xFE}; - + /*------------------------------------------------------------------------- * Function: H5VM_bit_get * * Purpose: Determine the value of the n'th bit in a buffer. * - * Note: No range checking on <offset> is performed! + * Note: No range checking on <offset> is performed! * - * Note #2: Bits are sequentially stored in the buffer, starting with bit + * Note #2: Bits are sequentially stored in the buffer, starting with bit * offset 0 in the first byte's high-bit position, proceeding down * to bit offset 7 in the first byte's low-bit position, then to * bit offset 8 in the second byte's high-bit position, etc. @@ -553,15 +555,15 @@ H5VM_bit_get(const unsigned char *buf, size_t offset) return (hbool_t)((buf[offset / 8] & (H5VM_bit_set_g[offset % 8])) ? TRUE : FALSE); } /* end H5VM_bit_get() */ - + /*------------------------------------------------------------------------- * Function: H5VM_bit_set * * Purpose: Set/reset the n'th bit in a buffer. * - * Note: No range checking on <offset> is performed! + * Note: No range checking on <offset> is performed! * - * Note #2: Bits are sequentially stored in the buffer, starting with bit + * Note #2: Bits are sequentially stored in the buffer, starting with bit * offset 0 in the first byte's high-bit position, proceeding down * to bit offset 7 in the first byte's low-bit position, then to * bit offset 8 in the second byte's high-bit position, etc. diff --git a/src/H5detect.c b/src/H5detect.c index ac416aa..652dab8 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -52,7 +52,7 @@ static const char *FileHeader = "\n\ /* Disable warning about cast increasing the alignment of the target type, * that's _exactly_ what this code is probing. -QAK */ -H5_GCC_DIAG_OFF(cast-align) +H5_GCC_DIAG_OFF("cast-align") #if defined(__has_attribute) # if __has_attribute(no_sanitize_address) @@ -120,9 +120,9 @@ typedef struct malign_t { FILE *rawoutstream = NULL; /* global variables types detection code */ -H5_GCC_DIAG_OFF(larger-than=) +H5_GCC_DIAG_OFF("larger-than=") static detected_t d_g[MAXDETECT]; -H5_GCC_DIAG_ON(larger-than=) +H5_GCC_DIAG_ON("larger-than=") static malign_t m_g[MAXDETECT]; static volatile int nd_g = 0, na_g = 0; @@ -158,7 +158,7 @@ static H5JMP_BUF jbuf_g; #endif - + /*------------------------------------------------------------------------- * Function: precision * @@ -211,7 +211,7 @@ precision (detected_t *d) } } - + /*------------------------------------------------------------------------- * Function: DETECT_I/DETECT_BYTE * @@ -266,7 +266,7 @@ precision (detected_t *d) DETECT_I_BYTE_CORE(TYPE,VAR,INFO,TYPE) \ } - + /*------------------------------------------------------------------------- * Function: DETECT_F * @@ -305,10 +305,10 @@ precision (detected_t *d) for(_byte_mask = (unsigned char)1; _byte_mask; _byte_mask = (unsigned char) (_byte_mask << 1)) { \ _buf1[_i] ^= _byte_mask; \ HDmemcpy((void *)&_v2, (const void *)_buf1, sizeof(TYPE)); \ - H5_GCC_DIAG_OFF(float-equal) \ + H5_GCC_DIAG_OFF("float-equal") \ if(_v1 != _v2) \ _pad_mask[_i] |= _byte_mask; \ - H5_GCC_DIAG_ON(float-equal) \ + H5_GCC_DIAG_ON("float-equal") \ _buf1[_i] ^= _byte_mask; \ } /* end for */ \ \ @@ -363,7 +363,7 @@ precision (detected_t *d) } \ } - + /*------------------------------------------------------------------------- * Function: DETECT_M * @@ -414,10 +414,10 @@ precision (detected_t *d) else /* Little-Endian */ \ HDmemcpy(_buf+align_g[_ano]+(INFO.offset/8),((char *)&_val)+(INFO.offset/8),(size_t)(INFO.precision/8)); \ _val2 = *((TYPE*)(_buf+align_g[_ano])); \ - H5_GCC_DIAG_OFF(float-equal) \ + H5_GCC_DIAG_OFF("float-equal") \ if(_val!=_val2) \ H5LONGJMP(jbuf_g, 1); \ - H5_GCC_DIAG_ON(float-equal) \ + H5_GCC_DIAG_ON("float-equal") \ /* End Cray Check */ \ (INFO.align)=align_g[_ano]; \ } else { \ @@ -438,7 +438,7 @@ precision (detected_t *d) #if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL) - + /*------------------------------------------------------------------------- * Function: sigsegv_handler * @@ -471,7 +471,7 @@ sigsegv_handler(int H5_ATTR_UNUSED signo) #if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL) - + /*------------------------------------------------------------------------- * Function: sigbus_handler * @@ -504,7 +504,7 @@ sigbus_handler(int H5_ATTR_UNUSED signo) #if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL) - + /*------------------------------------------------------------------------- * Function: sigill_handler * @@ -535,7 +535,7 @@ sigill_handler(int H5_ATTR_UNUSED signo) } #endif - + /*------------------------------------------------------------------------- * Function: print_results * @@ -814,7 +814,7 @@ done:\n\ fprintf(rawoutstream, "/* sigill_handler called: %d times */\n", sigill_handler_called_g); } /* end print_results() */ - + /*------------------------------------------------------------------------- * Function: iprint * @@ -904,7 +904,7 @@ iprint(detected_t *d) } - + /*------------------------------------------------------------------------- * Function: byte_cmp * @@ -931,7 +931,7 @@ byte_cmp(int n, const void *_a, const void *_b, const unsigned char *pad_mask) return -1; } - + /*------------------------------------------------------------------------- * Function: bit_cmp * @@ -972,7 +972,7 @@ bit_cmp(unsigned int nbytes, int *perm, void *_a, void *_b, return 0; } - + /*------------------------------------------------------------------------- * Function: fix_order * @@ -1040,7 +1040,7 @@ fix_order(int n, int last, int *perm, const char **mesg) } } - + /*------------------------------------------------------------------------- * Function: imp_bit * @@ -1094,7 +1094,7 @@ imp_bit(unsigned int n, int *perm, void *_a, void *_b, const unsigned char *pad_ return (a[perm[major]] >> minor) & 0x01 ? 0 : 1; } - + /*------------------------------------------------------------------------- * Function: find_bias * @@ -1125,7 +1125,7 @@ find_bias(unsigned int epos, unsigned int esize, int *perm, void *_a) return bias; } - + /*------------------------------------------------------------------------- * Function: print_header * @@ -1266,7 +1266,7 @@ bit.\n"; } - + /*------------------------------------------------------------------------- * Function: detect_C89_integers * @@ -1288,7 +1288,7 @@ detect_C89_integers(void) DETECT_I(unsigned long, ULONG, d_g[nd_g]); nd_g++; } - + /*------------------------------------------------------------------------- * Function: detect_C89_floats * @@ -1304,7 +1304,7 @@ detect_C89_floats(void) DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++; } - + /*------------------------------------------------------------------------- * Function: detect_C99_integers8 * @@ -1360,7 +1360,7 @@ detect_C99_integers8(void) #endif } - + /*------------------------------------------------------------------------- * Function: detect_C99_integers16 * @@ -1392,7 +1392,7 @@ detect_C99_integers16(void) #endif } - + /*------------------------------------------------------------------------- * Function: detect_C99_integers32 * @@ -1424,7 +1424,7 @@ detect_C99_integers32(void) #endif } - + /*------------------------------------------------------------------------- * Function: detect_C99_integers64 * @@ -1470,7 +1470,7 @@ detect_C99_integers64(void) #endif } - + /*------------------------------------------------------------------------- * Function: detect_C99_integers * @@ -1490,7 +1490,7 @@ detect_C99_integers(void) detect_C99_integers64(); } - + /*------------------------------------------------------------------------- * Function: detect_C99_floats * @@ -1515,7 +1515,7 @@ detect_C99_floats(void) #endif } - + /*------------------------------------------------------------------------- * Function: detect_alignments * @@ -1593,7 +1593,7 @@ static int verify_signal_handlers(int signum, void (*handler)(int)) } #endif - + /*------------------------------------------------------------------------- * Function: main * @@ -1685,4 +1685,4 @@ main(int argc, char *argv[]) return EXIT_SUCCESS; } -H5_GCC_DIAG_ON(cast-align) +H5_GCC_DIAG_ON("cast-align") diff --git a/src/H5public.h b/src/H5public.h index ba2505a..249cc1d 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -81,12 +81,11 @@ extern "C" { */ /* These pragmas are only implemented usefully in gcc 4.6+ */ #if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 - #define H5_GCC_DIAG_STR(s) #s - #define H5_GCC_DIAG_JOINSTR(x,y) H5_GCC_DIAG_STR(x ## y) - #define H5_GCC_DIAG_DO_PRAGMA(x) _Pragma (#x) - #define H5_GCC_DIAG_PRAGMA(x) H5_GCC_DIAG_DO_PRAGMA(GCC diagnostic x) + #define H5_GCC_DIAG_JOINSTR(x, y) x y + #define H5_GCC_DIAG_DO_PRAGMA(x) _Pragma(#x) + #define H5_GCC_DIAG_PRAGMA(x) H5_GCC_DIAG_DO_PRAGMA(GCC diagnostic x) - #define H5_GCC_DIAG_OFF(x) H5_GCC_DIAG_PRAGMA(push) H5_GCC_DIAG_PRAGMA(ignored H5_GCC_DIAG_JOINSTR(-W,x)) + #define H5_GCC_DIAG_OFF(x) H5_GCC_DIAG_PRAGMA(push) H5_GCC_DIAG_PRAGMA(ignored H5_GCC_DIAG_JOINSTR("-W",x)) #define H5_GCC_DIAG_ON(x) H5_GCC_DIAG_PRAGMA(pop) #else #define H5_GCC_DIAG_OFF(x) @@ -182,10 +181,10 @@ typedef long long ssize_t; * type. */ #if H5_SIZEOF_LONG_LONG >= 8 -H5_GCC_DIAG_OFF(long-long) +H5_GCC_DIAG_OFF("long-long") typedef unsigned long long hsize_t; typedef signed long long hssize_t; -H5_GCC_DIAG_ON(long-long) +H5_GCC_DIAG_ON("long-long") # define H5_SIZEOF_HSIZE_T H5_SIZEOF_LONG_LONG # define H5_SIZEOF_HSSIZE_T H5_SIZEOF_LONG_LONG #else diff --git a/src/H5system.c b/src/H5system.c index c5fea9f..d664038 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -73,7 +73,7 @@ /* Track whether tzset routine was called */ static hbool_t H5_ntzset = FALSE; - + /*------------------------------------------------------------------------- * Function: HDfprintf * @@ -107,7 +107,7 @@ static hbool_t H5_ntzset = FALSE; * format_templ in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") int HDfprintf(FILE *stream, const char *fmt, ...) { @@ -473,9 +473,9 @@ HDfprintf(FILE *stream, const char *fmt, ...) HDva_end(ap); return nout; } /* end HDfprintf() */ -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") + - /*------------------------------------------------------------------------- * Function: HDstrtoll * @@ -600,7 +600,7 @@ HDstrtoll(const char *s, const char **rest, int base) return acc; } /* end HDstrtoll() */ #endif - + /*------------------------------------------------------------------------- * Function: HDrand/HDsrand * @@ -635,8 +635,8 @@ void HDsrand(unsigned int seed) } #endif /* H5_HAVE_RAND_R */ - - + + /*------------------------------------------------------------------------- * Function: Pflock * @@ -680,7 +680,7 @@ Pflock(int fd, int operation) { } /* end Pflock() */ #endif /* H5_HAVE_FCNTL */ - + /*------------------------------------------------------------------------- * Function: Nflock * @@ -697,7 +697,7 @@ Nflock(int H5_ATTR_UNUSED fd, int H5_ATTR_UNUSED operation) { return 0; } /* end Nflock() */ - + /*------------------------------------------------------------------------- * Function: H5_make_time * @@ -782,7 +782,7 @@ done: /* Offset between 1/1/1601 and 1/1/1970 in 100 nanosecond units */ #define _W32_FT_OFFSET (116444736000000000ULL) - + /*------------------------------------------------------------------------- * Function: Wgettimeofday * @@ -834,7 +834,7 @@ Wgettimeofday(struct timeval *tv, struct timezone *tz) return 0; } /* end Wgettimeofday() */ - + /*------------------------------------------------------------------------- * Function: Wsetenv * @@ -873,7 +873,7 @@ Wsetenv(const char *name, const char *value, int overwrite) #pragma comment(lib, "advapi32.lib") #endif - + /*------------------------------------------------------------------------- * Function: H5_get_win32_times * @@ -952,7 +952,7 @@ H5_get_win32_times(H5_timevals_t *tvs /*in,out*/) #define WloginBuffer_count 256 static char Wlogin_buffer[WloginBuffer_count]; - + char* Wgetlogin(void) { @@ -990,7 +990,7 @@ int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap) return count; } - + /*------------------------------------------------------------------------- * Function: Wflock * @@ -1058,7 +1058,7 @@ Wnanosleep(const struct timespec *req, struct timespec *rem) } /* end Wnanosleep() */ - + /*------------------------------------------------------------------------- * Function: Wllround, Wllroundf, Wlround, Wlroundf, Wround, Wroundf * @@ -1236,7 +1236,7 @@ done: #endif /* H5_HAVE_WIN32_API */ - + /*------------------------------------------------------------------------- * Function: H5_build_extpath * @@ -1356,7 +1356,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5_build_extpath() */ - + /*-------------------------------------------------------------------------- * Function: H5_combine_path * @@ -1431,7 +1431,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5_combine_path() */ - + /*-------------------------------------------------------------------------- * Function: H5_nanosleep * @@ -1463,7 +1463,7 @@ H5_nanosleep(uint64_t nanosec) #define H5_WIN32_ENV_VAR_BUFFER_SIZE 32767 - + /*------------------------------------------------------------------------- * Function: H5_expand_windows_env_vars() * @@ -14,8 +14,8 @@ /* * Programmer: Robb Matzke * Wednesday, April 8, 1998 - * Modified: Albert Cheng - * September 11, 2010 + * Modified: Albert Cheng + * September 11, 2010 */ /* * The purpose of this test is to verify if a virtual file driver can handle: @@ -53,20 +53,20 @@ */ #include "h5test.h" -#define DNAME "big.data" +#define DNAME "big.data" -#define WRT_N 50 -#define WRT_SIZE 4*1024 -#define FAMILY_SIZE 1024*1024*1024 +#define WRT_N 50 +#define WRT_SIZE 4*1024 +#define FAMILY_SIZE 1024*1024*1024 #define GB (HDoff_t)0x40000000L -#define MAX_TRIES 100 +#define MAX_TRIES 100 #if H5_SIZEOF_LONG_LONG >= 8 -# define GB8LL ((unsigned long long)8*1024*1024*1024) +# define GB8LL ((unsigned long long)8*1024*1024*1024) #else -# define GB8LL 0 /*cannot do the test*/ +# define GB8LL 0 /*cannot do the test*/ #endif /* Define Small, Large, Extra Large, Huge File which @@ -96,19 +96,19 @@ static int test_family(hid_t fapl); /* Array used to record all addresses at which data has been written */ /* so far. Used to prevent overlapping writes. */ static hsize_t values_used[WRT_N]; - + /*------------------------------------------------------------------------- - * Function: randll + * Function: randll * - * Purpose: Create a random long long value. - * Ensures that a write at this value doesn't overlap any - * previous write. + * Purpose: Create a random long long value. + * Ensures that a write at this value doesn't overlap any + * previous write. * - * Return: Success: Random value + * Return: Success: Random value * - * Failure: Random value which overlaps another write + * Failure: Random value which overlaps another write * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, November 24, 1998 * * Modifications: @@ -118,10 +118,10 @@ static hsize_t values_used[WRT_N]; static hsize_t randll(hsize_t limit, int current_index) { - hsize_t acc = 0; - int overlap = 1; - int i; - int tries = 0; + hsize_t acc = 0; + int overlap = 1; + int i; + int tries = 0; /* Generate up to MAX_TRIES random numbers until one of them */ /* does not overlap with any previous writes */ @@ -147,19 +147,19 @@ randll(hsize_t limit, int current_index) return acc; } - + /*------------------------------------------------------------------------- - * Function: is_sparse + * Function: is_sparse * - * Purpose: Determines if the file system of the current working - * directory supports holes. + * Purpose: Determines if the file system of the current working + * directory supports holes. * - * Return: Success: Non-zero if holes are supported; zero - * otherwise. + * Return: Success: Non-zero if holes are supported; zero + * otherwise. * - * Failure: zero + * Failure: zero * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, July 15, 1998 * * Modifications: @@ -169,8 +169,8 @@ randll(hsize_t limit, int current_index) static int is_sparse(void) { - int fd; - h5_stat_t sb; + int fd; + h5_stat_t sb; if ((fd = HDopen("x.h5", O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) return 0; if (HDlseek(fd, (off_t)(1024*1024), SEEK_SET)!=1024*1024) return 0; @@ -185,19 +185,19 @@ is_sparse(void) #endif } - + /*------------------------------------------------------------------------- - * Function: supports_big + * Function: supports_big * - * Purpose: Determines if the file system of the current working - * directory supports big files. + * Purpose: Determines if the file system of the current working + * directory supports big files. * - * Return: Success: Non-zero if big files are supported; zero - * otherwise. + * Return: Success: Non-zero if big files are supported; zero + * otherwise. * - * Failure: zero + * Failure: zero * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * Wednesday, April 18, 2007 * * Modifications: @@ -207,7 +207,7 @@ is_sparse(void) static fsizes_t supports_big(void) { - int fd = -1; + int fd = -1; fsizes_t fsize = NO_FILE; if((fd=HDopen("y.h5", O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) @@ -256,19 +256,19 @@ error: return fsize; } - + /*------------------------------------------------------------------------- - * Function: enough_room + * Function: enough_room * - * Purpose: Tries to create a bunch of sparse files to see if quotas will - * get in the way. Some systems also have problems opening - * enough files and we'll check that too. + * Purpose: Tries to create a bunch of sparse files to see if quotas will + * get in the way. Some systems also have problems opening + * enough files and we'll check that too. * - * Return: Success: Non-zero + * Return: Success: Non-zero * - * Failure: zero + * Failure: zero * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, August 6, 1998 * * Modifications: @@ -281,14 +281,14 @@ error: * 'name' in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") static int enough_room(hid_t fapl) { - int ret_value=0; - int fd[68]; - size_t i, size = (size_t)1 << 30; - char filename[1024], name[1024]; + int ret_value=0; + int fd[68]; + size_t i, size = (size_t)1 << 30; + char filename[1024], name[1024]; /* Initialize file descriptors */ for (i=0; i<NELMTS(fd); i++) fd[i] = -1; @@ -322,38 +322,38 @@ done: return ret_value; } -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") + - /*------------------------------------------------------------------------- - * Function: writer + * Function: writer * - * Purpose: Creates a *big* dataset. + * Purpose: Creates a *big* dataset. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: >0 + * Failure: >0 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 8, 1998 * * Modifications: - * Robb Matzke, 15 Jul 1998 - * Addresses are written to the file DNAME instead of stdout. + * Robb Matzke, 15 Jul 1998 + * Addresses are written to the file DNAME instead of stdout. * *------------------------------------------------------------------------- */ static int writer (char* filename, hid_t fapl, fsizes_t testsize, int wrt_n) { - hsize_t size1[4] = {8, 1024, 1024, 1024}; - hsize_t size2[1] = {GB8LL}; - hsize_t hs_start[1]; - hsize_t hs_size[1]; - hid_t file=-1, space1=-1, space2=-1, mem_space=-1, d1=-1, d2=-1; - int *buf = (int*)HDmalloc (sizeof(int) * WRT_SIZE); - int i, j; - FILE *out = HDfopen(DNAME, "w"); + hsize_t size1[4] = {8, 1024, 1024, 1024}; + hsize_t size2[1] = {GB8LL}; + hsize_t hs_start[1]; + hsize_t hs_size[1]; + hid_t file=-1, space1=-1, space2=-1, mem_space=-1, d1=-1, d2=-1; + int *buf = (int*)HDmalloc (sizeof(int) * WRT_SIZE); + int i, j; + FILE *out = HDfopen(DNAME, "w"); hid_t dcpl; switch(testsize){ @@ -431,7 +431,7 @@ writer (char* filename, hid_t fapl, fsizes_t testsize, int wrt_n) hs_size[0] = WRT_SIZE; if ((mem_space = H5Screate_simple (1, hs_size, hs_size)) < 0) goto error; for (i=0; i<wrt_n; i++) { - /* start position must be at least hs_size from the end */ + /* start position must be at least hs_size from the end */ hs_start[0] = randll (size2[0]-hs_size[0], i); HDfprintf (out, "#%03d 0x%016Hx\n", i, hs_start[0]); if (H5Sselect_hyperslab (space2, H5S_SELECT_SET, hs_start, NULL, @@ -468,17 +468,17 @@ error: return 1; } - + /*------------------------------------------------------------------------- - * Function: reader + * Function: reader * - * Purpose: Reads some data from random locations in the dataset. + * Purpose: Reads some data from random locations in the dataset. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: >0 + * Failure: >0 * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, April 10, 1998 * * Modifications: @@ -488,13 +488,13 @@ error: static int reader(char *filename, hid_t fapl) { - FILE *script = NULL; - hid_t file = -1, mspace = -1, fspace = -1, d2 = -1; - char ln[128], *s; - hsize_t hs_offset[1]; - hsize_t hs_size[1] = {WRT_SIZE}; - int *buf = (int *)HDmalloc(sizeof(int) * WRT_SIZE); - int i, j, zero, wrong, nerrors = 0; + FILE *script = NULL; + hid_t file = -1, mspace = -1, fspace = -1, d2 = -1; + char ln[128], *s; + hsize_t hs_offset[1]; + hsize_t hs_size[1] = {WRT_SIZE}; + int *buf = (int *)HDmalloc(sizeof(int) * WRT_SIZE); + int i, j, zero, wrong, nerrors = 0; /* Open script file */ script = HDfopen(DNAME, "r"); @@ -566,15 +566,15 @@ error: } - + /*------------------------------------------------------------------------- - * Function: usage + * Function: usage * - * Purpose: Print command usage + * Purpose: Print command usage * - * Return: void + * Return: void * - * Programmer: Albert Chent + * Programmer: Albert Chent * Mar 28, 2002 * * Modifications: @@ -601,8 +601,8 @@ usage(void) static int test_sec2(hid_t fapl) { - char filename[1024]; - fsizes_t testsize; + char filename[1024]; + fsizes_t testsize; testsize = supports_big(); if(testsize == NO_FILE) { @@ -636,8 +636,8 @@ error: static int test_stdio(hid_t fapl) { - char filename[1024]; - fsizes_t testsize; + char filename[1024]; + fsizes_t testsize; testsize = supports_big(); if(testsize == NO_FILE) { @@ -675,7 +675,7 @@ error: static int test_family(hid_t fapl) { - char filename[1024]; + char filename[1024]; /* Test huge file with the family driver */ HDputs("Testing big file with the Family Driver "); @@ -731,24 +731,24 @@ error: return 1; } /* end test_family() */ - + /*------------------------------------------------------------------------- - * Function: main + * Function: main * * Purpose: * - * Return: Success: + * Return: Success: * - * Failure: + * Failure: * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, April 10, 1998 * * Modifications: - * Albert Cheng, 2002/03/28 - * Added command option -fsize. - * Albert Cheng, 2002/04/19 - * Added command option -c. + * Albert Cheng, 2002/03/28 + * Added command option -fsize. + * Albert Cheng, 2002/04/19 + * Added command option -c. * * Raymond Lu, 2007/05/25 * Added similar tests for SEC2 and STDIO drivers. diff --git a/test/cache.c b/test/cache.c index 46d8481..3046915 100644 --- a/test/cache.c +++ b/test/cache.c @@ -3162,8 +3162,8 @@ check_insert_entry(unsigned paged) ( cache_ptr->index_size != 4 * entry_sizes[entry_type] ) || ( ( cache_ptr->slist_enabled ) && ( ( cache_ptr->slist_len != 4 ) || - ( cache_ptr->slist_size != 4 * entry_sizes[entry_type] ) - ) + ( cache_ptr->slist_size != 4 * entry_sizes[entry_type] ) + ) ) || ( cache_ptr->pl_len != 0 ) || ( cache_ptr->pl_size != (size_t)0 ) || @@ -3172,7 +3172,7 @@ check_insert_entry(unsigned paged) ( cache_ptr->LRU_list_len != 2 ) || ( cache_ptr->LRU_list_size != 2 * entry_sizes[entry_type] ) #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - || + || ( cache_ptr->dLRU_list_len != 2 ) || ( cache_ptr->dLRU_list_size != 2 * entry_sizes[entry_type] ) || ( cache_ptr->cLRU_list_len != 0 ) || @@ -3200,14 +3200,14 @@ check_insert_entry(unsigned paged) ( cache_ptr->max_index_size != 4 * entry_sizes[entry_type] ) || ( ( cache_ptr->slist_enabled ) && ( ( cache_ptr->slist_len != 4 ) || - ( cache_ptr->slist_size != 4 * entry_sizes[entry_type] ) - ) + ( cache_ptr->slist_size != 4 * entry_sizes[entry_type] ) + ) ) || ( cache_ptr->max_pl_len != 0 ) || ( cache_ptr->max_pl_size != (size_t)0 ) || ( cache_ptr->max_pel_len != 2 ) || ( cache_ptr->max_pel_size != 2 * entry_sizes[entry_type] ) ) { - + pass = FALSE; failure_mssg = "Unexpected insert results 11."; } @@ -4963,7 +4963,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) * Purpose : Run a multi entry flush cache test. * * Return: void - * + * * Programmer: John Mainzer * 1/13/05 * @@ -4995,7 +4995,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, #if 0 /* JRM */ /* This gets used a lot, so lets leave it in. */ - HDfprintf(stdout, "check_flush_cache__multi_entry_test: test %d\n", + HDfprintf(stdout, "check_flush_cache__multi_entry_test: test %d\n", test_num); #endif /* JRM */ @@ -5028,7 +5028,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, u = 0; while ( pass && ( u < spec_size ) ) { - + if ( ( (unsigned)spec[u].entry_num != u ) || ( spec[u].entry_type < 0 ) || ( spec[u].entry_type >= NUMBER_OF_ENTRY_TYPES ) || @@ -5046,7 +5046,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, u = 0; while ( pass && (u < spec_size) ) { - + if(spec[u].insert_flag) { insert_entry(file_ptr, spec[u].entry_type, spec[u].entry_index, @@ -5164,7 +5164,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, u = 0; while ( pass && ( u < spec_size ) ) { - + base_addr = entries[spec[u].entry_type]; entry_ptr = &(base_addr[spec[u].entry_index]); @@ -9486,7 +9486,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( entry_ptr->at_main_addr != check[i].at_main_addr ) { - HDfprintf(stdout, + HDfprintf(stdout, "(%d,%d) at main addr (expected) = %d (%d).\n", (int)(check[i].entry_type), (int)(check[i].entry_index), @@ -9496,7 +9496,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( entry_ptr->is_dirty != check[i].is_dirty ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->is_dirty (expected) = %d (%d).\n", (int)(entry_ptr->is_dirty), (int)(check[i].is_dirty)); @@ -9504,7 +9504,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( entry_ptr->header.is_dirty != check[i].is_dirty ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->header.is_dirty (expected) = %d (%d).\n", (int)(entry_ptr->header.is_dirty), (int)(check[i].is_dirty)); @@ -9512,7 +9512,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( entry_ptr->is_protected != check[i].is_protected ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->is_protected (expected) = %d (%d).\n", (int)(entry_ptr->is_protected), (int)(check[i].is_protected)); @@ -9520,7 +9520,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( entry_ptr->header.is_protected != check[i].is_protected ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->header.is_protected (expected) = %d (%d).\n", (int)(entry_ptr->is_protected), (int)(check[i].is_protected)); @@ -9528,7 +9528,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( entry_ptr->is_pinned != check[i].is_pinned ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->is_pinned (expected) = %d (%d).\n", (int)(entry_ptr->is_pinned), (int)(check[i].is_pinned)); @@ -9536,7 +9536,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( entry_ptr->header.is_pinned != check[i].is_pinned ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->header.is_pinned (expected) = %d (%d).\n", (int)(entry_ptr->header.is_pinned), (int)(check[i].is_pinned)); @@ -12591,9 +12591,9 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr, test_num); failure_mssg = msg; } - else if ( ( entry_type < 0 ) || + else if ( ( entry_type < 0 ) || ( entry_type >= NUMBER_OF_ENTRY_TYPES ) || - ( entry_idx < 0 ) || + ( entry_idx < 0 ) || ( entry_idx > max_indices[entry_type] ) ) { pass = FALSE; @@ -14292,7 +14292,7 @@ check_pin_protected_entry(unsigned paged) * * Purpose: Verify that H5C_resize_entry() and H5C_unprotect() resize * entries as expected. - * + * * Return: void * * Programmer: John Mainzer @@ -16033,7 +16033,7 @@ check_evictions_enabled(unsigned paged) /*------------------------------------------------------------------------- * Function: check_flush_protected_err() - * + * * Purpose: Verify that an attempt to flush the cache when it contains * a protected entry will generate an error. * @@ -16045,7 +16045,7 @@ check_evictions_enabled(unsigned paged) * Modifications: * * Added code to setup and take down the skip list before - * and after calls to H5C_flush_cache(). + * and after calls to H5C_flush_cache(). * * JRM -- 5/14/20 * @@ -28266,6 +28266,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) /* Set up the expected array. This is used to maintain a table of the * expected status of every entry used in this test. */ + /* clang-format off */ struct expected_entry_status expected[150] = { /* entry entry in at main flush dep flush dep child flush flush flush */ @@ -28421,6 +28422,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) { HUGE_ENTRY_TYPE, 148, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}, { HUGE_ENTRY_TYPE, 149, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE} }; + /* clang-format on */ pass = TRUE; @@ -29100,16 +29102,19 @@ check_flush_deps(unsigned paged) test_entry_t *base_addr; /* Base address of entries for test */ int entry_type = PICO_ENTRY_TYPE; /* Use very small entry size (size of entries doesn't matter) */ unsigned u; /* Local index variable */ + + /* clang-format off */ struct expected_entry_status expected[5] = { - /* entry entry in at main flush dep flush dep child flush flush flush */ - /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */ + /* entry entry in at main flush dep flush dep child flush flush flush */ + /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */ { PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}, { PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}, { PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}, { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}, { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE} }; + /* clang-format on */ if(paged) TESTING("flush dependencies (paged aggregation)") @@ -31048,11 +31053,11 @@ done: * is correct * * Return: 0 on success, non-zero on failure - * + * * Programmer: Quincey Koziol * 3/17/09 * - * Modifications: + * Modifications: * * Added code to setup and take down the skip list before * and after calls to H5C_flush_cache(). Do this via the @@ -31070,6 +31075,8 @@ check_flush_deps_order(unsigned paged) H5C_t * cache_ptr = NULL; /* Metadata cache for this test */ int entry_type = PICO_ENTRY_TYPE; /* Use very small entry size (size of entries doesn't matter) */ unsigned u; /* Local index variable */ + unsigned flush_order; /* Index for tracking flush order */ + /* clang-format off */ struct expected_entry_status expected[5] = { /* entry entry in at main flush dep flush dep child flush flush flush */ @@ -31080,7 +31087,7 @@ check_flush_deps_order(unsigned paged) { PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}, { PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE} }; - unsigned flush_order; /* Index for tracking flush order */ + /* clang-format on */ if(paged) TESTING("flush dependencies flush order (paged aggregation)") @@ -33617,6 +33624,7 @@ check_notify_cb(unsigned paged) test_entry_t * entry_ptr; /* Cache entry to examine/manipulate */ int entry_type = NOTIFY_ENTRY_TYPE; /* Use entry w/notify callback (size of entries doesn't matter) */ unsigned u; /* Local index variable */ + /* clang-format off */ struct expected_entry_status expected[5] = { /* entry entry in at main flush dep flush dep child flush flush flush */ @@ -33627,6 +33635,7 @@ check_notify_cb(unsigned paged) { NOTIFY_ENTRY_TYPE, 3, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}, { NOTIFY_ENTRY_TYPE, 4, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE} }; + /* clang-format on */ if(paged) TESTING("'notify' callback (paged)") @@ -33833,6 +33842,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged) /* Set up the expected array. This is used to maintain a table of the * expected status of every entry used in this test. */ + /* clang-format off */ struct expected_entry_status expected[150] = { /* entry entry in at main flush dep flush dep child flush flush flush */ @@ -33988,6 +33998,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged) { HUGE_ENTRY_TYPE, 148, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}, { HUGE_ENTRY_TYPE, 149, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE} } ; + /* clang-format on */ pass = TRUE; @@ -34663,6 +34674,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr) { H5C_t * cache_ptr = file_ptr->shared->cache; int i; + /* clang-format off */ struct expected_entry_status expected[36] = { /* the expected array is used to maintain a table of the expected status of every @@ -34677,6 +34689,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr) { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE}, { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE} }; + /* clang-format on */ if(pass) { @@ -34805,7 +34818,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr) /* If we are collecting stats, check to see if we get the expected * values. */ - if(pass) + if(pass) if((cache_ptr->insertions[HUGE_ENTRY_TYPE] != 0) || (cache_ptr->pinned_insertions[HUGE_ENTRY_TYPE] != 0) || (cache_ptr->clears[HUGE_ENTRY_TYPE] != 1) || @@ -34892,6 +34905,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr) int i; const int num_huge_entries = 4; const int num_monster_entries = 32; + /* clang-format off */ struct expected_entry_status expected[36] = { /* the expected array is used to maintain a table of the expected status of every @@ -34938,6 +34952,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr) { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE}, { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE}, }; + /* clang-format on */ if(pass) { @@ -35272,6 +35287,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr) H5C_t * cache_ptr = file_ptr->shared->cache; int i; herr_t result; + /* clang-format off */ struct expected_entry_status expected[36] = { /* the expected array is used to maintain a table of the expected status of every @@ -35314,6 +35330,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr) { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE}, { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE}, }; + /* clang-format on */ H5C_auto_size_ctl_t saved_auto_size_ctl; H5C_auto_size_ctl_t test_auto_size_ctl = { @@ -35748,6 +35765,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr) test_entry_t * entry_ptr; test_entry_t * base_addr = NULL; struct H5C_cache_entry_t * scan_ptr; + /* clang-format off */ struct expected_entry_status expected[5] = { /* the expected array is used to maintain a table of the expected status of every @@ -35763,6 +35781,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr) { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}, { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {MONSTER_ENTRY_TYPE,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 1, 0, 0, -1, FALSE}, }; + /* clang-format on */ if(pass) { @@ -35967,7 +35986,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr) H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG, \ "Cache flush invalidate failed after flush op eviction test") - if ( ( pass ) && + if ( ( pass ) && ( ( cache_ptr->index_len != 0 ) || ( cache_ptr->index_size != 0 ) ) ) { @@ -36131,7 +36150,7 @@ check_stats(unsigned paged) * * Modifications: * - * Modified slist stats checks to allow for the case that + * Modified slist stats checks to allow for the case that * the slist is disabled. * * Also added code to setup and take down the skip list before @@ -36453,7 +36472,7 @@ check_stats__smoke_check_1(H5F_t * file_ptr) H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_INVALIDATE_FLAG, \ "Cache flush invalidate failed in check_stats__smoke_check_1()") - if ( ( pass ) && + if ( ( pass ) && ( ( cache_ptr->index_len != 0 ) || ( cache_ptr->index_size != 0 ) ) ) { diff --git a/test/error_test.c b/test/error_test.c index 7c6cf9f..1408c46 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -329,7 +329,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie * 'full_desc' in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") static herr_t test_long_desc(void) { @@ -384,7 +384,7 @@ error: return -1; } /* end test_long_desc() */ -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") /*------------------------------------------------------------------------- diff --git a/test/fheap.c b/test/fheap.c index ed82ce3..8410c0a 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -20,9 +20,9 @@ * This file needs to access private datatypes from the H5HF package. * This file also needs to access the fractal heap testing code. */ -#define H5HF_FRIEND /*suppress error about including H5HFpkg */ +#define H5HF_FRIEND /*suppress error about including H5HFpkg */ #define H5HF_TESTING -#include "H5HFpkg.h" /* Fractal heaps */ +#include "H5HFpkg.h" /* Fractal heaps */ #define H5F_FRIEND /*suppress error about including H5Fpkg */ #define H5F_TESTING @@ -30,9 +30,9 @@ /* Other private headers that this test requires */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5MMprivate.h" /* Memory management */ +#include "H5MMprivate.h" /* Memory management */ #include "H5VLprivate.h" /* Virtual Object Layer */ -#include "H5VMprivate.h" /* Vectors and arrays */ +#include "H5VMprivate.h" /* Vectors and arrays */ /* Max. testfile name length */ #define FHEAP_FILENAME_LEN 1024 @@ -73,12 +73,18 @@ #define HEAP_ID_LEN 7 /* # of bytes to use for heap ID */ #define SMALL_HEAP_ID_LEN 7 /* # of bytes to use for "small" heap's IDs */ #define LARGE_HEAP_ID_LEN 12 /* # of bytes to use for "large" heap's IDs */ -#define HEAP_MAX_ROOT_ROWS(fh) H5HF_get_max_root_rows(fh) /* Max. # of rows in root indirect block */ -#define DTABLE_WIDTH(fh) H5HF_get_dtable_width_test(fh) /* Width of doubling table for heap */ -#define DTABLE_MAX_DROWS(fh) H5HF_get_dtable_max_drows_test(fh) /* Max. # of direct block rows in any indirect block */ -#define IBLOCK_MAX_DROWS(fh, pos) H5HF_get_iblock_max_drows_test(fh, pos) /* Max. # of direct block rows in a indirect block */ -#define DBLOCK_SIZE(fh, r) H5HF_get_dblock_size_test(fh, r) /* Size of a direct block in a given row */ -#define DBLOCK_FREE(fh, r) H5HF_get_dblock_free_test(fh, r) /* Free space in a direct block of a given row */ +/* Max. # of rows in root indirect block */ +#define HEAP_MAX_ROOT_ROWS(fh) H5HF_get_max_root_rows(fh) +/* Width of doubling table for heap */ +#define DTABLE_WIDTH(fh) H5HF_get_dtable_width_test(fh) +/* Max. # of direct block rows in any indirect block */ +#define DTABLE_MAX_DROWS(fh) H5HF_get_dtable_max_drows_test(fh) +/* Max. # of direct block rows in a indirect block */ +#define IBLOCK_MAX_DROWS(fh, pos) H5HF_get_iblock_max_drows_test(fh, pos) +/* Size of a direct block in a given row */ +#define DBLOCK_SIZE(fh, r) H5HF_get_dblock_size_test(fh, r) +/* Free space in a direct block of a given row */ +#define DBLOCK_FREE(fh, r) H5HF_get_dblock_free_test(fh, r) /* The number of settings for testing: page buffering, file space strategy and persisting free-space */ #define NUM_PB_FS 6 @@ -173,18 +179,18 @@ static int check_stats(const H5HF_t *fh, const fheap_heap_state_t *state); static int del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids); - + /*------------------------------------------------------------------------- - * Function: init_small_cparam + * Function: init_small_cparam * - * Purpose: Initialize heap creation parameter structure with small + * Purpose: Initialize heap creation parameter structure with small * settings * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 21, 2006 * *------------------------------------------------------------------------- @@ -210,18 +216,18 @@ init_small_cparam(H5HF_create_t *cparam) return(0); } /* init_small_cparam() */ - + /*------------------------------------------------------------------------- - * Function: init_large_cparam + * Function: init_large_cparam * - * Purpose: Initialize heap creation parameter structure with large + * Purpose: Initialize heap creation parameter structure with large * settings * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 21, 2006 * *------------------------------------------------------------------------- @@ -247,17 +253,17 @@ init_large_cparam(H5HF_create_t *cparam) return(0); } /* init_large_cparam() */ - + /*------------------------------------------------------------------------- - * Function: check_stats + * Function: check_stats * - * Purpose: Verify stats for a heap + * Purpose: Verify stats for a heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 6, 2006 * *------------------------------------------------------------------------- @@ -310,17 +316,17 @@ error: return(1); } /* check_stats() */ - + /*------------------------------------------------------------------------- - * Function: op_memcpy + * Function: op_memcpy * - * Purpose: Perform 'memcpy' for an object + * Purpose: Perform 'memcpy' for an object * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, September 11, 2006 * *------------------------------------------------------------------------- @@ -334,11 +340,11 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data) return(SUCCEED); } /* op_memcpy() */ - + /*------------------------------------------------------------------------- - * Function: add_obj + * Function: add_obj * - * Purpose: Add an object to heap + * Purpose: Add an object to heap * * Note: The following fields in the 'state' structure are set to * the values expected _after_ any block created for the object: @@ -350,11 +356,11 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data) * the current state, before any block has been created: * nobjs * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 10, 2006 * *------------------------------------------------------------------------- @@ -455,17 +461,17 @@ error: return(1); } /* add_obj() */ - + /*------------------------------------------------------------------------- - * Function: get_del_string + * Function: get_del_string * - * Purpose: Return string describing the kind of deletion to perform + * Purpose: Return string describing the kind of deletion to perform * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, June 6, 2006 * *------------------------------------------------------------------------- @@ -492,16 +498,16 @@ get_del_string(const fheap_test_param_t *tparam) return(str); } /* get_del_string() */ - + /*------------------------------------------------------------------------- - * Function: get_fill_size + * Function: get_fill_size * - * Purpose: Retrieve the size of objects to "bulk" fill blocks with + * Purpose: Retrieve the size of objects to "bulk" fill blocks with * - * Return: Size of object to pass down to "fill_heap" routine on + * Return: Size of object to pass down to "fill_heap" routine on * success/can't fail * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, July 27, 2006 * *------------------------------------------------------------------------- @@ -524,17 +530,17 @@ get_fill_size(const fheap_test_param_t *tparam) return(0); } /* get_fill_size() */ - + /*------------------------------------------------------------------------- - * Function: begin_test + * Function: begin_test * - * Purpose: Perform common "test being" operations + * Purpose: Perform common "test being" operations * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, August 4, 2006 * *------------------------------------------------------------------------- @@ -545,7 +551,7 @@ get_fill_size(const fheap_test_param_t *tparam) * test_desc in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") static int begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t *keep_ids, size_t *fill_size) @@ -574,18 +580,18 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, /* Success */ return(0); } /* end begin_test() */ -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") + - /*------------------------------------------------------------------------- - * Function: reopen_file + * Function: reopen_file * - * Purpose: Perform common "re-open" operations on file & heap for testing + * Purpose: Perform common "re-open" operations on file & heap for testing * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, August 18, 2006 * *------------------------------------------------------------------------- @@ -632,17 +638,17 @@ error: return(-1); } /* end reopen_file() */ - + /*------------------------------------------------------------------------- - * Function: open_heap + * Function: open_heap * - * Purpose: Perform common "open" operations on file & heap for testing + * Purpose: Perform common "open" operations on file & heap for testing * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, August 4, 2006 * *------------------------------------------------------------------------- @@ -744,17 +750,17 @@ error: return(-1); } /* end open_heap() */ - + /*------------------------------------------------------------------------- - * Function: reopen_heap + * Function: reopen_heap * - * Purpose: Perform common "re-open" operations on heap for testing + * Purpose: Perform common "re-open" operations on heap for testing * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, August 4, 2006 * *------------------------------------------------------------------------- @@ -782,16 +788,16 @@ error: return -1; } /* end reopen_heap() */ - + /*------------------------------------------------------------------------- - * Function: close_heap + * Function: close_heap * - * Purpose: Perform common "close" operations on file & heap for testing + * Purpose: Perform common "close" operations on file & heap for testing * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, August 4, 2006 * *------------------------------------------------------------------------- @@ -850,17 +856,17 @@ error: return(-1); } /* end close_heap() */ - + /*------------------------------------------------------------------------- - * Function: del_objs_half_refill + * Function: del_objs_half_refill * - * Purpose: Remove half of objects from heap and refill + * Purpose: Remove half of objects from heap and refill * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, June 6, 2006 * *------------------------------------------------------------------------- @@ -944,17 +950,17 @@ error: return(1); } /* del_objs_half_refill() */ - + /*------------------------------------------------------------------------- - * Function: del_objs + * Function: del_objs * - * Purpose: Remove objects from heap + * Purpose: Remove objects from heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, June 6, 2006 * *------------------------------------------------------------------------- @@ -1026,11 +1032,11 @@ error: return(1); } /* del_objs() */ - + /*------------------------------------------------------------------------- - * Function: fill_heap + * Function: fill_heap * - * Purpose: Insert (small) objects to fill up the free space in a heap block + * Purpose: Insert (small) objects to fill up the free space in a heap block * * Note: The following fields in the 'state' structure are set to * the values expected _after_ the block has been created: @@ -1042,11 +1048,11 @@ error: * the current state, before the block has been created: * nobjs * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 7, 2006 * *------------------------------------------------------------------------- @@ -1228,17 +1234,17 @@ error: return(1); } /* fill_heap() */ - + /*------------------------------------------------------------------------- - * Function: fill_root_row + * Function: fill_root_row * - * Purpose: Fill up a row of direct blocks in the root indirect block + * Purpose: Fill up a row of direct blocks in the root indirect block * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 10, 2006 * *------------------------------------------------------------------------- @@ -1325,17 +1331,17 @@ error: return(1); } /* fill_root_row() */ - + /*------------------------------------------------------------------------- - * Function: fill_partial row + * Function: fill_partial row * - * Purpose: Fill up part of a row of direct blocks in an non-root indirect block + * Purpose: Fill up part of a row of direct blocks in an non-root indirect block * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 11, 2006 * *------------------------------------------------------------------------- @@ -1371,17 +1377,17 @@ error: return(1); } /* fill_partial_row() */ - + /*------------------------------------------------------------------------- - * Function: fill_row + * Function: fill_row * - * Purpose: Fill up entire row of direct blocks in an non-root indirect block + * Purpose: Fill up entire row of direct blocks in an non-root indirect block * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 10, 2006 * *------------------------------------------------------------------------- @@ -1405,20 +1411,20 @@ error: return(1); } /* fill_row() */ - + /*------------------------------------------------------------------------- - * Function: fill_root_direct + * Function: fill_root_direct * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in the root indirect block * (Generally used to create & fill up direct blocks in a new * indirect block) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 3, 2006 * *------------------------------------------------------------------------- @@ -1446,19 +1452,19 @@ error: return(1); } /* fill_root_direct() */ - + /*------------------------------------------------------------------------- - * Function: fill_2nd_indirect + * Function: fill_2nd_indirect * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in a second-level indirect block (which only has * direct blocks) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 10, 2006 * *------------------------------------------------------------------------- @@ -1486,18 +1492,18 @@ error: return(1); } /* fill_2nd_direct() */ - + /*------------------------------------------------------------------------- - * Function: fill_all_direct + * Function: fill_all_direct * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks up to the maximum direct block size * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 10, 2006 * *------------------------------------------------------------------------- @@ -1525,19 +1531,19 @@ error: return(1); } /* fill_all_direct() */ - + /*------------------------------------------------------------------------- - * Function: fill_2nd_indirect_row + * Function: fill_2nd_indirect_row * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in a row of second-level indirect block (which only * have direct blocks) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 10, 2006 * *------------------------------------------------------------------------- @@ -1564,19 +1570,19 @@ error: return(1); } /* fill_2nd_direct_row() */ - + /*------------------------------------------------------------------------- - * Function: fill_all_2nd_indirect_rows + * Function: fill_all_2nd_indirect_rows * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in all rows of second-level indirect blocks (which only * have direct blocks) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 10, 2006 * *------------------------------------------------------------------------- @@ -1603,19 +1609,19 @@ error: return(1); } /* fill_2nd_direct_row() */ - + /*------------------------------------------------------------------------- - * Function: fill_3rd_indirect + * Function: fill_3rd_indirect * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in a third-level indirect block (which * has one more level of indirect blocks) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 18, 2006 * *------------------------------------------------------------------------- @@ -1642,19 +1648,19 @@ error: return(1); } /* fill_3rd_indirect() */ - + /*------------------------------------------------------------------------- - * Function: fill_3rd_indirect_row + * Function: fill_3rd_indirect_row * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in a row of third-level indirect block (which * have one more level of indirect blocks) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 10, 2006 * *------------------------------------------------------------------------- @@ -1682,19 +1688,19 @@ error: return(1); } /* fill_3rd_direct_row() */ - + /*------------------------------------------------------------------------- - * Function: fill_all_3rd_indirect_rows + * Function: fill_all_3rd_indirect_rows * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in all rows of third-level indirect blocks (which * have one more level of indirect blocks) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 10, 2006 * *------------------------------------------------------------------------- @@ -1722,19 +1728,19 @@ error: return(1); } /* fill_all_3rd_direct_rows() */ - + /*------------------------------------------------------------------------- - * Function: fill_4th_indirect_row + * Function: fill_4th_indirect_row * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in a row of fourth-level indirect blocks (which * have two more levels of indirect blocks) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 10, 2006 * *------------------------------------------------------------------------- @@ -1772,19 +1778,19 @@ error: return(1); } /* fill_4th_direct_row() */ - + /*------------------------------------------------------------------------- - * Function: fill_all_4th_indirect_rows + * Function: fill_all_4th_indirect_rows * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in all rows of fourth-level indirect blocks (which * have two more levels of indirect blocks) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 10, 2006 * *------------------------------------------------------------------------- @@ -1830,16 +1836,16 @@ error: return(1); } /* fill_all_4th_direct_rows() */ - + /*------------------------------------------------------------------------- - * Function: test_create + * Function: test_create * - * Purpose: Create fractal heap + * Purpose: Create fractal heap * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, February 24, 2006 * *------------------------------------------------------------------------- @@ -1847,9 +1853,9 @@ error: static unsigned test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_create_t test_cparam; /* Creation parameters for heap */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Heap address in file */ @@ -1948,16 +1954,16 @@ error: return 1; } /* test_create() */ - + /*------------------------------------------------------------------------- - * Function: test_reopen + * Function: test_reopen * - * Purpose: Create & reopen a fractal heap + * Purpose: Create & reopen a fractal heap * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 18, 2006 * *------------------------------------------------------------------------- @@ -1965,9 +1971,9 @@ error: static unsigned test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_create_t test_cparam; /* Creation parameters for heap */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ @@ -2100,16 +2106,16 @@ error: return(1); } /* test_reopen() */ - + /*------------------------------------------------------------------------- - * Function: test_open_twice + * Function: test_open_twice * - * Purpose: Open a fractal heap twice + * Purpose: Open a fractal heap twice * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, August 18, 2006 * *------------------------------------------------------------------------- @@ -2117,11 +2123,11 @@ error: static unsigned test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - hid_t file2 = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ - H5F_t *f2 = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + hid_t file2 = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ + H5F_t *f2 = NULL; /* Internal file object pointer */ H5HF_create_t test_cparam; /* Creation parameters for heap */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ H5HF_t *fh2 = NULL; /* 2nd fractal heap wrapper */ @@ -2277,16 +2283,16 @@ error: return 1; } /* test_open_twice() */ - + /*------------------------------------------------------------------------- - * Function: test_delete_open + * Function: test_delete_open * - * Purpose: Delete opened fractal heap (& open deleted heap) + * Purpose: Delete opened fractal heap (& open deleted heap) * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, January 5, 2007 * *------------------------------------------------------------------------- @@ -2294,9 +2300,9 @@ error: static unsigned test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_create_t test_cparam; /* Creation parameters for heap */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ H5HF_t *fh2 = NULL; /* 2nd fractal heap wrapper */ @@ -2450,16 +2456,16 @@ error: return 1; } /* test_delete_open() */ - + /*------------------------------------------------------------------------- - * Function: test_id_limits + * Function: test_id_limits * - * Purpose: Test limits for heap ID lengths + * Purpose: Test limits for heap ID lengths * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, August 14, 2006 * *------------------------------------------------------------------------- @@ -2467,9 +2473,9 @@ error: static unsigned test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ H5HF_create_t tmp_cparam; /* Local heap creation parameters */ unsigned deflate_level; /* Deflation level */ @@ -2794,16 +2800,16 @@ error: return 1; } /* test_id_limits() */ - + /*------------------------------------------------------------------------- - * Function: test_filtered_create + * Function: test_filtered_create * - * Purpose: Test creating a heap with I/O filters + * Purpose: Test creating a heap with I/O filters * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, August 14, 2006 * *------------------------------------------------------------------------- @@ -2811,9 +2817,9 @@ error: static unsigned test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ H5HF_create_t tmp_cparam; /* Local heap creation parameters */ @@ -2917,16 +2923,16 @@ error: return 1; } /* test_filtered_create() */ - + /*------------------------------------------------------------------------- - * Function: test_size + * Function: test_size * - * Purpose: Test querying heap size + * Purpose: Test querying heap size * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, August 14, 2007 * *------------------------------------------------------------------------- @@ -2934,9 +2940,9 @@ error: static unsigned test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ hsize_t empty_heap_size; /* Total size of empty heap on disk */ @@ -3057,7 +3063,7 @@ error: return 1; } /* test_size() */ - + /*------------------------------------------------------------------------- * Function: test_reopen_hdr * @@ -3195,16 +3201,16 @@ error: return(1); } /* test_reopen_hdr() */ - + /*------------------------------------------------------------------------- - * Function: test_man_insert_weird + * Function: test_man_insert_weird * - * Purpose: Test inserting "weird" sized objects into absolute heap + * Purpose: Test inserting "weird" sized objects into absolute heap * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, August 18, 2006 * *------------------------------------------------------------------------- @@ -3212,9 +3218,9 @@ error: static unsigned test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */ @@ -3299,23 +3305,23 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_insert_weird() */ #ifdef ALL_INSERT_TESTS - + /*------------------------------------------------------------------------- - * Function: test_man_insert_first + * Function: test_man_insert_first * - * Purpose: Test inserting first object into absolute heap + * Purpose: Test inserting first object into absolute heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, February 24, 2006 * *------------------------------------------------------------------------- @@ -3323,9 +3329,9 @@ error: static unsigned test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -3400,22 +3406,22 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_insert_first() */ - + /*------------------------------------------------------------------------- - * Function: test_man_insert_second + * Function: test_man_insert_second * - * Purpose: Test inserting two objects into absolute heap + * Purpose: Test inserting two objects into absolute heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 6, 2006 * *------------------------------------------------------------------------- @@ -3423,9 +3429,9 @@ error: static unsigned test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -3494,23 +3500,23 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_insert_second() */ - + /*------------------------------------------------------------------------- - * Function: test_man_insert_root_mult + * Function: test_man_insert_root_mult * - * Purpose: Test inserting mult. objects into absolute heap, up to the + * Purpose: Test inserting mult. objects into absolute heap, up to the * limit of a root direct block * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 6, 2006 * *------------------------------------------------------------------------- @@ -3518,9 +3524,9 @@ error: static unsigned test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -3591,24 +3597,24 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_insert_root_mult() */ - + /*------------------------------------------------------------------------- - * Function: test_man_insert_force_indirect + * Function: test_man_insert_force_indirect * - * Purpose: Test inserting mult. objects into absolute heap, filling the + * Purpose: Test inserting mult. objects into absolute heap, filling the * root direct block and forcing the root block to be converted * into an indirect block * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 6, 2006 * *------------------------------------------------------------------------- @@ -3616,9 +3622,9 @@ error: static unsigned test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -3696,24 +3702,24 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_insert_force_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_insert_fill_second + * Function: test_man_insert_fill_second * - * Purpose: Test inserting mult. objects into absolute heap, filling the + * Purpose: Test inserting mult. objects into absolute heap, filling the * root direct block, forcing the root block to be converted * into an indirect block and filling the secnod indirect block * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 7, 2006 * *------------------------------------------------------------------------- @@ -3721,9 +3727,9 @@ error: static unsigned test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -3801,25 +3807,25 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_insert_fill_second() */ - + /*------------------------------------------------------------------------- - * Function: test_man_insert_third_direct + * Function: test_man_insert_third_direct * - * Purpose: Test inserting mult. objects into absolute heap, filling the + * Purpose: Test inserting mult. objects into absolute heap, filling the * root direct block, forcing the root block to be converted * into an indirect block, filling the secnod indirect block and * creating a third direct block * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 7, 2006 * *------------------------------------------------------------------------- @@ -3827,9 +3833,9 @@ error: static unsigned test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -3912,24 +3918,24 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_insert_third_direct() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_first_row + * Function: test_man_fill_first_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill first row of root indirect * block. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 13, 2006 * *------------------------------------------------------------------------- @@ -3937,9 +3943,9 @@ error: static unsigned test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -4007,24 +4013,24 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_first_row() */ - + /*------------------------------------------------------------------------- - * Function: test_man_start_second_row + * Function: test_man_start_second_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill first row of root indirect * block, then add another object to start second row. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 14, 2006 * *------------------------------------------------------------------------- @@ -4032,9 +4038,9 @@ error: static unsigned test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -4109,24 +4115,24 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_start_second_row() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_second_row + * Function: test_man_fill_second_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill first row of root indirect * block, then fill the second row also. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 14, 2006 * *------------------------------------------------------------------------- @@ -4134,9 +4140,9 @@ error: static unsigned test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -4208,25 +4214,25 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_second_row() */ - + /*------------------------------------------------------------------------- - * Function: test_man_start_third_row + * Function: test_man_start_third_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill first row of root indirect * block, fill the second row also, then add another object to * start the third row. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 20, 2006 * *------------------------------------------------------------------------- @@ -4234,9 +4240,9 @@ error: static unsigned test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -4318,24 +4324,24 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_start_third_row() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_fourth_row + * Function: test_man_fill_fourth_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill first four rows of root indirect * block. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 20, 2006 * *------------------------------------------------------------------------- @@ -4343,9 +4349,9 @@ error: static unsigned test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -4415,24 +4421,24 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_fourth_row() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_all_root_direct + * Function: test_man_fill_all_root_direct * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 20, 2006 * *------------------------------------------------------------------------- @@ -4440,9 +4446,9 @@ error: static unsigned test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -4510,24 +4516,24 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_all_root_direct() */ - + /*------------------------------------------------------------------------- - * Function: test_man_first_recursive_indirect + * Function: test_man_first_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block and create first recursive indirect block. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 20, 2006 * *------------------------------------------------------------------------- @@ -4535,9 +4541,9 @@ error: static unsigned test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -4610,25 +4616,25 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_first_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_second_direct_recursive_indirect + * Function: test_man_second_direct_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, create first recursive indirect block and start second * direct block in that indirect block. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 21, 2006 * *------------------------------------------------------------------------- @@ -4636,9 +4642,9 @@ error: static unsigned test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -4719,25 +4725,25 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_second_direct_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_first_recursive_indirect + * Function: test_man_fill_first_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, create first recursive indirect block and filling all * direct blocks in that indirect block. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 21, 2006 * *------------------------------------------------------------------------- @@ -4745,9 +4751,9 @@ error: static unsigned test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -4820,26 +4826,26 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_first_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_second_recursive_indirect + * Function: test_man_second_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, create first recursive indirect block, filling all * direct blocks in that indirect block and adding another * object to force creation of second recursive indirect block. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 21, 2006 * *------------------------------------------------------------------------- @@ -4847,9 +4853,9 @@ error: static unsigned test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -4929,27 +4935,27 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_second_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_second_recursive_indirect + * Function: test_man_fill_second_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, create first recursive indirect block, filling all * direct blocks in that indirect block and then create second * recursive indirect block and fill all direct blocks in that * indirect block. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 21, 2006 * *------------------------------------------------------------------------- @@ -4957,9 +4963,9 @@ error: static unsigned test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -5036,27 +5042,27 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_second_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_recursive_indirect_row + * Function: test_man_fill_recursive_indirect_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, create first recursive indirect block, filling all * direct blocks in that indirect block and then create second * recursive indirect block and fill all direct blocks in that * indirect block. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 21, 2006 * *------------------------------------------------------------------------- @@ -5064,9 +5070,9 @@ error: static unsigned test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -5135,25 +5141,25 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_recursive_indirect_row() */ - + /*------------------------------------------------------------------------- - * Function: test_man_start_2nd_recursive_indirect + * Function: test_man_start_2nd_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the first row of indirect * blocks and start on first block in second row of indirect blocks * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -5161,9 +5167,9 @@ error: static unsigned test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -5243,25 +5249,25 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_start_2nd_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_recursive_indirect_two_deep + * Function: test_man_recursive_indirect_two_deep * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -5269,9 +5275,9 @@ error: static unsigned test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -5344,26 +5350,26 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_recursive_indirect_two_deep() */ - + /*------------------------------------------------------------------------- - * Function: test_man_start_3rd_recursive_indirect + * Function: test_man_start_3rd_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep and start first direct block * in 3rd level of indirect blocks * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -5371,9 +5377,9 @@ error: static unsigned test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -5453,26 +5459,26 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_start_3rd_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_first_3rd_recursive_indirect + * Function: test_man_fill_first_3rd_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep and fill first indirect block * in 3rd level of indirect blocks * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -5480,9 +5486,9 @@ error: static unsigned test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -5563,26 +5569,26 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_first_3rd_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_3rd_recursive_indirect_row + * Function: test_man_fill_3rd_recursive_indirect_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep and fill all indirect blocks * first row of 3rd level of indirect blocks * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -5590,9 +5596,9 @@ error: static unsigned test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -5669,26 +5675,26 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_3rd_recursive_indirect_row() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_all_3rd_recursive_indirect + * Function: test_man_fill_all_3rd_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep and fill all indirect blocks * that are three levels deep * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -5696,9 +5702,9 @@ error: static unsigned test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -5775,27 +5781,27 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_all_3rd_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_start_4th_recursive_indirect + * Function: test_man_start_4th_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep, fill all indirect blocks * that are three levels deep and start first direct block that * is four levels deep * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -5803,9 +5809,9 @@ error: static unsigned test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -5889,27 +5895,27 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_start_4th_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_first_4th_recursive_indirect + * Function: test_man_fill_first_4th_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep, fill all indirect blocks * that are three levels deep and fill the first (3rd level) * indirect block that is four levels deep * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -5917,9 +5923,9 @@ error: static unsigned test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -6008,27 +6014,27 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_first_4th_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_4th_recursive_indirect_row + * Function: test_man_fill_4th_recursive_indirect_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep, fill all indirect blocks * that are three levels deep and fill the first row of * indirect block that is four levels deep * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -6036,9 +6042,9 @@ error: static unsigned test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -6119,27 +6125,27 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_4th_recursive_indirect_row() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_all_4th_recursive_indirect + * Function: test_man_fill_all_4th_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep, fill all indirect blocks * that are three levels deep and fill all rows of * indirect blocks that are four levels deep * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -6147,9 +6153,9 @@ error: static unsigned test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -6230,17 +6236,17 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_all_4th_recursive_indirect() */ #endif /* ALL_INSERT_TESTS */ - + /*------------------------------------------------------------------------- - * Function: test_man_start_5th_recursive_indirect + * Function: test_man_start_5th_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep, fill all indirect blocks @@ -6248,11 +6254,11 @@ error: * that are four levels deep and start first direct block in * indirect blocks five levels deep * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -6260,9 +6266,9 @@ error: static unsigned test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -6363,22 +6369,22 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_start_5th_recursive_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_bogus + * Function: test_man_remove_bogus * - * Purpose: Test removing bogus heap IDs + * Purpose: Test removing bogus heap IDs * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, May 15, 2006 * *------------------------------------------------------------------------- @@ -6386,9 +6392,9 @@ error: static unsigned test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */ @@ -6516,22 +6522,22 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_bogus() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_one + * Function: test_man_remove_one * - * Purpose: Test removing single object from heap + * Purpose: Test removing single object from heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, May 15, 2006 * *------------------------------------------------------------------------- @@ -6539,9 +6545,9 @@ error: static unsigned test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */ @@ -6679,22 +6685,22 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_one() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_two + * Function: test_man_remove_two * - * Purpose: Test removing two objects from heap + * Purpose: Test removing two objects from heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, May 22, 2006 * *------------------------------------------------------------------------- @@ -6702,9 +6708,9 @@ error: static unsigned test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ unsigned char heap_id1[HEAP_ID_LEN]; /* Heap ID for first object */ @@ -6871,23 +6877,23 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_two() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_one_larger + * Function: test_man_remove_one_larger * - * Purpose: Test removing single larger (but < standalone size) object + * Purpose: Test removing single larger (but < standalone size) object * from heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, June 6, 2006 * *------------------------------------------------------------------------- @@ -6895,9 +6901,9 @@ error: static unsigned test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */ @@ -7039,23 +7045,23 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_one_larger() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_two_larger + * Function: test_man_remove_two_larger * - * Purpose: Test removing two larger (but < standalone size) objects + * Purpose: Test removing two larger (but < standalone size) objects * from heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, June 10, 2006 * *------------------------------------------------------------------------- @@ -7063,9 +7069,9 @@ error: static unsigned test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ unsigned char heap_id1[HEAP_ID_LEN]; /* Heap ID for first object */ @@ -7278,23 +7284,23 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_two_larger() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_three_larger + * Function: test_man_remove_three_larger * - * Purpose: Test removing three larger (but < standalone size) objects + * Purpose: Test removing three larger (but < standalone size) objects * from heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, June 12, 2006 * *------------------------------------------------------------------------- @@ -7302,9 +7308,9 @@ error: static unsigned test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ unsigned char heap_id1[HEAP_ID_LEN]; /* Heap ID for first object */ @@ -7577,21 +7583,21 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_three_larger() */ - + /*------------------------------------------------------------------------- - * Function: test_man_incr_insert_remove + * Function: test_man_incr_insert_remove * - * Purpose: Test incremental insert & removal of objects in heap + * Purpose: Test incremental insert & removal of objects in heap * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Sunday, April 1, 2012 * *------------------------------------------------------------------------- @@ -7599,9 +7605,9 @@ error: static unsigned test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ unsigned char **heap_id = NULL; @@ -7700,7 +7706,7 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; HDfree(heap_id); @@ -7709,18 +7715,18 @@ error: return 1; } /* test_man_incr_insert_remove() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_root_direct + * Function: test_man_remove_root_direct * - * Purpose: Test filling and removing all objects from root direct block in + * Purpose: Test filling and removing all objects from root direct block in * heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, May 22, 2006 * *------------------------------------------------------------------------- @@ -7728,16 +7734,17 @@ error: static unsigned test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "removing all objects from root direct block of absolute heap %s"; /* Test description */ + /* Test description */ + const char *base_desc = "removing all objects from root direct block of absolute heap %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -7777,23 +7784,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_root_direct() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_two_direct + * Function: test_man_remove_two_direct * - * Purpose: Test filling and removing all objects from (first) two direct + * Purpose: Test filling and removing all objects from (first) two direct * blocks in heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, May 22, 2006 * *------------------------------------------------------------------------- @@ -7801,16 +7808,17 @@ error: static unsigned test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "removing all objects from two direct blocks of absolute heap %s"; /* Test description */ + /* Test description */ + const char *base_desc = "removing all objects from two direct blocks of absolute heap %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -7865,23 +7873,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_two_direct() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_first_row + * Function: test_man_remove_first_row * - * Purpose: Test filling and removing all objects from first row of direct + * Purpose: Test filling and removing all objects from first row of direct * blocks in heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, June 5, 2006 * *------------------------------------------------------------------------- @@ -7889,16 +7897,17 @@ error: static unsigned test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "removing all objects from first row of direct blocks of absolute heap %s"; /* Test description */ + /* Test description */ + const char *base_desc = "removing all objects from first row of direct blocks of absolute heap %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -7935,23 +7944,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_first_row() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_first_two_rows + * Function: test_man_remove_first_two_rows * - * Purpose: Test filling and removing all objects from first two rows of + * Purpose: Test filling and removing all objects from first two rows of * direct blocks in heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, June 12, 2006 * *------------------------------------------------------------------------- @@ -7959,16 +7968,17 @@ error: static unsigned test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "removing all objects from first two rows of direct blocks of absolute heap %s"; /* Test description */ + /* Test description */ + const char *base_desc = "removing all objects from first two rows of direct blocks of absolute heap %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8007,23 +8017,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_first_two_rows() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_first_four_rows + * Function: test_man_remove_first_four_rows * - * Purpose: Test filling and removing all objects from first four rows of + * Purpose: Test filling and removing all objects from first four rows of * direct blocks in heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, June 13, 2006 * *------------------------------------------------------------------------- @@ -8031,16 +8041,17 @@ error: static unsigned test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "removing all objects from first four rows of direct blocks of absolute heap %s"; /* Test description */ + /* Test description */ + const char *base_desc = "removing all objects from first four rows of direct blocks of absolute heap %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8083,23 +8094,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_first_four_rows() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_all_root_direct + * Function: test_man_remove_all_root_direct * - * Purpose: Test filling and removing all objects from all direct blocks + * Purpose: Test filling and removing all objects from all direct blocks * in root indirect block of heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, June 13, 2006 * *------------------------------------------------------------------------- @@ -8107,16 +8118,17 @@ error: static unsigned test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "removing all objects from all direct blocks of root group in absolute heap %s"; /* Test description */ + /* Test description */ + const char *base_desc = "removing all objects from all direct blocks of root group in absolute heap %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8153,23 +8165,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_all_root_direct() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_2nd_indirect + * Function: test_man_remove_2nd_indirect * - * Purpose: Test filling and removing all objects up to 2nd level indirect + * Purpose: Test filling and removing all objects up to 2nd level indirect * blocks of heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, June 13, 2006 * *------------------------------------------------------------------------- @@ -8177,16 +8189,17 @@ error: static unsigned test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "removing all objects from 2nd level indirect blocks of absolute heap %s"; /* Test description */ + /* Test description */ + const char *base_desc = "removing all objects from 2nd level indirect blocks of absolute heap %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8227,23 +8240,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_2nd_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_remove_3rd_indirect + * Function: test_man_remove_3rd_indirect * - * Purpose: Test filling and removing all objects up to 3rd level indirect + * Purpose: Test filling and removing all objects up to 3rd level indirect * blocks of heap * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, July 24, 2006 * *------------------------------------------------------------------------- @@ -8251,16 +8264,17 @@ error: static unsigned test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "removing all objects from 3rd level indirect blocks of absolute heap %s"; /* Test description */ + /* Test description */ + const char *base_desc = "removing all objects from 3rd level indirect blocks of absolute heap %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8305,26 +8319,26 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_remove_3rd_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_man_skip_start_block + * Function: test_man_skip_start_block * - * Purpose: Test inserting object into absolute heap which is too large + * Purpose: Test inserting object into absolute heap which is too large * for starting block size, which forces root indirect block * creation * * Then, remove all the objects, in various ways * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, March 27, 2006 * *------------------------------------------------------------------------- @@ -8332,16 +8346,17 @@ error: static unsigned test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "inserting object that is too large for starting block, then remove all objects %s"; /* Test description */ + /* Test description */ + const char *base_desc = "inserting object that is too large for starting block, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -8384,24 +8399,24 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_skip_start_block() */ - + /*------------------------------------------------------------------------- - * Function: test_man_skip_start_block_add_back + * Function: test_man_skip_start_block_add_back * - * Purpose: Test inserting object into absolute heap which is too large + * Purpose: Test inserting object into absolute heap which is too large * for starting block size, which forces root indirect block * creation, then add object which fits in skipped direct block * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 28, 2006 * *------------------------------------------------------------------------- @@ -8409,16 +8424,17 @@ error: static unsigned test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "skipping starting block, then adding object back to first block, then remove all objects %s"; /* Test description */ + /* Test description */ + const char *base_desc = "skipping starting block, then adding object back to first block, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -8481,25 +8497,25 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_skip_start_block_add_back() */ - + /*------------------------------------------------------------------------- - * Function: test_man_skip_start_block_add_skipped + * Function: test_man_skip_start_block_add_skipped * - * Purpose: Test inserting object into absolute heap which is too large + * Purpose: Test inserting object into absolute heap which is too large * for starting block size, which forces root indirect block * creation, then add objects to fill skipped direct blocks * and add another object to start on next "normal" block * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, March 28, 2006 * *------------------------------------------------------------------------- @@ -8507,9 +8523,9 @@ error: static unsigned test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -8517,7 +8533,8 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "skipping starting block, then adding objects to backfill and extend, then remove all objects %s"; /* Test description */ + /* Test description */ + const char *base_desc = "skipping starting block, then adding objects to backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8590,25 +8607,25 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_skip_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_skip_2nd_block + * Function: test_man_skip_2nd_block * - * Purpose: Test inserting object into absolute heap which is small + * Purpose: Test inserting object into absolute heap which is small * enough for starting block size, then add object too large * for any blocks in first row of direct blocks, to force * early creation of indirect block (and range of skipped blocks) * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, April 1, 2006 * *------------------------------------------------------------------------- @@ -8616,16 +8633,17 @@ error: static unsigned test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "insert object to initial block, then add object too large for starting direct blocks, then remove all objects %s"; /* Test description */ + /* Test description */ + const char *base_desc = "insert object to initial block, then add object too large for starting direct blocks, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -8683,16 +8701,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_skip_2nd_block() */ - + /*------------------------------------------------------------------------- - * Function: test_man_skip_2nd_block_add_skipped + * Function: test_man_skip_2nd_block_add_skipped * - * Purpose: Test inserting object into absolute heap which is small + * Purpose: Test inserting object into absolute heap which is small * enough for starting block size, then add object too large * for any blocks in first row of direct blocks, to force * early creation of indirect block (and range of skipped blocks). @@ -8700,11 +8718,11 @@ error: * block and all the skipped blocks, and one more object (to * start next "normal" block). * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, April 1, 2006 * *------------------------------------------------------------------------- @@ -8712,9 +8730,9 @@ error: static unsigned test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -8722,8 +8740,9 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "insert object to initial block, then add object too large for starting direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned v; /* Local index variables */ + /* Test description */ + const char *base_desc = "insert object to initial block, then add object too large for starting direct blocks, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8825,16 +8844,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_skip_2nd_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_one_partial_skip_2nd_block_add_skipped + * Function: test_man_fill_one_partial_skip_2nd_block_add_skipped * - * Purpose: Test filling initial direct block, then add object small enough + * Purpose: Test filling initial direct block, then add object small enough * for initial block size (to create root indirect block), then * add object too large for any blocks in first three rows of * direct blocks, to force extension of indirect block (and range @@ -8844,11 +8863,11 @@ error: * block and all the skipped blocks, and one more object (to * start next "normal" block). * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 3, 2006 * *------------------------------------------------------------------------- @@ -8856,9 +8875,9 @@ error: static unsigned test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -8866,8 +8885,9 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t * size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "skipping blocks with indirect root, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u; /* Local index variable */ + /* Test description */ + const char *base_desc = "skipping blocks with indirect root, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -8991,16 +9011,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_one_partial_skip_2nd_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_row_skip_add_skipped + * Function: test_man_fill_row_skip_add_skipped * - * Purpose: Test filling first row of direct blocks, then + * Purpose: Test filling first row of direct blocks, then * add object too large for any blocks in first three rows of * direct blocks, to force extension of indirect block (and range * of skipped blocks). @@ -9009,11 +9029,11 @@ error: * block and all the skipped blocks, and one more object (to * start next "normal" block). * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, May 15, 2006 * *------------------------------------------------------------------------- @@ -9021,9 +9041,9 @@ error: static unsigned test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -9031,7 +9051,8 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling first row, then skipping rows, then backfill and extend, then remove all objects %s"; /* Test description */ + /* Test description */ + const char *base_desc = "filling first row, then skipping rows, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9120,26 +9141,26 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_row_skip_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_skip_direct_skip_indirect_two_rows_add_skipped + * Function: test_man_skip_direct_skip_indirect_two_rows_add_skipped * - * Purpose: Test adding object too large for all but the last row in the + * Purpose: Test adding object too large for all but the last row in the * direct blocks in root indirect block, then * add object too large for initial block in first two rows of * indirect blocks, to force extension of non-root * indirect block (and range of skipped blocks). * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, April 15, 2006 * *------------------------------------------------------------------------- @@ -9147,9 +9168,9 @@ error: static unsigned test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -9158,8 +9179,9 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "skipping direct blocks to last row and skipping two rows of root indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned v; /* Local index variables */ + /* Test description */ + const char *base_desc = "skipping direct blocks to last row and skipping two rows of root indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -9247,25 +9269,25 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_skip_direct_skip_indirect_two_rows_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_direct_skip_indirect_start_block_add_skipped + * Function: test_man_fill_direct_skip_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * add object too large for initial block in first row of direct * blocks in indirect block, to force extension of non-root * indirect block (and range of skipped blocks). * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 3, 2006 * *------------------------------------------------------------------------- @@ -9273,9 +9295,9 @@ error: static unsigned test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -9283,7 +9305,8 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks and skipping blocks in non-root indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ + /* Test description */ + const char *base_desc = "filling direct blocks and skipping blocks in non-root indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9369,26 +9392,26 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_direct_skip_indirect_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped + * Function: test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * add object too large for all direct blocks in first row of * indirect blocks, to force skipping a row of indirect blocks * (and range of skipped blocks), then backfill all direct blocks * skipped and extend to next "normal" direct block. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 3, 2006 * *------------------------------------------------------------------------- @@ -9396,9 +9419,9 @@ error: static unsigned test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -9408,8 +9431,9 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u; /* Local index variable */ + /* Test description */ + const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9496,27 +9520,27 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped + * Function: test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, except the last * one, then insert object insert object that is too large to * hold in row of 2nd level indirect blocks (forcing the use of * the next row of 2nd level blocks), then backfill all skipped * direct blocks & extend. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 18, 2006 * *------------------------------------------------------------------------- @@ -9524,9 +9548,9 @@ error: static unsigned test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -9535,8 +9559,9 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, except last one, and insert object too large for 2nd level indirect blocks, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u; /* Local index variables */ + /* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, except last one, and insert object too large for 2nd level indirect blocks, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9635,16 +9660,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped + * Function: test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * add object too large for all direct blocks in first row of * indirect blocks, to force skipping a row of indirect blocks * (and range of skipped blocks), then add object that is too @@ -9654,11 +9679,11 @@ error: * too large for initial block size in skipped indirect block * row's direct blocks). * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 11, 2006 * *------------------------------------------------------------------------- @@ -9666,9 +9691,9 @@ error: static unsigned test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -9678,8 +9703,9 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5 size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then skip row of direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u; /* Local index variable */ + /* Test description */ + const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then skip row of direct blocks, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9800,25 +9826,25 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_direct_skip_indirect_two_rows_add_skipped + * Function: test_man_fill_direct_skip_indirect_two_rows_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * add object too large for initial block in first two rows of * indirect blocks, to force extension of non-root * indirect block (and range of skipped blocks). * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, April 15, 2006 * *------------------------------------------------------------------------- @@ -9826,9 +9852,9 @@ error: static unsigned test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -9838,8 +9864,9 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9951,27 +9978,27 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_direct_skip_indirect_two_rows_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped + * Function: test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * add object too large for initial block in first two rows of * indirect blocks, to force extension of non-root * indirect block, then add object too large for first row of * indirect blocks, (and ranges of skipped blocks), then backfill * and extend. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 11, 2006 * *------------------------------------------------------------------------- @@ -9979,9 +10006,9 @@ error: static unsigned test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -9991,8 +10018,9 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, skip one row of root indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, skip one row of root indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10131,26 +10159,26 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_2nd_direct_skip_start_block_add_skipped + * Function: test_man_fill_2nd_direct_skip_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, the insert object * that is too large to hold in first row of direct blocks of * 3rd level indirect block, then backfill & extend all skipped * 3rd level indirect block's direct blocks. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 11, 2006 * *------------------------------------------------------------------------- @@ -10158,9 +10186,9 @@ error: static unsigned test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -10168,7 +10196,8 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, and skip first rows of direct blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ + /* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, and skip first rows of direct blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10257,16 +10286,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_2nd_direct_skip_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped + * Function: test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks in 3rd level indirect block, then insert object * that is too large to hold in first row of direct blocks of @@ -10274,11 +10303,11 @@ error: * backfill & extend all skipped 2nd level indirect block's direct * blocks. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 11, 2006 * *------------------------------------------------------------------------- @@ -10286,9 +10315,9 @@ error: static unsigned test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -10296,7 +10325,8 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first rows of direct blocks of 3rd level indirect block's 2nd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ + /* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first rows of direct blocks of 3rd level indirect block's 2nd level indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10395,27 +10425,27 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped + * Function: test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks in 3rd level indirect block, then insert object * that is too large to hold in first row of 2nd level indirect * blocks of 3rd level indirect block, then backfill & extend all * skipped direct blocks. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 11, 2006 * *------------------------------------------------------------------------- @@ -10423,9 +10453,9 @@ error: static unsigned test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -10434,8 +10464,9 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first row of indirect blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first row of indirect blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10542,16 +10573,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped + * Function: test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks in 3rd level indirect block, then insert object * that is too large to hold in first & second rows of 2nd level @@ -10559,11 +10590,11 @@ error: * has one row of 2nd level indirect blocks) of 3rd level indirect * block, then backfill & extend all skipped direct blocks. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 11, 2006 * *------------------------------------------------------------------------- @@ -10571,9 +10602,9 @@ error: static unsigned test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -10582,8 +10613,9 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped( size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first two rows of indirect blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first two rows of indirect blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10694,16 +10726,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped + * Function: test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, all 3rd level * indirect blocks in first row except the last one, fill direct * blocks in last 3rd level indirect block, then insert object @@ -10712,11 +10744,11 @@ error: * use of the next row of 3rd level blocks), then backfill all * skipped direct blocks & extend. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tues, April 18, 2006 * *------------------------------------------------------------------------- @@ -10724,9 +10756,9 @@ error: static unsigned test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -10735,8 +10767,9 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect blocks, except last one, fill all direct blocks in last 3rd level indirect block, and insert object too large for it's 2nd level indirect blocks, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect blocks, except last one, fill all direct blocks in last 3rd level indirect block, and insert object too large for it's 2nd level indirect blocks, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10852,16 +10885,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped + * Function: test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, all 3rd level * indirect blocks in first row, fill direct blocks in 2nd row 3rd * level indirect block, fill all direct blocks in 1st row of @@ -10871,11 +10904,11 @@ error: * next row of 2nd level blocks), then backfill all skipped direct * blocks & extend. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tues, April 18, 2006 * *------------------------------------------------------------------------- @@ -10883,9 +10916,9 @@ error: static unsigned test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -10894,8 +10927,8 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect blocks, fill all direct blocks in next 3rd level indirect block, fill all 1st row of 2nd level indirect blocks, except last one, and insert object too large for 2nd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ - unsigned u; /* Local index variables */ + unsigned u; /* Local index variables *//* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect blocks, fill all direct blocks in next 3rd level indirect block, fill all 1st row of 2nd level indirect blocks, except last one, and insert object too large for 2nd level indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11017,16 +11050,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped + * Function: test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks and indirect blocks in 3rd level indirect block, then * fill all direct blocks in 4th level indirect block, then @@ -11034,11 +11067,11 @@ error: * level indirect blocks of 4th level indirect block, then * backfill all skipped direct blocks & extend. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, April 15, 2006 * *------------------------------------------------------------------------- @@ -11046,9 +11079,9 @@ error: static unsigned test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -11057,8 +11090,9 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5 size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill 4th level indirect block's direct blocks, and skip first row of 2nd indirect blocks of 4th level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill 4th level indirect block's direct blocks, and skip first row of 2nd indirect blocks of 4th level indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11173,16 +11207,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped + * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks and indirect blocks in 3rd level indirect block, then * fill all direct blocks and 2nd level indirect blocks in 4th @@ -11192,11 +11226,11 @@ error: * 3rd level indirect block, then * backfill all skipped direct blocks & extend. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 17, 2006 * *------------------------------------------------------------------------- @@ -11204,9 +11238,9 @@ error: static unsigned test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -11215,8 +11249,9 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill 4th level indirect block's direct, 2nd level indirect blocks and 3rd level direct block, and skip first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill 4th level indirect block's direct, 2nd level indirect blocks and 3rd level direct block, and skip first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11347,16 +11382,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped + * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks and indirect blocks in 3rd level indirect block, fill all * direct & indirect blocks in first row of 4th level indirect @@ -11368,11 +11403,11 @@ error: * 3rd level indirect block (in 4th level indirect block), then * backfill all skipped direct blocks & extend. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 17, 2006 * *------------------------------------------------------------------------- @@ -11380,9 +11415,9 @@ error: static unsigned test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -11391,8 +11426,9 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 4th level indirect blocks, fill 2nd row 4th level indirect block's direct, 2nd level indirect blocks, first row of 3rd level indirect blocks, 3rd level direct block in 2nd row, and skip first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 4th level indirect blocks, fill 2nd row 4th level indirect block's direct, 2nd level indirect blocks, first row of 3rd level indirect blocks, 3rd level direct block in 2nd row, and skip first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11556,16 +11592,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped + * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks and indirect blocks in 3rd level indirect block, fill all * direct & indirect blocks in 4th level indirect @@ -11579,11 +11615,11 @@ error: * 4th level block), then backfill all skipped direct blocks & * extend. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 17, 2006 * *------------------------------------------------------------------------- @@ -11591,9 +11627,9 @@ error: static unsigned test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -11602,8 +11638,9 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 3rd level indirect blocks in 4th level indirect block except last 3rd level block, fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 3rd level indirect blocks in 4th level indirect block except last 3rd level block, fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11749,16 +11786,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped + * Function: test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks and indirect blocks in 3rd level indirect block, fill all * direct & indirect blocks in first row of 4th level indirect @@ -11772,11 +11809,11 @@ error: * next row of 4th level blocks), then backfill all skipped direct * blocks & extend. * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, April 17, 2006 * *------------------------------------------------------------------------- @@ -11784,9 +11821,9 @@ error: static unsigned test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -11795,8 +11832,9 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 4th level indirect blocks, except last one, fill first row of 3rd level indirect blocks in last 4th level indirect block except last 3rd level block, fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 4th level indirect blocks, except last one, fill first row of 3rd level indirect blocks in last 4th level indirect block except last 3rd level block, fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11978,27 +12016,27 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped() */ - + /*------------------------------------------------------------------------- - * Function: test_man_frag_simple + * Function: test_man_frag_simple * - * Purpose: Test inserting objects small enough to fit into first row of + * Purpose: Test inserting objects small enough to fit into first row of * direct blocks, but not to share a block with another object, * until start-block-size * 2 blocks are reached. Then, go back * and fill in the space in the blocks skipped. * * Then, remove all the objects, in various ways * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, July 24, 2006 * *------------------------------------------------------------------------- @@ -12006,17 +12044,18 @@ error: static unsigned test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "fragmenting small blocks, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u; /* Local index variables */ + /* Test description */ + const char *base_desc = "fragmenting small blocks, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -12110,26 +12149,26 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_frag_simple() */ - + /*------------------------------------------------------------------------- - * Function: test_man_frag_direct + * Function: test_man_frag_direct * - * Purpose: Test inserting small object to fit into each direct block + * Purpose: Test inserting small object to fit into each direct block * in root block, but not to share a block with another object, * Then, go back and fill in the space in the blocks skipped. * * Then, go back and remove all objects * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 25, 2006 * *------------------------------------------------------------------------- @@ -12137,9 +12176,9 @@ error: static unsigned test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -12147,8 +12186,9 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "fragmenting direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "fragmenting direct blocks, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -12279,16 +12319,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_frag_direct() */ - + /*------------------------------------------------------------------------- - * Function: test_man_frag_2nd_direct + * Function: test_man_frag_2nd_direct * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * inserting small object to fit into each direct block * in 2nd level indirect block, but not to share a block with * another object. @@ -12296,11 +12336,11 @@ error: * * Then, go back and remove all the objects * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 25, 2006 * *------------------------------------------------------------------------- @@ -12308,9 +12348,9 @@ error: static unsigned test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -12319,8 +12359,9 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "fill root direct blocks, then fragment 2nd level indirect block's direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "fill root direct blocks, then fragment 2nd level indirect block's direct blocks, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -12388,16 +12429,16 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_frag_2nd_direct() */ - + /*------------------------------------------------------------------------- - * Function: test_man_frag_3rd_direct + * Function: test_man_frag_3rd_direct * - * Purpose: Test filling all direct blocks in root indirect block and + * Purpose: Test filling all direct blocks in root indirect block and * all 2nd level indirect blocks, then * inserting small object to fit into each direct block * in 3rd level indirect block, but not to share a block with @@ -12406,11 +12447,11 @@ error: * * Then, go back and remove all objects * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, July 25, 2006 * *------------------------------------------------------------------------- @@ -12418,9 +12459,9 @@ error: static unsigned test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -12429,8 +12470,9 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "fill root direct blocks and 2nd level indirect blocks, then fragment 3rd level indirect block's direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */ unsigned u, v; /* Local index variables */ + /* Test description */ + const char *base_desc = "fill root direct blocks and 2nd level indirect blocks, then fragment 3rd level indirect block's direct blocks, then backfill and extend, then remove all objects %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -12506,23 +12548,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_man_frag_3rd_direct() */ - + /*------------------------------------------------------------------------- - * Function: test_huge_insert_one + * Function: test_huge_insert_one * - * Purpose: Test inserting one huge object in the heap + * Purpose: Test inserting one huge object in the heap * * Then, remove all the objects, in various ways * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, August 7, 2006 * *------------------------------------------------------------------------- @@ -12530,9 +12572,9 @@ error: static unsigned test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -12544,7 +12586,8 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar size_t robj_size; /* Size of object read */ unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "insert one huge object, then remove %s"; /* Test description */ + /* Test description */ + const char *base_desc = "insert one huge object, then remove %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -12655,23 +12698,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_huge_insert_one() */ - + /*------------------------------------------------------------------------- - * Function: test_huge_insert_two + * Function: test_huge_insert_two * - * Purpose: Test inserting two huge objects in the heap + * Purpose: Test inserting two huge objects in the heap * * Then, remove all the objects, in various ways * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, August 11, 2006 * *------------------------------------------------------------------------- @@ -12679,9 +12722,9 @@ error: static unsigned test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -12694,7 +12737,8 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar size_t robj_size; /* Size of object read */ unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "insert two huge objects, then remove %s"; /* Test description */ + /* Test description */ + const char *base_desc = "insert two huge objects, then remove %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -12884,23 +12928,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_huge_insert_two() */ - + /*------------------------------------------------------------------------- - * Function: test_huge_insert_three + * Function: test_huge_insert_three * - * Purpose: Test inserting three huge objects in the heap + * Purpose: Test inserting three huge objects in the heap * * Then, remove all the objects, in various ways * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, August 11, 2006 * *------------------------------------------------------------------------- @@ -12908,9 +12952,9 @@ error: static unsigned test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -12924,7 +12968,8 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp size_t robj_size; /* Size of object read */ unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "insert three huge objects, then remove %s"; /* Test description */ + /* Test description */ + const char *base_desc = "insert three huge objects, then remove %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -13188,23 +13233,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_huge_insert_three() */ - + /*------------------------------------------------------------------------- - * Function: test_huge_insert_mix + * Function: test_huge_insert_mix * - * Purpose: Test inserting a mix of 'normal' & 'huge' objects in the heap + * Purpose: Test inserting a mix of 'normal' & 'huge' objects in the heap * * Then, remove all the objects, in various ways * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, August 11, 2006 * *------------------------------------------------------------------------- @@ -13212,9 +13257,9 @@ error: static unsigned test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -13230,7 +13275,8 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar size_t robj_size; /* Size of object read */ unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "insert mix of normal & huge objects, then remove %s"; /* Test description */ + /* Test description */ + const char *base_desc = "insert mix of normal & huge objects, then remove %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -13612,21 +13658,21 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_huge_insert_mix() */ - + /*------------------------------------------------------------------------- - * Function: test_filtered_huge + * Function: test_filtered_huge * - * Purpose: Test storing 'huge' object in a heap with I/O filters + * Purpose: Test storing 'huge' object in a heap with I/O filters * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, August 15, 2006 * *------------------------------------------------------------------------- @@ -13634,9 +13680,9 @@ error: static unsigned test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ H5HF_create_t tmp_cparam; /* Local heap creation parameters */ @@ -13653,7 +13699,8 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam size_t old_actual_id_len = 0; /* Old actual ID length */ hbool_t huge_ids_direct; /* Are 'huge' objects directly acccessed? */ hbool_t pline_init = FALSE; /* Whether the I/O pipeline has been initialized */ - const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove %s"; /* Test description */ + /* Test description */ + const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove %s"; /* Copy heap creation properties */ HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t)); @@ -13829,18 +13876,18 @@ error: return(1); } /* test_filtered_huge() */ - + /*------------------------------------------------------------------------- - * Function: test_tiny_insert_one + * Function: test_tiny_insert_one * - * Purpose: Test inserting one tiny object in the heap + * Purpose: Test inserting one tiny object in the heap * * Then, remove all the objects, in various ways * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, August 14, 2006 * *------------------------------------------------------------------------- @@ -13848,9 +13895,9 @@ error: static unsigned test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -13862,7 +13909,8 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar size_t robj_size; /* Size of object read */ unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "insert one tiny object, then remove %s"; /* Test description */ + /* Test description */ + const char *base_desc = "insert one tiny object, then remove %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -13973,23 +14021,23 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_tiny_insert_one() */ - + /*------------------------------------------------------------------------- - * Function: test_tiny_insert_two + * Function: test_tiny_insert_two * - * Purpose: Test inserting two tiny objects in the heap + * Purpose: Test inserting two tiny objects in the heap * * Then, remove all the objects, in various ways * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, August 14, 2006 * *------------------------------------------------------------------------- @@ -13997,9 +14045,9 @@ error: static unsigned test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -14012,7 +14060,8 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar size_t robj_size; /* Size of object read */ unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "insert two tiny objects, then remove %s"; /* Test description */ + /* Test description */ + const char *base_desc = "insert two tiny objects, then remove %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -14202,24 +14251,24 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_tiny_insert_two() */ - + /*------------------------------------------------------------------------- - * Function: test_tiny_insert_mix + * Function: test_tiny_insert_mix * - * Purpose: Test inserting a mix of 'normal', 'huge' & 'tiny' objects in + * Purpose: Test inserting a mix of 'normal', 'huge' & 'tiny' objects in * the heap * * Then, remove all the objects, in various ways * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, August 14, 2006 * *------------------------------------------------------------------------- @@ -14227,9 +14276,9 @@ error: static unsigned test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ @@ -14247,7 +14296,8 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar size_t robj_size; /* Size of object read */ unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ - const char *base_desc = "insert mix of normal, huge & tiny objects, then remove %s"; /* Test description */ + /* Test description */ + const char *base_desc = "insert mix of normal, huge & tiny objects, then remove %s"; /* Perform common test initialization operations */ if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -14809,21 +14859,21 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_tiny_insert_mix() */ - + /*------------------------------------------------------------------------- - * Function: test_filtered_man_root_direct + * Function: test_filtered_man_root_direct * - * Purpose: Test storing one 'managed' object in a heap with I/O filters + * Purpose: Test storing one 'managed' object in a heap with I/O filters * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, August 14, 2006 * *------------------------------------------------------------------------- @@ -14831,9 +14881,9 @@ error: static unsigned test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ H5HF_create_t tmp_cparam; /* Local heap creation parameters */ @@ -14848,7 +14898,8 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ unsigned deflate_level; /* Deflation level */ - const char *base_desc = "insert one 'managed' object into heap with I/O filters, then remove %s"; /* Test description */ + /* Test description */ + const char *base_desc = "insert one 'managed' object into heap with I/O filters, then remove %s"; /* Copy heap creation properties */ HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t)); @@ -14981,21 +15032,21 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_filtered_man_root_direct() */ - + /*------------------------------------------------------------------------- - * Function: test_filtered_man_root_indirect + * Function: test_filtered_man_root_indirect * - * Purpose: Test storing several objects in a 'managed heap with I/O filters + * Purpose: Test storing several objects in a 'managed heap with I/O filters * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, October 24, 2006 * *------------------------------------------------------------------------- @@ -15003,9 +15054,9 @@ error: static unsigned test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ H5HF_create_t tmp_cparam; /* Local heap creation parameters */ @@ -15021,7 +15072,8 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa unsigned char obj_type; /* Type of storage for object */ fheap_heap_state_t state; /* State of fractal heap */ unsigned deflate_level; /* Deflation level */ - const char *base_desc = "insert two 'managed' objects into heap with I/O filters, then remove %s"; /* Test description */ + /* Test description */ + const char *base_desc = "insert two 'managed' objects into heap with I/O filters, then remove %s"; /* Copy heap creation properties */ HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t)); @@ -15306,25 +15358,25 @@ error: H5E_BEGIN_TRY { if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_filtered_man_root_indirect() */ - + /*------------------------------------------------------------------------- - * Function: test_random + * Function: test_random * - * Purpose: Test inserting random sized objects into a heap, and read + * Purpose: Test inserting random sized objects into a heap, and read * them back. * * Then, go back and remove all objects * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, May 9, 2006 * *------------------------------------------------------------------------- @@ -15332,9 +15384,9 @@ error: static unsigned test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ H5HF_create_t tmp_cparam; /* Local heap creation parameters */ @@ -15510,21 +15562,21 @@ error: return(1); } /* test_random() */ - + /*------------------------------------------------------------------------- - * Function: test_random_pow2 + * Function: test_random_pow2 * - * Purpose: Test inserting random sized objects with a "power of 2 + * Purpose: Test inserting random sized objects with a "power of 2 * distribution" (which favors small objects) into a heap, * and read them back. * * Then, go back and remove all objects * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, May 15, 2006 * *------------------------------------------------------------------------- @@ -15532,9 +15584,9 @@ error: static unsigned test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ H5HF_create_t tmp_cparam; /* Local heap creation parameters */ @@ -15721,16 +15773,16 @@ error: return(1); } /* test_random_pow2() */ - + /*------------------------------------------------------------------------- - * Function: test_write + * Function: test_write * - * Purpose: Test inserting objects, then changing the value for them. + * Purpose: Test inserting objects, then changing the value for them. * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, December 18, 2006 * *------------------------------------------------------------------------- @@ -15750,9 +15802,9 @@ static size_t test_write_filter(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATT static unsigned test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ H5HF_create_t tmp_cparam; /* Local heap creation parameters */ @@ -16000,23 +16052,23 @@ error: H5MM_xfree(rewrite_obj); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_write() */ - + /*------------------------------------------------------------------------- - * Function: test_bug1 + * Function: test_bug1 * - * Purpose: Test inserting several objects, then deleting one and + * Purpose: Test inserting several objects, then deleting one and * re-inserting an object, along with opening and closing * the file. * - * Return: Success: 0 - * Failure: 1 + * Return: Success: 0 + * Failure: 1 * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, November 28, 2006 * *------------------------------------------------------------------------- @@ -16024,9 +16076,9 @@ error: static unsigned test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) { - hid_t file = -1; /* File ID */ - char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ - H5F_t *f = NULL; /* Internal file object pointer */ + hid_t file = -1; /* File ID */ + char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ + H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ size_t id_len; /* Size of fractal heap IDs */ @@ -16175,22 +16227,22 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_bug1() */ - + /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Test the fractal heap code + * Purpose: Test the fractal heap code * - * Return: Success: + * Return: Success: * - * Failure: + * Failure: * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, February 24, 2006 * *------------------------------------------------------------------------- @@ -16201,14 +16253,14 @@ main(void) fheap_test_param_t tparam; /* Testing parameters */ H5HF_create_t small_cparam; /* Creation parameters for "small" heap */ H5HF_create_t large_cparam; /* Creation parameters for "large" heap */ - hid_t fapl = -1, def_fapl = -1; /* File access property list for data files */ - hid_t pb_fapl = -1; /* File access property list for data files */ - hid_t fcpl = -1, def_fcpl = -1; /* File creation property list for data files */ + hid_t fapl = -1, def_fapl = -1; /* File access property list for data files */ + hid_t pb_fapl = -1; /* File access property list for data files */ + hid_t fcpl = -1, def_fcpl = -1; /* File creation property list for data files */ fheap_test_type_t curr_test; /* Current test being worked on */ unsigned u, v; /* Local index variable */ - unsigned nerrors = 0; /* Cumulative error count */ + unsigned nerrors = 0; /* Cumulative error count */ unsigned num_pb_fs = 1; /* The number of settings to test for page buffering and file space handling */ - int ExpressMode; /* Express testing level */ + int ExpressMode; /* Express testing level */ const char *envval; /* Environment variable */ hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ diff --git a/test/file_image.c b/test/file_image.c index 0d4873a..d784df2 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -67,7 +67,7 @@ typedef struct { H5FD_file_image_op_t free_src; } udata_t; - + /****************************************************************************** * Function: test_properties * @@ -162,7 +162,7 @@ error: return retval; } /* end test_properties() */ - + /****************************************************************************** * Function: malloc_cb * @@ -185,7 +185,7 @@ malloc_cb(size_t size, H5FD_file_image_op_t op, void *udata) return HDmalloc(size); } - + /****************************************************************************** * Function: memcpy_cb * @@ -208,7 +208,7 @@ memcpy_cb(void *dest, const void *src, size_t size, H5FD_file_image_op_t op, voi return HDmemcpy(dest, src, size); } - + /****************************************************************************** * Function: realloc_cb * @@ -231,7 +231,7 @@ realloc_cb(void *ptr, size_t size, H5FD_file_image_op_t op, void *udata) return HDrealloc(ptr,size); } - + /****************************************************************************** * Function: free_cb * @@ -253,7 +253,7 @@ free_cb(void *ptr, H5FD_file_image_op_t op, void *udata) return(SUCCEED); } - + /****************************************************************************** * Function: udata_copy_cb * @@ -277,7 +277,7 @@ udata_copy_cb(void *udata) return udata; } - + /****************************************************************************** * Function: udata_free_cb * @@ -301,7 +301,7 @@ udata_free_cb(void *udata) return(SUCCEED); } - + /****************************************************************************** * Function: reset_udata * @@ -320,7 +320,7 @@ reset_udata(udata_t *u) u->malloc_src = u->memcpy_src = u->realloc_src = u->free_src = H5FD_FILE_IMAGE_OP_NO_OP; } - + /****************************************************************************** * Function: test_callbacks * @@ -509,7 +509,7 @@ error: return 1; } /* test_callbacks() */ - + /****************************************************************************** * Function: test_core * @@ -657,7 +657,7 @@ error: return 1; } /* end test_core() */ - + /****************************************************************************** * Function: test_get_file_image * @@ -678,11 +678,11 @@ error: * 'member_file_name' in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") static int test_get_file_image(const char * test_banner, const int file_name_num, - hid_t fapl, + hid_t fapl, hbool_t user) { char file_name[1024] = "\0"; @@ -783,7 +783,7 @@ test_get_file_image(const char * test_banner, ssize_t member_size; ssize_t size_remaining; - /* + /* * Modifications need to be made to accommodate userblock when * H5Fget_file_image() works for family driver */ @@ -855,7 +855,7 @@ test_get_file_image(const char * test_banner, * the remainder of the file is all '\0's. */ file_size = (ssize_t)stat_buf.st_size; - if(user) { + if(user) { VERIFY(file_size > USERBLOCK_SIZE, "file size !> userblock size."); file_size -= USERBLOCK_SIZE; } @@ -873,7 +873,7 @@ test_get_file_image(const char * test_banner, fd = HDopen(file_name, O_RDONLY); VERIFY(fd >= 0, "HDopen() failed."); - if(user) { + if(user) { HDoff_t off; /* Position at userblock */ @@ -945,9 +945,9 @@ test_get_file_image(const char * test_banner, error: return 1; } /* end test_get_file_image() */ -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") + - /****************************************************************************** * Function: test_get_file_image_error_rejection * @@ -1335,28 +1335,28 @@ main(void) /* Perform tests with/without user block */ for(user = FALSE; user <= TRUE; user++) { - /* test H5Fget_file_image() with sec2 driver */ - fapl = H5Pcreate(H5P_FILE_ACCESS); - if(H5Pset_fapl_sec2(fapl) < 0) - errors++; - else - errors += test_get_file_image("H5Fget_file_image() with sec2 driver", + /* test H5Fget_file_image() with sec2 driver */ + fapl = H5Pcreate(H5P_FILE_ACCESS); + if(H5Pset_fapl_sec2(fapl) < 0) + errors++; + else + errors += test_get_file_image("H5Fget_file_image() with sec2 driver", 0, fapl, user); - /* test H5Fget_file_image() with stdio driver */ - fapl = H5Pcreate(H5P_FILE_ACCESS); - if(H5Pset_fapl_stdio(fapl) < 0) - errors++; - else - errors += test_get_file_image("H5Fget_file_image() with stdio driver", + /* test H5Fget_file_image() with stdio driver */ + fapl = H5Pcreate(H5P_FILE_ACCESS); + if(H5Pset_fapl_stdio(fapl) < 0) + errors++; + else + errors += test_get_file_image("H5Fget_file_image() with stdio driver", 1, fapl, user); - /* test H5Fget_file_image() with core driver */ - fapl = H5Pcreate(H5P_FILE_ACCESS); - if(H5Pset_fapl_core(fapl, (size_t)(64 *1024), TRUE) < 0) - errors++; - else - errors += test_get_file_image("H5Fget_file_image() with core driver", + /* test H5Fget_file_image() with core driver */ + fapl = H5Pcreate(H5P_FILE_ACCESS); + if(H5Pset_fapl_core(fapl, (size_t)(64 *1024), TRUE) < 0) + errors++; + else + errors += test_get_file_image("H5Fget_file_image() with core driver", 2, fapl, user); } /* end for */ diff --git a/test/h5test.c b/test/h5test.c index 022bfde..277e77b 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -203,7 +203,7 @@ h5_clean_files(const char *base_name[], hid_t fapl) * sub_filename in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") void h5_delete_test_file(const char *base_name, hid_t fapl) { @@ -253,7 +253,7 @@ h5_delete_test_file(const char *base_name, hid_t fapl) return; } /* end h5_delete_test_file() */ -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") /*------------------------------------------------------------------------- @@ -1362,7 +1362,7 @@ h5_dump_info_object(MPI_Info info) * temp in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") h5_stat_size_t h5_get_file_size(const char *filename, hid_t fapl) { @@ -1464,7 +1464,7 @@ h5_get_file_size(const char *filename, hid_t fapl) return(-1); } /* end get_file_size() */ -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") /* * This routine is designed to provide equivalent functionality to 'printf' diff --git a/test/ntypes.c b/test/ntypes.c index e371b93..34425c4 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -12,10 +12,10 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Raymond Lu + * Programmer: Raymond Lu * October 14, 2001 * - * Purpose: Tests the H5Tget_native_type function. + * Purpose: Tests the H5Tget_native_type function. */ #include "h5test.h" @@ -30,23 +30,23 @@ const char *FILENAME[] = { #define DIM3 20 -int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1]; -short spoints2[DIM0][DIM1], scheck2[DIM0][DIM1]; -int ipoints3[DIM0][DIM1][5], icheck3[DIM0][DIM1][5]; +int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1]; +short spoints2[DIM0][DIM1], scheck2[DIM0][DIM1]; +int ipoints3[DIM0][DIM1][5], icheck3[DIM0][DIM1][5]; -#define DSET_ATOMIC_NAME_1 "atomic_type_1" -#define DSET_ATOMIC_NAME_2 "atomic_type_2" -#define DSET_ATOMIC_NAME_3 "atomic_type_3" -#define DSET_ATOMIC_NAME_4 "atomic_type_4" -#define DSET_ATOMIC_NAME_5 "atomic_type_5" +#define DSET_ATOMIC_NAME_1 "atomic_type_1" +#define DSET_ATOMIC_NAME_2 "atomic_type_2" +#define DSET_ATOMIC_NAME_3 "atomic_type_3" +#define DSET_ATOMIC_NAME_4 "atomic_type_4" +#define DSET_ATOMIC_NAME_5 "atomic_type_5" #define DSET_COMPOUND_NAME "compound_type" #define DSET_COMPOUND_NAME_2 "compound_type_2" #define DSET_COMPOUND_NAME_3 "compound_type_3" #define DSET_COMPOUND_NAME_4 "compound_type_4" -#define DSET_ENUM_NAME "enum_type" -#define DSET_ARRAY_NAME "array_type" -#define DSET_ARRAY2_NAME "array_type_2" -#define DSET_VL_NAME "vl_type" +#define DSET_ENUM_NAME "enum_type" +#define DSET_ARRAY_NAME "array_type" +#define DSET_ARRAY2_NAME "array_type_2" +#define DSET_VL_NAME "vl_type" #define DSET_VLSTR_NAME "vlstr_type" #define DSET_STR_NAME "str_type" #define DSET_OPAQUE_NAME "opaque_type" @@ -55,23 +55,23 @@ int ipoints3[DIM0][DIM1][5], icheck3[DIM0][DIM1][5]; #define SPACE1_DIM1 4 #define SPACE1_RANK 1 -#define SPACE2_RANK 2 -#define SPACE2_DIM1 10 -#define SPACE2_DIM2 10 +#define SPACE2_RANK 2 +#define SPACE2_DIM1 10 +#define SPACE2_DIM2 10 #define BITFIELD_ENUMB 8 - + /*------------------------------------------------------------------------- - * Function: test_atomic_dtype + * Function: test_atomic_dtype * - * Purpose: Test H5Tget_native_type for atomic datatype + * Purpose: Test H5Tget_native_type for atomic datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -80,10 +80,10 @@ int ipoints3[DIM0][DIM1][5], icheck3[DIM0][DIM1][5]; static herr_t test_atomic_dtype(hid_t file) { - hid_t dataset = -1, space = -1; + hid_t dataset = -1, space = -1; hid_t dtype = -1, native_type = -1; - int i, j, n; - hsize_t dims[2]; + int i, j, n; + hsize_t dims[2]; void *tmp = NULL; TESTING("atomic datatype"); @@ -273,18 +273,18 @@ error: return -1; } - + /*------------------------------------------------------------------------- - * Function: test_compound_dtype2 + * Function: test_compound_dtype2 * - * Purpose: Test H5Tget_native_type for compound datatype + * Purpose: Test H5Tget_native_type for compound datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -304,13 +304,13 @@ test_compound_dtype2(hid_t file) s2 st; unsigned long long l; } s1; - hid_t dataset = -1, space = -1; + hid_t dataset = -1, space = -1; hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1, tid_m2 = -1, mem_id = -1, nest_mem_id = -1; - int i, j, n; - hsize_t dims[2]; + int i, j, n; + hsize_t dims[2]; s1 *temp_point = NULL, *temp_check = NULL; - s1 *points = NULL, *check = NULL; + s1 *points = NULL, *check = NULL; void *tmp = NULL, *bkg = NULL; TESTING("nested compound datatype"); @@ -572,18 +572,18 @@ error: return -1; } - + /*------------------------------------------------------------------------- - * Function: test_compound_dtype + * Function: test_compound_dtype * - * Purpose: Test H5Tget_native_type for compound datatype + * Purpose: Test H5Tget_native_type for compound datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -597,10 +597,10 @@ test_compound_dtype(hid_t file) unsigned int i; long long l; } s1; - hid_t dataset = -1, space = -1; + hid_t dataset = -1, space = -1; hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, mem_id = -1; - int i, j, n; - hsize_t dims[2]; + int i, j, n; + hsize_t dims[2]; s1 *temp_point = NULL; s1 *temp_check = NULL; s1 *points = NULL; @@ -772,18 +772,18 @@ error: return -1; } - + /*------------------------------------------------------------------------- - * Function: test_compound_dtype3 + * Function: test_compound_dtype3 * - * Purpose: Test H5Tget_native_type for compound datatype + * Purpose: Test H5Tget_native_type for compound datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -797,14 +797,14 @@ test_compound_dtype3(hid_t file) int a[5]; long long l; } s1; - hid_t dataset = -1, space = -1; + hid_t dataset = -1, space = -1; hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1, tid_m2 = -1, mem_id = -1, nest_mem_id = -1; hsize_t array_dims[1] = {5}; - int i, j, k, n; - hsize_t dims[2]; + int i, j, k, n; + hsize_t dims[2]; s1 *temp_point = NULL, *temp_check = NULL; - s1 *points = NULL, *check = NULL; + s1 *points = NULL, *check = NULL; void *tmp = NULL, *bkg = NULL; TESTING("compound datatype with array as field"); @@ -997,18 +997,18 @@ error: return -1; } - + /*------------------------------------------------------------------------- - * Function: test_compound_opaque + * Function: test_compound_opaque * - * Purpose: Test H5Tget_native_type for compound datatype with opaque field + * Purpose: Test H5Tget_native_type for compound datatype with opaque field * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Quincey Koziol - * January 31, 2004 + * Programmer: Quincey Koziol + * January 31, 2004 * * Modifications: * @@ -1022,13 +1022,13 @@ test_compound_opaque(hid_t file) unsigned char o[5]; long long l; } s1; - hid_t dataset = -1, space = -1; + hid_t dataset = -1, space = -1; hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1, mem_id = -1; - int i, j, k, n; - hsize_t dims[2]; + int i, j, k, n; + hsize_t dims[2]; s1 *temp_point = NULL, *temp_check = NULL; - s1 *points = NULL, *check = NULL; + s1 *points = NULL, *check = NULL; void *tmp = NULL, *bkg = NULL; TESTING("compound datatype with opaque field"); @@ -1209,18 +1209,18 @@ error: return -1; } - + /*------------------------------------------------------------------------- - * Function: test_enum_dtype + * Function: test_enum_dtype * - * Purpose: Test H5Tget_native_type for enumerate datatype + * Purpose: Test H5Tget_native_type for enumerate datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -1229,10 +1229,10 @@ error: static herr_t test_enum_dtype(hid_t file) { - hid_t dataset = -1, space = -1; + hid_t dataset = -1, space = -1; hid_t tid = -1, tid_m = -1, dtype = -1, native_type = -1; - int i, j, n; - hsize_t dims[2]; + int i, j, n; + hsize_t dims[2]; void *tmp = NULL; short colors[8]; unsigned char sub_colors[16]; @@ -1351,18 +1351,18 @@ error: return -1; } - + /*------------------------------------------------------------------------- - * Function: test_array_dtype + * Function: test_array_dtype * - * Purpose: Test H5Tget_native_type for array datatype + * Purpose: Test H5Tget_native_type for array datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -1376,12 +1376,12 @@ test_array_dtype(hid_t file) int i; long long l; } s1; - hid_t dataset = -1, space = -1; + hid_t dataset = -1, space = -1; hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid3 = -1, tid_m = -1; - int i, j, k, n; - hsize_t space_dims[2], array_dims[1]={5}; + int i, j, k, n; + hsize_t space_dims[2], array_dims[1]={5}; s1 *temp_point = NULL, *temp_check = NULL; - s1 *points = NULL, *check = NULL; + s1 *points = NULL, *check = NULL; void *tmp = NULL; TESTING("array of compound datatype"); @@ -1518,18 +1518,18 @@ error: return -1; } - + /*------------------------------------------------------------------------- - * Function: test_array_dtype2 + * Function: test_array_dtype2 * - * Purpose: Test H5Tget_native_type for array datatype + * Purpose: Test H5Tget_native_type for array datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -1538,10 +1538,10 @@ error: static herr_t test_array_dtype2(hid_t file) { - hid_t dataset = -1, space = -1; + hid_t dataset = -1, space = -1; hid_t dtype = -1, native_type = -1, tid = -1, tid_m = -1; - int i, j, k, n; - hsize_t space_dims[2], array_dims[1] = {5}; + int i, j, k, n; + hsize_t space_dims[2], array_dims[1] = {5}; void *tmp = NULL; TESTING("array of atomic datatype"); @@ -1641,18 +1641,18 @@ error: return -1; } - + /*------------------------------------------------------------------------- - * Function: test_vl_dtype + * Function: test_vl_dtype * - * Purpose: Test H5Tget_native_type for variable length datatype + * Purpose: Test H5Tget_native_type for variable length datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -1664,10 +1664,10 @@ test_vl_dtype(hid_t file) hvl_t wdata[SPACE1_DIM1]; /* Information to write */ hvl_t rdata[SPACE1_DIM1]; /* Information read in */ hvl_t *t1, *t2; /* Temporary pointer to VL information */ - hsize_t dims1[] = {SPACE1_DIM1}; - hid_t dataset = -1, space = -1; + hsize_t dims1[] = {SPACE1_DIM1}; + hid_t dataset = -1, space = -1; hid_t dtype = -1, native_type = -1, nat_super_type = -1, tid = -1, tid2 = -1, tid_m = -1, tid_m2 = -1; - size_t i, j, k; + size_t i, j, k; void **tmp = NULL; TESTING("variable length datatype"); @@ -1825,18 +1825,18 @@ error: return -1; } /* end test_vl_type() */ - + /*------------------------------------------------------------------------- - * Function: test_vlstr_dtype + * Function: test_vlstr_dtype * - * Purpose: Test H5Tget_native_type for variable length string datatype + * Purpose: Test H5Tget_native_type for variable length string datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -1845,18 +1845,19 @@ error: static herr_t test_vlstr_dtype(hid_t file) { + /* Information to write */ const char *wdata[SPACE1_DIM1]= { "Four score and seven years ago our forefathers brought forth on this continent a new nation,", "conceived in liberty and dedicated to the proposition that all men are created equal.", "Now we are engaged in a great civil war,", "testing whether that nation or any nation so conceived and so dedicated can long endure." - }; /* Information to write */ + }; char *rdata[SPACE1_DIM1]; /* Information read in */ hbool_t rdata_alloc = FALSE; /* Whether the read data is allocated */ - hid_t dataset = -1; /* Dataset ID */ - hid_t sid1 = -1; /* Dataspace ID */ - hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ - hsize_t dims1[] = {SPACE1_DIM1}; + hid_t dataset = -1; /* Dataset ID */ + hid_t sid1 = -1; /* Dataspace ID */ + hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ + hsize_t dims1[] = {SPACE1_DIM1}; unsigned i; /* counting variable */ /* Output message about test being performed */ @@ -1951,18 +1952,18 @@ error: return -1; } /* end test_vlstr_dtype() */ - + /*------------------------------------------------------------------------- - * Function: test_str_dtype + * Function: test_str_dtype * - * Purpose: Test H5Tget_native_type for fixed-length string datatype + * Purpose: Test H5Tget_native_type for fixed-length string datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -1978,10 +1979,10 @@ test_str_dtype(hid_t file) "4th" }; /* Information to write */ char rdata[SPACE1_DIM1][4]; /* Information read in */ - hid_t dataset = -1; /* Dataset ID */ - hid_t sid1 = -1; /* Dataspace ID */ - hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ - hsize_t dims1[] = {SPACE1_DIM1}; + hid_t dataset = -1; /* Dataset ID */ + hid_t sid1 = -1; /* Dataspace ID */ + hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ + hsize_t dims1[] = {SPACE1_DIM1}; unsigned i; /* counting variable */ /* Output message about test being performed */ @@ -2063,18 +2064,18 @@ error: return -1; } /* end test_str_dtype() */ - + /*------------------------------------------------------------------------- - * Function: test_refer_dtype + * Function: test_refer_dtype * - * Purpose: Test H5Tget_native_type for reference datatype + * Purpose: Test H5Tget_native_type for reference datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -2090,11 +2091,11 @@ test_refer_dtype(hid_t file) float c; } s1_t; - hid_t dataset = -1; /* Dataset ID */ - hid_t group = -1; /* Group ID */ - hid_t sid1 = -1; /* Dataspace ID */ - hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ - hsize_t dims1[] = {1}; + hid_t dataset = -1; /* Dataset ID */ + hid_t group = -1; /* Group ID */ + hid_t sid1 = -1; /* Dataspace ID */ + hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ + hsize_t dims1[] = {1}; H5O_type_t obj_type; /* Object type */ hobj_ref_t *wbuf = NULL, /* buffer to write to disk */ *rbuf = NULL; /* buffer read from disk */ @@ -2233,18 +2234,18 @@ error: return -1; } /* test_refer_dtype() */ - + /*------------------------------------------------------------------------- - * Function: test_refer_dtype2 + * Function: test_refer_dtype2 * - * Purpose: Test H5Tget_native_type for reference + * Purpose: Test H5Tget_native_type for reference * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -2253,10 +2254,10 @@ error: static herr_t test_refer_dtype2(hid_t file) { - hid_t dset1 = -1, /* Dataset ID */ + hid_t dset1 = -1, /* Dataset ID */ dset2 = -1; /* Dereferenced dataset ID */ - hid_t sid1 = -1, /* Dataspace ID #1 */ - sid2 = -1; /* Dataspace ID #2 */ + hid_t sid1 = -1, /* Dataspace ID #1 */ + sid2 = -1; /* Dataspace ID #2 */ hid_t dtype = -1, native_type = -1; hsize_t dims1[] = { 1 }, dims2[] = { SPACE2_DIM1, SPACE2_DIM2 }; hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */ @@ -2447,18 +2448,18 @@ error: return -1; } /* test_refer_dtype2() */ - + /*------------------------------------------------------------------------- - * Function: test_opaque_dtype + * Function: test_opaque_dtype * - * Purpose: Test H5Tget_native_type for opaque datatype + * Purpose: Test H5Tget_native_type for opaque datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -2467,11 +2468,11 @@ error: static herr_t test_opaque_dtype(hid_t file) { - hid_t type = -1, space = -1, dset = -1; + hid_t type = -1, space = -1, dset = -1; hid_t dataset = -1, dtype = -1, native_type = -1; size_t i; unsigned char wbuf[32], rbuf[32]; - hsize_t nelmts; + hsize_t nelmts; TESTING("opaque datatype"); @@ -2533,18 +2534,18 @@ error: return -1; } /* test_opaque_dtype */ - + /*------------------------------------------------------------------------- - * Function: test_bitfield_dtype + * Function: test_bitfield_dtype * - * Purpose: Test H5Tget_native_type for bitfield datatype + * Purpose: Test H5Tget_native_type for bitfield datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * Raymond Lu @@ -2556,14 +2557,14 @@ error: static herr_t test_bitfield_dtype(hid_t file) { - hid_t type=-1, space=-1, dset1=-1, dset2=-1; + hid_t type=-1, space=-1, dset1=-1, dset2=-1; hid_t dataset1=-1, dataset2=-1, dtype=-1, native_type=-1; - size_t ntype_size, i; - unsigned char wbuf[BITFIELD_ENUMB*sizeof(int)]; + size_t ntype_size, i; + unsigned char wbuf[BITFIELD_ENUMB*sizeof(int)]; unsigned char *p=NULL; void *rbuf = NULL; unsigned int intw[BITFIELD_ENUMB], intr[BITFIELD_ENUMB]; - hsize_t nelmts; + hsize_t nelmts; TESTING("bitfield datatype"); @@ -2665,7 +2666,7 @@ error: return -1; } /* test_bitfield_dtype */ - + /*------------------------------------------------------------------------- * Function: test_ninteger * @@ -2845,14 +2846,14 @@ error: return -1; } /* end test_ninteger() */ - + /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Test H5Tget_native_type for different datatype + * Purpose: Test H5Tget_native_type for different datatype * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -2861,9 +2862,9 @@ error: int main(void) { - hid_t file, fapl; - int nerrors = 0; - char filename[1024]; + hid_t file, fapl; + int nerrors = 0; + char filename[1024]; h5_reset(); fapl = h5_fileaccess(); @@ -2872,21 +2873,21 @@ main(void) if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) goto error; - nerrors += test_atomic_dtype(file) < 0 ? 1 : 0; - nerrors += test_compound_dtype(file) < 0 ? 1 : 0; - nerrors += test_compound_dtype2(file) < 0 ? 1 : 0; - nerrors += test_compound_dtype3(file) < 0 ? 1 : 0; - nerrors += test_compound_opaque(file) < 0 ? 1 : 0; - nerrors += test_enum_dtype(file) < 0 ? 1 : 0; - nerrors += test_array_dtype(file) < 0 ? 1 : 0; - nerrors += test_array_dtype2(file) < 0 ? 1 : 0; - nerrors += test_vl_dtype(file) < 0 ? 1 : 0; - nerrors += test_vlstr_dtype(file) < 0 ? 1 : 0; + nerrors += test_atomic_dtype(file) < 0 ? 1 : 0; + nerrors += test_compound_dtype(file) < 0 ? 1 : 0; + nerrors += test_compound_dtype2(file) < 0 ? 1 : 0; + nerrors += test_compound_dtype3(file) < 0 ? 1 : 0; + nerrors += test_compound_opaque(file) < 0 ? 1 : 0; + nerrors += test_enum_dtype(file) < 0 ? 1 : 0; + nerrors += test_array_dtype(file) < 0 ? 1 : 0; + nerrors += test_array_dtype2(file) < 0 ? 1 : 0; + nerrors += test_vl_dtype(file) < 0 ? 1 : 0; + nerrors += test_vlstr_dtype(file) < 0 ? 1 : 0; nerrors += test_str_dtype(file) < 0 ? 1 : 0; - nerrors += test_refer_dtype(file) < 0 ? 1 : 0; - nerrors += test_refer_dtype2(file) < 0 ? 1 : 0; - nerrors += test_opaque_dtype(file) < 0 ? 1 : 0; - nerrors += test_bitfield_dtype(file) < 0 ? 1 : 0; + nerrors += test_refer_dtype(file) < 0 ? 1 : 0; + nerrors += test_refer_dtype2(file) < 0 ? 1 : 0; + nerrors += test_opaque_dtype(file) < 0 ? 1 : 0; + nerrors += test_bitfield_dtype(file) < 0 ? 1 : 0; nerrors += test_ninteger() < 0 ? 1 : 0; if(H5Fclose(file) < 0) diff --git a/test/tvlstr.c b/test/tvlstr.c index b93d646..bf37ad7 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -108,12 +108,14 @@ void test_vlstr_free_custom(void *_mem, void *info) static void test_vlstrings_basic(void) { + /* Information to write */ const char *wdata[SPACE1_DIM1]= { "Four score and seven years ago our forefathers brought forth on this continent a new nation,", "conceived in liberty and dedicated to the proposition that all men are created equal.", "Now we are engaged in a great civil war,", "testing whether that nation or any nation so conceived and so dedicated can long endure." - }; /* Information to write */ + }; + char *rdata[SPACE1_DIM1]; /* Information read in */ char *wdata2; hid_t dataspace, dataset2; @@ -822,7 +822,7 @@ error: * 'first_name' in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") static herr_t test_family_opens(char *fname, hid_t fa_pl) { @@ -879,7 +879,7 @@ test_family_opens(char *fname, hid_t fa_pl) error: return -1; } /* end test_family_opens() */ -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") /*------------------------------------------------------------------------- @@ -1103,7 +1103,7 @@ error: * 'newname_individual', etc. in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") static herr_t test_family_compat(void) { @@ -1187,7 +1187,7 @@ error: return -1; } /* end test_family_compat() */ -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") /*------------------------------------------------------------------------- @@ -1326,7 +1326,7 @@ error: * 'sf_name' in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") static herr_t test_multi_opens(char *fname) { @@ -1344,7 +1344,7 @@ test_multi_opens(char *fname) return(fid >= 0 ? FAIL : SUCCEED); } /* end test_multi_opens() */ -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") /*------------------------------------------------------------------------- diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index cf611b7..b086366 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -93,8 +93,9 @@ enum H5TEST_COLL_CHUNK_API {API_NONE=0,API_LINK_HARD, #define MSPACE1_RANK 1 /* Rank of the first dataset in memory */ #define MSPACE1_DIM 27000 /* Dataset size in memory */ #define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ -#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ -#define FSPACE_DIM2 3600 /* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */ +#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ +#define FSPACE_DIM2 3600 +/* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */ #define MSPACE_RANK 2 #define MSPACE_DIM1 9 #define MSPACE_DIM2 3600 diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c index aa3a316..19b450f 100644 --- a/tools/test/perform/sio_engine.c +++ b/tools/test/perform/sio_engine.c @@ -1268,7 +1268,7 @@ done: * 'temp' in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -H5_GCC_DIAG_OFF(format-nonliteral) +H5_GCC_DIAG_OFF("format-nonliteral") static void do_cleanupfile(iotype iot, char *filename) { @@ -1330,5 +1330,5 @@ do_cleanupfile(iotype iot, char *filename) } } } -H5_GCC_DIAG_ON(format-nonliteral) +H5_GCC_DIAG_ON("format-nonliteral") |