Skip to content
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

Enforce element types of DASH containers to be trivially copyable #293

Merged
merged 8 commits into from
Feb 22, 2017

Conversation

devreal
Copy link
Member

@devreal devreal commented Feb 20, 2017

Consistently enforce std::is_trivially_copyable on element types of containers (except when using the Cray compiler).
Introduce minimum required compiler version.
Makes GlobPtr trivially copyable after #221 has been resolved.
Introduce dash::Pair which closely resembles std::pair except for being trivially copyable.
Fixes #241

@@ -135,13 +135,16 @@ template<
class PatternT = TilePattern<NumDimensions, ROW_MAJOR, IndexT> >
class Matrix
{
#if !defined(_CRAYC) && !defined(__INTEL_COMPILER)
Copy link
Member

Choose a reason for hiding this comment

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

Intel compilers (tested 16.0 and 17.0) don't allow std::is_trivially_copyable either. Why did you remove this check?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because they do. I just tested with Intel 17.0 and I am sure I also verified 16 back when we discussed #241. Keep in mind that the Intel compiler relies on the GNU-provided STL so you might have to load a newer GCC module (at least I have to do that on our Linux cluster).

Copy link
Member

@fuchsto fuchsto Feb 22, 2017

Choose a reason for hiding this comment

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

Yes, that seems alright.
I actually did test exactly that, but it's apparently specific to our dev server. When reloading gcc after loading the icc module, there is some hickup and the newer version of gcc is not used.

@devreal
Copy link
Member Author

devreal commented Feb 22, 2017

@fuchsto Just checked with Clang 3.8.0, works fine for me. What version did you test with?

How would you check trivial-copyable in a custom type trait? std::is_trivially_copyable relies on the compiler builtin function __is_trivially_copyable...

@fuchsto
Copy link
Member

fuchsto commented Feb 22, 2017

@devreal We could define traits depending on the compiler and its version. If this is just an issue with Cray compilers, it's not worth the effort, of course.

@fuchsto fuchsto merged commit 7a5ce7c into development Feb 22, 2017
@fuchsto fuchsto deleted the bug-241-containertypes branch February 22, 2017 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dash::Matrix doesn't accept struct as template datatype
4 participants