-
Notifications
You must be signed in to change notification settings - Fork 55
Fix AppVeyor 64bit build #1832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AppVeyor 64bit build #1832
Changes from 10 commits
c641507
39af352
4143acb
0636ce5
085ef1c
fa2284e
bcf44d2
65a2ba9
fc8cb3c
f2b5b80
39e6dc2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,7 +160,10 @@ template <typename T> | |
| inline void PatchRecordComponent::store(uint64_t idx, T data) | ||
| { | ||
| Datatype dtype = determineDatatype<T>(); | ||
| if (dtype != getDatatype()) | ||
| if (dtype != getDatatype() && !isSameInteger<T>(getDatatype()) && | ||
| !isSameFloatingPoint<T>(getDatatype()) && | ||
| !isSameComplexFloatingPoint<T>(getDatatype()) && | ||
| !isSameChar<T>(getDatatype())) | ||
|
Comment on lines
162
to
+166
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not urgently needed but sensible.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our /** Comparison for two Datatypes
*
* Besides returning true for the same types, identical implementations on
* some platforms, e.g. if long and long long are the same or double and
* long double will also return true.
*/
inline bool isSame(openPMD::Datatype const d, openPMD::Datatype const e)
{
// exact same type
if (static_cast<int>(d) == static_cast<int>(e))
return true;
bool d_is_vec = isVector(d);
bool e_is_vec = isVector(e);
// same int
bool d_is_int, d_is_sig;
std::tie(d_is_int, d_is_sig) = isInteger(d);
bool e_is_int, e_is_sig;
std::tie(e_is_int, e_is_sig) = isInteger(e);
if (d_is_int && e_is_int && d_is_vec == e_is_vec && d_is_sig == e_is_sig &&
toBits(d) == toBits(e))
return true;
// same float
bool d_is_fp = isFloatingPoint(d);
bool e_is_fp = isFloatingPoint(e);
if (d_is_fp && e_is_fp && d_is_vec == e_is_vec && toBits(d) == toBits(e))
return true;
// same complex floating point
bool d_is_cfp = isComplexFloatingPoint(d);
bool e_is_cfp = isComplexFloatingPoint(e);
if (d_is_cfp && e_is_cfp && d_is_vec == e_is_vec && toBits(d) == toBits(e))
return true;
return false;
}We should try merging your code into that instead of creating a new call
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. --> #1854 |
||
| { | ||
| std::ostringstream oss; | ||
| oss << "Datatypes of patch data (" << dtype << ") and dataset (" | ||
|
|
@@ -187,7 +190,10 @@ template <typename T> | |
| inline void PatchRecordComponent::store(T data) | ||
| { | ||
| Datatype dtype = determineDatatype<T>(); | ||
| if (dtype != getDatatype()) | ||
| if (dtype != getDatatype() && !isSameInteger<T>(getDatatype()) && | ||
| !isSameFloatingPoint<T>(getDatatype()) && | ||
| !isSameComplexFloatingPoint<T>(getDatatype()) && | ||
| !isSameChar<T>(getDatatype())) | ||
| { | ||
| std::ostringstream oss; | ||
| oss << "Datatypes of patch data (" << dtype << ") and dataset (" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.