Skip to content

Add test for precision conversion with decl_hdf5#672

Open
Yushan-Wang wants to merge 72 commits intopdidev:mainfrom
Yushan-Wang:precision-conversion-with-hdf5
Open

Add test for precision conversion with decl_hdf5#672
Yushan-Wang wants to merge 72 commits intopdidev:mainfrom
Yushan-Wang:precision-conversion-with-hdf5

Conversation

@Yushan-Wang
Copy link
Copy Markdown
Member

@Yushan-Wang Yushan-Wang commented Apr 14, 2026

List of things to check before making a PR

Before merging your code, please check the following:

  • you have added a line describing your changes to the Changelog;
  • you have added unit tests for any new or improved feature;
  • in case you updated dependencies, you have checked pdi/docs/CheckList.md;
  • in case of a change in pdi.h, this same change must be reflected in no-pdi/include/pdi.h;
  • you have checked your code format:
    • you have checked that you respect all conventions specified in CONTRIBUTING.md;
    • you have checked that the indentation and formatting conforms to the .clang-format;
    • you have documented with doxygen any new or changed function / class;
  • you have correctly updated the copyright headers:
    • your institution is in the copyright header of every file you (substantially) modified;
    • you have checked that the end-year of the copyright there is the current one;
  • you have updated the AUTHORS file:
    • you have added yourself to the AUTHORS file;
    • if this is a new contribution, you have added it to the AUTHORS file;
  • you have added everything to the user documentation:
    • any new CMake configuration option;
    • any change in the yaml config;
    • any change to the public or plugin API;
    • any other new or changed user-facing feature;
    • any change to the dependencies;
  • you have correctly linked your MR to one or more issues:
    • your MR solves an identified issue;
    • your commit contain the Fix #issue keyword to autoclose the issue when merged.

@Yushan-Wang Yushan-Wang marked this pull request as ready for review April 14, 2026 11:53
@Yushan-Wang Yushan-Wang force-pushed the precision-conversion-with-hdf5 branch 2 times, most recently from 059513f to 12dff81 Compare April 14, 2026 12:41
@jbigot
Copy link
Copy Markdown
Member

jbigot commented Apr 15, 2026

Do you feel it would be a good candidate to demonstrate the use of #669 ?

jbigot
jbigot previously approved these changes Apr 20, 2026
Copy link
Copy Markdown
Contributor

@jmorice91 jmorice91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look goods for me.
If your input double data is 1.5d0=1.50...0, how to know that the convention between HDF5 and gtest for transformation of double to int is the same?

Have you tested that?

As we use random number, it is a rare event that is arrived.

@Yushan-Wang
Copy link
Copy Markdown
Member Author

look goods for me. If your input double data is 1.5d0=1.50...0, how to know that the convention between HDF5 and gtest for transformation of double to int is the same?

Have you tested that?

As we use random number, it is a rare event that is arrived.

HDF5 truncates floating-point numbers to integers upon precision conversion. So 1.5 would be output as 1. Same for static_cast

@jbigot jbigot force-pushed the main branch 6 times, most recently from c257c27 to ce93f25 Compare April 22, 2026 08:17
@Yushan-Wang Yushan-Wang requested review from jbigot and jmorice91 April 23, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants