Skip to content
Snippets Groups Projects
  1. Jun 13, 2019
  2. Jun 12, 2019
    • Jö Fahlke's avatar
      [!677] Don't pass the cpu flags detected by Vc to the compiler · 19557065
      Jö Fahlke authored
      Merge branch 'avoid-vc-cpu-detection' into 'master'
      
      ref:core/dune-common Vc detects CPU flags based on the name of the CPU. This
      can be a problem in virtualization environment, when the name of the CPU is
      visible, but not all features are enabled in the guest.
      
      Also, enabling all detected features in the the compiler makes it difficult to
      impossible for the user to force his own feature flags, e.g. to cross-build
      generic executables on hosts with many features to be run later on hosts with
      fewer features.
      
      Closes: [docker/ci#9]
      
      WIP:
      
      -   [x] properly test, in particular in the light of [docker/ci!46] being
          applied to the ci images
      -   [x] ansgar [proposed] getting rid of all the Vc_COMPILE_FLAGS, too. Try
          that: [!679] (redifined [!679] as an add-on to this one, so it does not
          stop me from merging this one)
      -   [x] changelog entry (deferred to [#163])
      
      See merge request [!677]
      
        [docker/ci#9]: gitlab.dune-project.org/docker/ci/issues/9
        [docker/ci!46]: gitlab.dune-project.org/docker/ci/merge_requests/46
        [proposed]: docker/ci#9 (comment 56350)
        [!679]: gitlab.dune-project.org/NoneNone/merge_requests/679
        [#163]: gitlab.dune-project.org/NoneNone/issues/163
        [!677]: gitlab.dune-project.org/core/dune-common/merge_requests/677
      
      
      Closes docker/ci#9
      19557065
    • Oliver Sander's avatar
      [!678] Bugfix: The return type of allreduce is int, not void · 7933d8fc
      Oliver Sander authored
      Merge branch 'fix-return-type-of-sequential-allreduce' into 'master'
      
      See merge request [!678]
      
        [!678]: Nonecore/dune-common/merge_requests/678
      7933d8fc
    • Oliver Sander's avatar
    • Jö Fahlke's avatar
      Don't pass the cpu flags detected by Vc to the compiler · c0bbf1a5
      Jö Fahlke authored
      Vc detects CPU flags based on the name of the CPU.  This can be a problem in
      virtualization environment, when the name of the CPU is visible, but not all
      features are enabled in the guest.
      
      Also, enabling all detected features in the the compiler makes it difficult to
      impossible for the user to force his own feature flags, e.g. to cross-build
      generic executables on hosts with many features to be run later on hosts with
      fewer features.
      
      Closes: docker/ci#9
      c0bbf1a5
  3. May 28, 2019
    • Jö Fahlke's avatar
      [!675] Expect `;` after macro · a028eb31
      Jö Fahlke authored
      Merge branch 'fix-macro-not-expecting-semicolon' into 'master'
      
      ref:core/dune-common This avoids certain compiler warnings about unneccessary
      ;. It plays nicer with automatic editor indentation compared to the the
      alternative of dropping the ; from every invocation of the macro (see [!673]
      for that).
      
      Alternative to: [!673]
      
      WIP:
      
      -   [x] Waiting for feedback from @gruenich
      
      See merge request [!675]
      
        [!673]: gitlab.dune-project.org/NoneNone/merge_requests/673
        [!675]: gitlab.dune-project.org/core/dune-common/merge_requests/675
      a028eb31
    • Jö Fahlke's avatar
      [!674] Fix -Wpessimizing-move warning in integersequence test · b6e34ffb
      Jö Fahlke authored
      Merge branch 'fix/move-on-local-object' into 'master'
      
      See merge request [!674]
      
        [!674]: Nonecore/dune-common/merge_requests/674
      b6e34ffb
  4. May 27, 2019
    • Carsten Gräser's avatar
      [!676] [bugfix] Fix default constructor of Std::variant · d8ec8e8d
      Carsten Gräser authored
      Merge branch 'feature/default-constructible-variant' into 'master'
      
      ref:core/dune-common The behaviour of the default constructor
      `std::variant<T0, ...>` is as follows:
      
      -   \(a) If T0 is default constructible, then the variant will hold a
          value-initialized T0 and the index is 0.
      -   \(b) If T0 is not default constructible, then the default constructor does npt
          participate in overload resolution.
      
      In contrast to this until now the following is implemented
      
      -   \(c) The default constructor of Std::variant does alway exist and will
          initialize it with a special invalid state (which is BTW not copyable).
      
      Having (c) instead of (a) especially prevented copying default constructed
      `Std::variant<Std::monostate, ...>` objects.
      
      This patch at least ensures (a) but keeps (c) if T0 is not default
      constructible. The reason for the latter is, that (b) is much harder to fix
      and unlikely to lead to problems.
      
      See merge request [!676]
      
        [!676]: gitlab.dune-project.org/core/dune-common/merge_requests/676
      d8ec8e8d
    • Carsten Gräser's avatar
      Add missing include · 933530a1
      Carsten Gräser authored
      933530a1
    • Carsten Gräser's avatar
      [bugfix] Fix default constructor of Std::variant · 966087b2
      Carsten Gräser authored
      The behaviour of the default constructor `std::variant<T0, ...>` is as follows:
      
      * (a) If `T0` is default constructible, then the `variant` will hold
        a value-initialized `T0` and the index is 0.
      * (b) If `T0` is not default constructible, then the default constructor
        does npt participate in overload resolution.
      
      In contrast to this until now the following is implemented
      
      * (c) The default constructor of `Std::variant` does alway exist
        and will initialize it with a special invalid state (which
        is BTW not copyable).
      
      Having (c) instead of (a) especially prevented copying default
      constructed `Std::variant<Std::monostate, ...>` objects.
      
      This patch at least ensures (a) but keeps (c) if `T0` is not
      default constructible. The reason for the latter is, that (b)
      is much harder to fix and unlikely to lead to problems.
      966087b2
    • Jö Fahlke's avatar
      Expect `;` after macro · 730c5bce
      Jö Fahlke authored
      This avoids certain compiler warnings about unneccessary `;`.  It plays nicer
      with automatic editor indentation compared to the the alternative of dropping
      the `;` from every invocation of the macro (see !673 for that).
      730c5bce
  5. May 26, 2019
  6. May 10, 2019
  7. May 08, 2019
    • Jö Fahlke's avatar
      [!666] Test className() even without demangling · 1cc5fecb
      Jö Fahlke authored
      Merge branch 'classnametest-no-demngling-fallback' into 'master'
      
      ref:core/dune-common Run the classnametest is now run two times:
      
      -   classnametest-demangled: skipped if __cxa_demangle() is missing
      -   classnametest-fallback: an exit-status of 1 (resulting from failed checks
          expecting demangling) is still considered successfull, though anything
          else (e.g. segfault) will fail the test.
      
      Closes: [#160]
      
      See merge request [!666]
      
        [#160]: gitlab.dune-project.org/NoneNone/issues/160
        [!666]: gitlab.dune-project.org/core/dune-common/merge_requests/666
      
      
      Closes #160
      1cc5fecb
    • Jö Fahlke's avatar
      Test className() even without demangling · 561095cf
      Jö Fahlke authored
      Run the classnametest is now run two times:
      - `classnametest-demangled`: skipped if `__cxa_demangle()` is missing
      - `classnametest-fallback`: an exit-status of 1 (resulting from failed checks
        expecting demangling) is still considered successfull, though anything
        else (e.g. segfault) will fail the test.
      561095cf
  8. May 07, 2019
    • Jö Fahlke's avatar
      [!659] Make `className(expr)` return dynamic type · 1594c1a7
      Jö Fahlke authored
      Merge branch 'dynamic-classname' into 'master'
      
      ref:core/dune-common In addition, allow rvalue expr.
      
      Closes: [#158]
      
      WIP:
      
      -   [x] This is somewhat of an interface change. Wait at least until
          2019-05-07 for comments
      -   [x] Test for rvalue expr
      
      See merge request [!659]
      
        [#158]: gitlab.dune-project.org/NoneNone/issues/158
        [!659]: gitlab.dune-project.org/core/dune-common/merge_requests/659
      
      
      Closes #158
      1594c1a7
    • Oliver Sander's avatar
      [!663] add default initialization of reserved vector · bd44c3ab
      Oliver Sander authored
      Merge branch 'issue/non_initialized_reservedvector' into 'master'
      
      ref:core/dune-common
      
      ### Summary
      
      Fixes a warning of maybe not initialized member of ReservedVector
      
      ### Details
      
      A default initialization of a ReservedVector, i.e.
      
          ReservedVector<double,3> vec;
          vec.push_back(1.0);
          vec.back() = 2.0;
      
      might result in a compiler warning about possible use of uninitialized members
      vec.data[0]. This can be fixed with a default constructor and default member
      initializers.
      
      See merge request [!663]
      
        [!663]: gitlab.dune-project.org/core/dune-common/merge_requests/663
      bd44c3ab
    • Carsten Gräser's avatar
      [!664] Allow returning references in Std::visit() · 34304c3e
      Carsten Gräser authored
      Merge branch 'introduce-lfe-variant' into 'master'
      
      ref:core/dune-common Our own fallback implementation of Std::visit is
      currently not compatible with visitors returning lvalues. This is needed for
      the LocalFiniteElementVariant MR in dune-localfunctions. Notice that this also
      avoids an allocation that was used in Std::visit before.
      
      For the record: A further cleanup could optimize Hybrid::switchCase to use a
      real c switch statement, because there's rumors that compiler can optimize
      this much better than an `if ... else {} if...` sequence (current
      implementation) or an array of fuction pointers (another possible visit
      implementation).
      
      See merge request [!664]
      
        [!664]: gitlab.dune-project.org/core/dune-common/merge_requests/664
      34304c3e
  9. May 06, 2019
    • Christoph Grüninger's avatar
      [!657] Deprecate old versions of METIS and ParMETIS · 9c8ff584
      Christoph Grüninger authored
      Merge branch 'feature/deprecate-old-metis-parmetis' into 'master'
      
      See merge request [!657]
      
        [!657]: Nonecore/dune-common/merge_requests/657
      9c8ff584
    • Christoph Grüninger's avatar
      3d05cd41
    • Carsten Gräser's avatar
      [!665] [bugfix] Fix Dune::Hybrid::Impl::Id · 8d8ab5ab
      Carsten Gräser authored
      Merge branch 'bugfix/fix-id' into 'master'
      
      ref:core/dune-common There's a bug in the current implementation of
      Dune::Hybrid::Impl::Id. Trying to do 'perfect forwarding' using
      
            template<class T>
            constexpr decltype(auto) foo()(T&& x) {
              return std::forward<T>(x);
            }
      
      leads to undefined behaviour if you pass an r-value to the function. Then
      decltype(auto) would be deduced to be an r-value reference such that in
      
            auto&& bar = foo(expression());
      
      bar would be bound to a temporary which is no longer alive because there's no
      lifetime prolongation. The correct version is
      
            template<class T>
            constexpr T foo()(T&& x) {
              return std::forward<T>(x);
            }
      
      When passed an r-value of the raw type E then T is deduced to be E such that
      we move the temporary into the new value bar. If we pass an l-value of the raw
      type E, then T is deduced to be either T& or `const T&` such that we properly
      return the reference.
      
      See merge request [!665]
      
        [!665]: gitlab.dune-project.org/core/dune-common/merge_requests/665
      8d8ab5ab
    • Carsten Gräser's avatar
      [bugfix] Fix Dune::Hybrid::Impl::Id · f90c50ee
      Carsten Gräser authored
      There's a bug in the current implementation of `Dune::Hybrid::Impl::Id`.
      Trying to do 'perfect forwarding' using
      
        template<class T>
        constexpr decltype(auto) foo()(T&& x) {
          return std::forward<T>(x);
        }
      
      leads to undefined behaviour if you pass an r-value
      to the function. Then `decltype(auto)` would be
      deduced to be an r-value reference such that in
      
        auto&& bar = foo(expression());
      
      `bar` would be bound to a temporary which is no longer
      alive because there's no lifetime prolongation. The correct
      version is
      
        template<class T>
        constexpr T foo()(T&& x) {
          return std::forward<T>(x);
        }
      
      When passed an r-value of the raw type `E` then `T` is
      deduced to be `E` such that we move the temporary into
      the new value `bar`. If we pass an l-value of the raw
      type `E`, then `T` is deduced to be either `T&` or
      `const T&` such that we properly return the reference.
      f90c50ee
    • Carsten Gräser's avatar
      1ab4d91f
    • Simon Praetorius's avatar
      35197ef0
    • Jö Fahlke's avatar
      [!662] [Simd] Ignore value-initialization issues in vectorclass. · 80aa79bb
      Jö Fahlke authored
      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
      80aa79bb
    • Jö Fahlke's avatar
      [Simd] Ignore value-initialization issues in vectorclass. · d676c3cb
      Jö Fahlke authored
      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
      d676c3cb
  10. Apr 28, 2019
  11. Apr 24, 2019
  12. Apr 23, 2019
  13. Apr 18, 2019
Loading