Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 13, 2024
1 parent 7f8cbf6 commit e33816a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
25 changes: 11 additions & 14 deletions HDF5Examples/HFCXX/H5D/compound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ main(void)

// Tell HighFive how to create the HDF5 datatype for this base type by
// using the HIGHFIVE_REGISTER_TYPE macro
CompoundType create_compound_s1_t() {
return {{"a", create_datatype<int>()},
{"b", create_datatype<float>()},
{"c", create_datatype<double>()}};
CompoundType create_compound_s1_t()
{
return {
{"a", create_datatype<int>()}, {"b", create_datatype<float>()}, {"c", create_datatype<double>()}};
}
HIGHFIVE_REGISTER_TYPE(s1_t, create_compound_s1_t)

Expand All @@ -56,9 +56,9 @@ main(void)

// Tell HighFive how to create the HDF5 datatype for this base type by
// using the HIGHFIVE_REGISTER_TYPE macro
CompoundType create_compound_s2_t() {
return {{"c", create_datatype<float>()},
{"a", create_datatype<int>()}};
CompoundType create_compound_s2_t()
{
return {{"c", create_datatype<float>()}, {"a", create_datatype<int>()}};
}
HIGHFIVE_REGISTER_TYPE(s2_t, create_compound_s2_t)

Expand All @@ -76,13 +76,9 @@ main(void)

// Initialize the data
std::vector<s1_t> data;
int i;
int i;
for (i = 0; i < LENGTH; i++) {
data.push_back({
i,
i * i,
1. / (i + 1)
});
data.push_back({i, i * i, 1. / (i + 1)});
}

// Create the dataset
Expand Down Expand Up @@ -140,7 +136,8 @@ main(void)
for (i = 0; i < LENGTH; i++)
std::cout << s3[i] << " ";
std::cout << endl;
} catch (const Exception& err) {
}
catch (const Exception &err) {
// catch and print any HDF5 error
std::cerr << err.what() << std::endl;
}
Expand Down
4 changes: 2 additions & 2 deletions HDF5Examples/HFCXX/H5D/create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ main(void)

// write it
dataset.write(data);
}
catch (const Exception& err) {
}
catch (const Exception &err) {
// catch and print any HDF5 error
std::cerr << err.what() << std::endl;
return -1;
Expand Down
12 changes: 6 additions & 6 deletions HDF5Examples/HFCXX/H5D/readdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ main(void)
/*
* Get order of datatype and print message if it's a little endian.
*/
//H5std_string order_string;
// H5std_string order_string;
//(void)intype.getOrder(order_string);
//std::cout << order_string << std::endl;
// std::cout << order_string << std::endl;

// Get size of the data element stored in file and print it.
size_t size = intype.getSize();
Expand All @@ -85,9 +85,9 @@ main(void)

// Get the dimension size of each dimension in the dataspace and
// display them.
auto dimss_out = dspace.getDimensions()
std::cout << "rank " << rank << ", dimensions " << (unsigned long)(dims_out[0]) << " x "
<< (unsigned long)(dims_out[1]) << std::endl;
auto dimss_out = dspace.getDimensions() std::cout << "rank " << rank << ", dimensions "
<< (unsigned long)(dims_out[0]) << " x "
<< (unsigned long)(dims_out[1]) << std::endl;

/*
* Define hyperslab in the dataset; implicitly giving strike and
Expand Down Expand Up @@ -152,7 +152,7 @@ main(void)
* 0 0 0 0 0 0 0
*/
}
catch (const Exception& err) {
catch (const Exception &err) {
// catch and print any HDF5 error
std::cerr << err.what() << std::endl;
return -1;
Expand Down

0 comments on commit e33816a

Please sign in to comment.