From 6b9f11d7a656504226632c59b42b6b2f7ec52453 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Sat, 9 May 2020 12:11:04 -0500 Subject: Whitespace cleanup compared to develop --- bin/batch/ctestP.sl.in.cmake | 2 +- bin/h5cc.in | 24 ++++++++++++------------ c++/Makefile.am | 2 +- c++/examples/h5tutr_cmprss.cpp | 16 ++++++++-------- c++/examples/h5tutr_crtatt.cpp | 10 +++++----- c++/examples/h5tutr_crtdat.cpp | 4 ++-- c++/examples/h5tutr_crtgrp.cpp | 6 +++--- c++/examples/h5tutr_crtgrpar.cpp | 14 +++++++------- c++/examples/h5tutr_crtgrpd.cpp | 12 ++++++------ c++/examples/h5tutr_extend.cpp | 28 ++++++++++++++-------------- c++/examples/h5tutr_rdwt.cpp | 4 ++-- c++/examples/h5tutr_subset.cpp | 24 ++++++++++++------------ c++/examples/run-c++-ex.sh.in | 2 +- 13 files changed, 74 insertions(+), 74 deletions(-) diff --git a/bin/batch/ctestP.sl.in.cmake b/bin/batch/ctestP.sl.in.cmake index 6399de7..1069fa9 100644 --- a/bin/batch/ctestP.sl.in.cmake +++ b/bin/batch/ctestP.sl.in.cmake @@ -10,5 +10,5 @@ cd @HDF5_BINARY_DIR@ ctest . -R MPI_TEST_ -C Release -T test >& ctestP.out -echo "Done running ctestP.sl" +echo "Done running ctestP.sl" diff --git a/bin/h5cc.in b/bin/h5cc.in index d6b7a12..62a0884 100644 --- a/bin/h5cc.in +++ b/bin/h5cc.in @@ -83,10 +83,10 @@ CLINKERBASE="@CC@" # CFLAGS, CPPFLAGS and LDFLAGS are reserved for use by the script user. # FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS. -# User's CPPFLAGS and CFLAGS come after their H5BLD counterparts. User's -# LDFLAGS come just before clibpath, user's LIBS come after $link_objs and -# before the hdf5 libraries in $link_args, followed by any external library -# paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in +# User's CPPFLAGS and CFLAGS come after their H5BLD counterparts. User's +# LDFLAGS come just before clibpath, user's LIBS come after $link_objs and +# before the hdf5 libraries in $link_args, followed by any external library +# paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in # from the hdf5 build. The order of the flags is intended to give precedence # to the user's flags. H5BLD_CFLAGS="@AM_CFLAGS@ @CFLAGS@" @@ -102,9 +102,9 @@ LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}" LIBS="${HDF5_LIBS:-$LIBSBASE}" # If a static library is available, the default will be to use it. If the only -# available library is shared, it will be used by default. The user can +# available library is shared, it will be used by default. The user can # override either default, although choosing an unavailable library will result -# in link errors. +# in link errors. STATIC_AVAILABLE="@enable_static@" if test "${STATIC_AVAILABLE}" = "yes"; then USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}" @@ -140,7 +140,7 @@ usage() { echo " HDF5_CC - use a different C compiler" echo " HDF5_CLINKER - use a different linker" echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library" - echo " [default: no except when built with only" + echo " [default: no except when built with only" echo " shared libraries]" echo " " echo " You can also add or change paths and flags to the compile line using" @@ -318,7 +318,7 @@ fi if test "x$do_link" = "xyes"; then shared_link="" -# conditionnaly link with the hl library +# conditionnaly link with the hl library if test "X$HL" = "Xhl"; then libraries=" $libraries -lhdf5_hl -lhdf5 " else @@ -379,10 +379,10 @@ if test "x$do_link" = "xyes"; then # module. It's okay if they're included twice in the compile line. link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS" - # User's CPPFLAGS and CFLAGS come after their H5BLD counterparts. User's - # LDFLAGS come just before clibpath, user's LIBS come after $link_objs and - # before the hdf5 libraries in $link_args, followed by any external library - # paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in + # User's CPPFLAGS and CFLAGS come after their H5BLD counterparts. User's + # LDFLAGS come just before clibpath, user's LIBS come after $link_objs and + # before the hdf5 libraries in $link_args, followed by any external library + # paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in # from the hdf5 build. The order of the flags is intended to give precedence # to the user's flags. $SHOW $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link diff --git a/c++/Makefile.am b/c++/Makefile.am index 319ce6e..6bd682d 100644 --- a/c++/Makefile.am +++ b/c++/Makefile.am @@ -14,7 +14,7 @@ ## Run automake to generate a Makefile.in from this file. # # Top-level HDF5-C++ Makefile(.in) -# +# include $(top_srcdir)/config/commence.am diff --git a/c++/examples/h5tutr_cmprss.cpp b/c++/examples/h5tutr_cmprss.cpp index 9531bdd..e3cf978 100644 --- a/c++/examples/h5tutr_cmprss.cpp +++ b/c++/examples/h5tutr_cmprss.cpp @@ -42,7 +42,7 @@ int main (void) // handle the errors appropriately Exception::dontPrint(); - // Create a new file using the default property lists. + // Create a new file using the default property lists. H5File file(FILE_NAME, H5F_ACC_TRUNC); // Create the data space for the dataset. @@ -60,9 +60,9 @@ int main (void) // unsigned szip_options_mask = H5_SZIP_NN_OPTION_MASK; // unsigned szip_pixels_per_block = 16; // plist->setSzip(szip_options_mask, szip_pixels_per_block); - - // Create the dataset. - DataSet *dataset = new DataSet(file.createDataSet( DATASET_NAME, + + // Create the dataset. + DataSet *dataset = new DataSet(file.createDataSet( DATASET_NAME, PredType::STD_I32BE, *dataspace, *plist) ); for (i = 0; i< DIM0; i++) @@ -79,10 +79,10 @@ int main (void) file.close(); // ----------------------------------------------- - // Re-open the file and dataset, retrieve filter + // Re-open the file and dataset, retrieve filter // information for dataset and read the data back. // ----------------------------------------------- - + int rbuf[DIM0][DIM1]; int numfilt; size_t nelmts={1}, namelen={1}; @@ -113,7 +113,7 @@ int main (void) cout << "H5Z_FILTER_DEFLATE" << endl; break; case H5Z_FILTER_SZIP: - cout << "H5Z_FILTER_SZIP" << endl; + cout << "H5Z_FILTER_SZIP" << endl; break; default: cout << "Other filter type included." << endl; @@ -123,7 +123,7 @@ int main (void) // Read data. dataset->read(rbuf, PredType::NATIVE_INT); - delete plist; + delete plist; delete dataset; file.close(); // can be skipped diff --git a/c++/examples/h5tutr_crtatt.cpp b/c++/examples/h5tutr_crtatt.cpp index fcf6c27..409bd62 100644 --- a/c++/examples/h5tutr_crtatt.cpp +++ b/c++/examples/h5tutr_crtatt.cpp @@ -31,7 +31,7 @@ int main (void) { int attr_data[2] = { 100, 200}; hsize_t dims[1] = { DIM1 }; - + // Try block to detect exceptions raised by any of the calls inside it try @@ -47,11 +47,11 @@ int main (void) // Create the data space for the attribute. DataSpace attr_dataspace = DataSpace (1, dims ); - // Create a dataset attribute. - Attribute attribute = dataset.createAttribute( ATTR_NAME, PredType::STD_I32BE, + // Create a dataset attribute. + Attribute attribute = dataset.createAttribute( ATTR_NAME, PredType::STD_I32BE, attr_dataspace); - - // Write the attribute data. + + // Write the attribute data. attribute.write( PredType::NATIVE_INT, attr_data); } // end of try block diff --git a/c++/examples/h5tutr_crtdat.cpp b/c++/examples/h5tutr_crtdat.cpp index 985f6ac..3257223 100644 --- a/c++/examples/h5tutr_crtdat.cpp +++ b/c++/examples/h5tutr_crtdat.cpp @@ -37,7 +37,7 @@ int main (void) // handle the errors appropriately Exception::dontPrint(); - // Create a new file using the default property lists. + // Create a new file using the default property lists. H5File file(FILE_NAME, H5F_ACC_TRUNC); // Create the data space for the dataset. @@ -46,7 +46,7 @@ int main (void) dims[1] = NY; DataSpace dataspace(RANK, dims); - // Create the dataset. + // Create the dataset. DataSet dataset = file.createDataSet(DATASET_NAME, PredType::STD_I32BE, dataspace); } // end of try block diff --git a/c++/examples/h5tutr_crtgrp.cpp b/c++/examples/h5tutr_crtgrp.cpp index e35cb46..43af08a 100644 --- a/c++/examples/h5tutr_crtgrp.cpp +++ b/c++/examples/h5tutr_crtgrp.cpp @@ -37,12 +37,12 @@ int main(void) // Create a new file using default property lists. H5File file(FILE_NAME, H5F_ACC_TRUNC); - + // Create a group named "/MygGroup" in the file Group group(file.createGroup("/MyGroup")); // File and group will be closed as their instances go out of scope. - + } // end of try block // catch failure caused by the H5File operations @@ -57,6 +57,6 @@ int main(void) error.printErrorStack(); return -1; } - + return 0; } diff --git a/c++/examples/h5tutr_crtgrpar.cpp b/c++/examples/h5tutr_crtgrpar.cpp index 76ec9e5..15cf1df 100644 --- a/c++/examples/h5tutr_crtgrpar.cpp +++ b/c++/examples/h5tutr_crtgrpar.cpp @@ -32,7 +32,7 @@ int main(void) // Try block to detect exceptions raised by any of the calls inside it try { - + // Turn off the auto-printing when failure occurs so that we can // handle the errors appropriately. @@ -43,26 +43,26 @@ int main(void) H5File file(FILE_NAME, H5F_ACC_TRUNC); // Create group "MyGroup" in the root group using an absolute name. - + Group group1(file.createGroup( "/MyGroup")); - + // Create group "Group_A" in group "MyGroup" using an // absolute name. - Group group2(file.createGroup("/MyGroup/Group_A")); + Group group2(file.createGroup("/MyGroup/Group_A")); // Create group "Group_B" in group "MyGroup" using a // relative name. - + Group group3(group1.createGroup ("Group_B")); - + // Close the groups and file. group1.close(); group2.close(); group3.close(); file.close(); - + } // end of try block // catch failure caused by the File operations diff --git a/c++/examples/h5tutr_crtgrpd.cpp b/c++/examples/h5tutr_crtgrpd.cpp index e3bb1b1..c28b666 100644 --- a/c++/examples/h5tutr_crtgrpd.cpp +++ b/c++/examples/h5tutr_crtgrpd.cpp @@ -45,12 +45,12 @@ int main(void) // handle the errors appropriately Exception::dontPrint(); - // Initialize the first dataset. + // Initialize the first dataset. for (i = 0; i < D1DIM1; i++) for (j = 0; j < D1DIM2; j++) dset1_data[i][j] = j + 1; - // Initialize the second dataset. + // Initialize the second dataset. for (i = 0; i < D2DIM1; i++) for (j = 0; j < D2DIM2; j++) dset2_data[i][j] = j + 1; @@ -69,7 +69,7 @@ int main(void) // Create the dataset in group "MyGroup". Same note as for the // dataspace above. - DataSet *dataset = new DataSet (file.createDataSet(DATASET_NAME1, + DataSet *dataset = new DataSet (file.createDataSet(DATASET_NAME1, PredType::STD_I32BE, *dataspace)); // Write the data to the dataset using default memory space, file @@ -89,7 +89,7 @@ int main(void) Group group(file.openGroup("/MyGroup/Group_A")); // Create the second dataset in group "Group_A". - dataset = new DataSet (group.createDataSet(DATASET_NAME2, + dataset = new DataSet (group.createDataSet(DATASET_NAME2, PredType::STD_I32BE, *dataspace)); // Write the data to the dataset using default memory space, file @@ -100,7 +100,7 @@ int main(void) delete dataspace; delete dataset; group.close(); - + } // end of try block // catch failure caused by the H5File operations @@ -129,6 +129,6 @@ int main(void) error.printErrorStack(); return -1; } - + return 0; } diff --git a/c++/examples/h5tutr_extend.cpp b/c++/examples/h5tutr_extend.cpp index b6927ea..94e9acf 100644 --- a/c++/examples/h5tutr_extend.cpp +++ b/c++/examples/h5tutr_extend.cpp @@ -30,17 +30,17 @@ const H5std_string DATASETNAME("ExtendibleArray"); int main (void) { hsize_t dims[2] = {3,3}; // dataset dimensions at creation - hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; hsize_t chunk_dims[2] ={2, 5}; - int data[3][3] = { {1, 1, 1}, // data to write + int data[3][3] = { {1, 1, 1}, // data to write {1, 1, 1}, {1, 1, 1} }; - // Variables used in extending and writing to the extended portion of dataset + // Variables used in extending and writing to the extended portion of dataset hsize_t size[2]; hsize_t offset[2]; - hsize_t dimsext[2] = {7, 3}; // extend dimensions + hsize_t dimsext[2] = {7, 3}; // extend dimensions int dataext[7][3] = { {2, 3, 4}, {2, 3, 4}, {2, 3, 4}, @@ -56,7 +56,7 @@ int main (void) // handle the errors appropriately Exception::dontPrint(); - // Create a new file using the default property lists. + // Create a new file using the default property lists. H5File file(FILE_NAME, H5F_ACC_TRUNC); // Create the data space for the dataset. Note the use of pointer @@ -70,23 +70,23 @@ int main (void) prop.setChunk(2, chunk_dims); // Create the chunked dataset. Note the use of pointer. - DataSet *dataset = new DataSet(file.createDataSet( DATASETNAME, + DataSet *dataset = new DataSet(file.createDataSet( DATASETNAME, PredType::STD_I32BE, *dataspace, prop) ); - + // Write data to dataset. dataset->write(data, PredType::NATIVE_INT); // Extend the dataset. Dataset becomes 10 x 3. size[0] = dims[0] + dimsext[0]; size[1] = dims[1]; - dataset->extend(size); + dataset->extend(size); // Select a hyperslab in extended portion of the dataset. DataSpace *filespace = new DataSpace(dataset->getSpace ()); offset[0] = 3; offset[1] = 0; filespace->selectHyperslab(H5S_SELECT_SET, dimsext, offset); - + // Define memory space. DataSpace *memspace = new DataSpace(2, dimsext, NULL); @@ -101,9 +101,9 @@ int main (void) delete dataset; file.close(); - // --------------------------------------- + // --------------------------------------- // Re-open the file and read the data back - // --------------------------------------- + // --------------------------------------- int rdata[10][3]; int i,j, rank, rank_chunk; @@ -111,7 +111,7 @@ int main (void) // Open the file and dataset. file.openFile(FILE_NAME, H5F_ACC_RDONLY); - dataset = new DataSet(file.openDataSet( DATASETNAME)); + dataset = new DataSet(file.openDataSet( DATASETNAME)); // Get the dataset's dataspace and creation property list. filespace = new DataSpace(dataset->getSpace()); @@ -127,7 +127,7 @@ int main (void) memspace = new DataSpace(rank, dimsr, NULL); dataset->read(rdata, PredType::NATIVE_INT, *memspace, *filespace); - + cout << endl; for (j = 0; j < dimsr[0]; j++) { for (i = 0; i < dimsr[1]; i++) @@ -141,7 +141,7 @@ int main (void) delete memspace; delete dataset; file.close(); - + } // end of try block // catch failure caused by the H5File operations diff --git a/c++/examples/h5tutr_rdwt.cpp b/c++/examples/h5tutr_rdwt.cpp index f17e6a5..e9b76ad 100644 --- a/c++/examples/h5tutr_rdwt.cpp +++ b/c++/examples/h5tutr_rdwt.cpp @@ -28,9 +28,9 @@ const int DIM1 = 6; int main (void) { - + // Data initialization. - + int i, j; int data[DIM0][DIM1]; // buffer for data to write diff --git a/c++/examples/h5tutr_subset.cpp b/c++/examples/h5tutr_subset.cpp index 0747880..f7d0513 100644 --- a/c++/examples/h5tutr_subset.cpp +++ b/c++/examples/h5tutr_subset.cpp @@ -46,19 +46,19 @@ int main (void) Exception::dontPrint(); // --------------------------------------------------- - // Create a new file using the default property lists. - // Then create a dataset and write data to it. + // Create a new file using the default property lists. + // Then create a dataset and write data to it. // Close the file and dataset. // --------------------------------------------------- - + H5File file(FILE_NAME, H5F_ACC_TRUNC); - hsize_t dims[2]; + hsize_t dims[2]; dims[0] = DIM0; dims[1] = DIM1; DataSpace dataspace = DataSpace (RANK, dims); - DataSet dataset(file.createDataSet( DATASET_NAME, + DataSet dataset(file.createDataSet( DATASET_NAME, PredType::STD_I32BE, dataspace) ); @@ -94,7 +94,7 @@ int main (void) file.openFile(FILE_NAME, H5F_ACC_RDWR); dataset = file.openDataSet(DATASET_NAME); - // Specify size and shape of subset to write. + // Specify size and shape of subset to write. offset[0] = 1; offset[1] = 2; @@ -107,7 +107,7 @@ int main (void) block[0] = 1; block[1] = 1; - + // Define Memory Dataspace. Get file dataspace and select // a subset from the file dataspace. @@ -117,7 +117,7 @@ int main (void) DataSpace memspace(RANK, dimsm, NULL); dataspace = dataset.getSpace(); - dataspace.selectHyperslab(H5S_SELECT_SET, count, offset, stride, block); + dataspace.selectHyperslab(H5S_SELECT_SET, count, offset, stride, block); // Write a subset of data to the dataset, then read the // entire dataset back from the file. @@ -127,15 +127,15 @@ int main (void) for (j = 0; j < DIM0_SUB; j++) { for (i = 0; i < DIM1_SUB; i++) sdata[j][i] = 5; - } - + } + dataset.write(sdata, PredType::NATIVE_INT, memspace, dataspace); dataset.read(rdata, PredType::NATIVE_INT); - + cout << endl << "Data in File after Subset is Written:" << endl; for (i = 0; i < DIM0; i++) { - for (j = 0; j < DIM1; j++) + for (j = 0; j < DIM1; j++) cout << " " << rdata[i][j]; cout << endl; } diff --git a/c++/examples/run-c++-ex.sh.in b/c++/examples/run-c++-ex.sh.in index 03e1eac..7ff8506 100644 --- a/c++/examples/run-c++-ex.sh.in +++ b/c++/examples/run-c++-ex.sh.in @@ -141,5 +141,5 @@ rm *.o rm *.h5 echo -exit $EXIT_VALUE +exit $EXIT_VALUE -- cgit v0.12