Skip to content

SerialTest: MSVC long double read#184

Merged
ax3l merged 2 commits intoopenPMD:devfrom
ax3l:fix-msvcReadLongDouble
Sep 13, 2018
Merged

SerialTest: MSVC long double read#184
ax3l merged 2 commits intoopenPMD:devfrom
ax3l:fix-msvcReadLongDouble

Conversation

@ax3l
Copy link
Member

@ax3l ax3l commented May 19, 2018

So far this does only enable the read of long double attributes on MSVC again. Demonstrates Fix #179.

Let's see if we can figure out the reason behind it. Use getCast to read back a long double on Windows which is identical to a double. Since both are unique types, we have to check if they are identical which is exactly what getCast does, see #337.

In the future, we should integrate getCast into auxiliary::Variant::get<>().

Enable the read of `long double` attributes on MSVC again.
When accessing `Attribute`s of `long double` on MSVC, the
implementation of it is the same as `double`. It will therefore
round-trip as `double` (since we match the first, "smallest" type
in-order). But since the implementations are the same, it's
perfectly castable (both types implement 64bit float precision).
@ax3l ax3l changed the title [WIP] SerialTest: MSVC long double read SerialTest: MSVC long double read Sep 12, 2018
@ax3l ax3l requested a review from anokfireball September 12, 2018 16:11
Copy link
Member

@anokfireball anokfireball left a comment

Choose a reason for hiding this comment

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

LGTM

@ax3l ax3l merged commit 751b952 into openPMD:dev Sep 13, 2018
@ax3l ax3l deleted the fix-msvcReadLongDouble branch September 13, 2018 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug machine/system machine & HPC system specific issues tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants