-
- Downloads
[!662] [Simd] Ignore value-initialization issues in vectorclass.
Merge branch 'simd-ignore-vectorclass-value-initialization-issues' into 'master' ref:core/dune-common Value-initialized Vectorclass simd types are not always initialized. The reason is that vectorclass defines default-constructors for its Simd types with empty body and no member initializers. Value-initialization will see those constructors and invoke default-initialization. As the mask types sometimes just contain an `unsigned short` or similar fundamental data type, default-initializing that does nothing and leaves it inintialized. To make value-initialization work reliably, vectorclass would need to do one of two things: - Make sure the default-constructor is implicitly or explicitly defaulted. That would mean value-initialization would invoke zero-initialization before default-inizialization, which would clear the member - Provide a default initializer when declaring the member, which would then be used when the class does not define an initializer for the member in the default-constructor's member-initializer-list. Since I can't really fix vectorclass, work around this issue by using direct-initialization with an initializer (Simd::Scalar<V>(0)) to initialize simd types. Closes: [extensions/dune-vectorclass#9] See merge request [!662] [extensions/dune-vectorclass#9]: gitlab.dune-project.org/extensions/dune-vectorclass/issues/9 [!662]: gitlab.dune-project.org/core/dune-common/merge_requests/662 Closes extensions/dune-vectorclass#9
No related branches found
No related tags found
Loading
Please register or sign in to comment