summaryrefslogtreecommitdiffstats
path: root/c++/examples/readdata.cpp
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-09-18 17:11:12 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-09-18 17:11:12 (GMT)
commit6f34503a5a93ae1ba97d35475643fac1ef70447e (patch)
treebf98891ae44f410775363d04557d6ab6a8494584 /c++/examples/readdata.cpp
parent4775b6a3d9f6cd9be4865897d7ab8301222a076b (diff)
downloadhdf5-6f34503a5a93ae1ba97d35475643fac1ef70447e.zip
hdf5-6f34503a5a93ae1ba97d35475643fac1ef70447e.tar.gz
hdf5-6f34503a5a93ae1ba97d35475643fac1ef70447e.tar.bz2
Whitespace cleanup
Diffstat (limited to 'c++/examples/readdata.cpp')
-rw-r--r--c++/examples/readdata.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/c++/examples/readdata.cpp b/c++/examples/readdata.cpp
index 5a2f3bc..3df8191 100644
--- a/c++/examples/readdata.cpp
+++ b/c++/examples/readdata.cpp
@@ -31,9 +31,9 @@ using namespace H5;
const H5std_string FILE_NAME( "SDS.h5" );
const H5std_string DATASET_NAME( "IntArray" );
-const int NX_SUB = 3; // hyperslab dimensions
+const int NX_SUB = 3; // hyperslab dimensions
const int NY_SUB = 4;
-const int NX = 7; // output buffer dimensions
+const int NX = 7; // output buffer dimensions
const int NY = 7;
const int NZ = 3;
const int RANK_OUT = 3;
@@ -49,8 +49,8 @@ int main (void)
{
for (i = 0; i < NY; i++)
{
- for (k = 0; k < NZ ; k++)
- data_out[j][i][k] = 0;
+ for (k = 0; k < NZ ; k++)
+ data_out[j][i][k] = 0;
}
}
@@ -81,19 +81,19 @@ int main (void)
*/
if( type_class == H5T_INTEGER )
{
- cout << "Data set has INTEGER type" << endl;
+ cout << "Data set has INTEGER type" << endl;
/*
- * Get the integer datatype
+ * Get the integer datatype
*/
- IntType intype = dataset.getIntType();
+ IntType intype = dataset.getIntType();
/*
* Get order of datatype and print message if it's a little endian.
*/
- H5std_string order_string;
+ H5std_string order_string;
H5T_order_t order = intype.getOrder( order_string );
- cout << order_string << endl;
+ cout << order_string << endl;
/*
* Get size of the data element stored in file and print it.
@@ -119,15 +119,15 @@ int main (void)
hsize_t dims_out[2];
int ndims = dataspace.getSimpleExtentDims( dims_out, NULL);
cout << "rank " << rank << ", dimensions " <<
- (unsigned long)(dims_out[0]) << " x " <<
- (unsigned long)(dims_out[1]) << endl;
+ (unsigned long)(dims_out[0]) << " x " <<
+ (unsigned long)(dims_out[1]) << endl;
/*
* Define hyperslab in the dataset; implicitly giving strike and
* block NULL.
*/
- hsize_t offset[2]; // hyperslab offset in the file
- hsize_t count[2]; // size of the hyperslab in the file
+ hsize_t offset[2]; // hyperslab offset in the file
+ hsize_t count[2]; // size of the hyperslab in the file
offset[0] = 1;
offset[1] = 2;
count[0] = NX_SUB;
@@ -146,8 +146,8 @@ int main (void)
/*
* Define memory hyperslab.
*/
- hsize_t offset_out[3]; // hyperslab offset in memory
- hsize_t count_out[3]; // size of the hyperslab in memory
+ hsize_t offset_out[3]; // hyperslab offset in memory
+ hsize_t count_out[3]; // size of the hyperslab in memory
offset_out[0] = 3;
offset_out[1] = 0;
offset_out[2] = 0;
@@ -164,9 +164,9 @@ int main (void)
for (j = 0; j < NX; j++)
{
- for (i = 0; i < NY; i++)
- cout << data_out[j][i][0] << " ";
- cout << endl;
+ for (i = 0; i < NY; i++)
+ cout << data_out[j][i][0] << " ";
+ cout << endl;
}
/*
* 0 0 0 0 0 0 0