Skip to content
Snippets Groups Projects

Remove move semantics and use StdMat as default implementation for all operators

  • Remove move semantics during operator construction
  • Add missing operator() function for consistency
  • Consistently use StdMat as default implementation for all operators
Edited by Jacques Xing

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Jacques Xing
  • Jacques Xing
  • Jacques Xing
  • Jacques Xing changed the description

    changed the description

  • assigned to @ccantwel

  • Jacques Xing added 1 commit

    added 1 commit

    • 92f9a420 - Consistently use StdMat as default implementation for all operators

    Compare with previous version

  • Jacques Xing added 1 commit

    added 1 commit

    • ea4a7527 - Consistently use StdMat as default implementation for all operators (bis)

    Compare with previous version

  • Jacques Xing added 1 commit

    added 1 commit

    Compare with previous version

  • Jacques Xing added 1 commit

    added 1 commit

    • a805b5b8 - Fix operator registration in factory

    Compare with previous version

  • Jacques Xing changed title from Use move semantics consistently to Use move semantics consistently and use StdMat as default implementation for all operators

    changed title from Use move semantics consistently to Use move semantics consistently and use StdMat as default implementation for all operators

  • Jacques Xing changed the description

    changed the description

  • Jacques Xing
  • 7 7 template <>
    8 8 std::string OperatorConjGradImpl<double, ImplStdMat>::className =
    9 9 GetOperatorFactory<double>().RegisterCreatorFunction(
    10 "ConjGrad", OperatorConjGradImpl<double, ImplStdMat>::instantiate, "");
    10 "ConjGradStdMat", OperatorConjGradImpl<double, ImplStdMat>::instantiate,
  • 7 7 template <>
    8 8 std::string OperatorDiagPreconImpl<double, ImplStdMat>::className =
    9 9 GetOperatorFactory<double>().RegisterCreatorFunction(
    10 "DiagPrecon", OperatorDiagPreconImpl<double, ImplStdMat>::instantiate,
    11 "");
    10 "DiagPreconStdMat",
    • This one is arguably a "Global" approach, since it constructs the diagonal preconditioner as a single vector of size equal to the total number of of coefficients in the field.

    • Author Maintainer

      Yes, but it might be more efficiency to simply construct the diagonal preconditioner on the GPU rather than copy it from CPU?

    • Please register or sign in to reply
  • 7 7 template <>
    8 8 std::string OperatorDirBndCondImpl<double, ImplStdMat>::className =
    9 9 GetOperatorFactory<double>().RegisterCreatorFunction(
    10 "DirBndCond", OperatorDirBndCondImpl<double, ImplStdMat>::instantiate,
    11 "");
    10 "DirBndCondStdMat",
  • 7 7 template <>
    8 8 std::string OperatorFwdTransImpl<double, ImplStdMat>::className =
    9 9 GetOperatorFactory<double>().RegisterCreatorFunction(
    10 "FwdTrans", OperatorFwdTransImpl<double, ImplStdMat>::instantiate, "");
    10 "FwdTransStdMat", OperatorFwdTransImpl<double, ImplStdMat>::instantiate,
    • What was the reasoning for choosing StdMat here? From what I can see in the code, it seems to use the default implementation to instantiate the inner operators. I wonder if we should be explicitly choosing the StdMat version of these operators, or instead calling it "Native" or "Host" again?

      Probably allowing us to take the default implementation of the inner operators would be the best, since they can be set to the optimal choice for the architecture/problem. Otherwise we will proliferate a large combination of different FwdTrans implementations.

      An alternative choice is to provide SetConjGradOp, SetPreconOp, SetMassOp and SetIProductWRTBaseOp functions to enable the user to provide these?

      A point for discussion!

    • Please register or sign in to reply
  • 7 7 template <>
    8 8 std::string OperatorConjGradImpl<double, ImplStdMat>::className =
    9 9 GetOperatorFactory<double>().RegisterCreatorFunction(
    10 "ConjGrad", OperatorConjGradImpl<double, ImplStdMat>::instantiate, "");
    10 "ConjGradStdMat", OperatorConjGradImpl<double, ImplStdMat>::instantiate,
    11 "...");
  • 14 14 virtual ~OperatorAssmbScatr() = default;
    15 15
    16 16 OperatorAssmbScatr(const MultiRegions::ExpListSharedPtr &expansionList)
    17 : Operator<TData>(expansionList)
    17 : Operator<TData>(std::move(expansionList))
  • Jacques Xing added 8 commits

    added 8 commits

    • a805b5b8...1ca3d18b - 2 commits from branch nektar:master
    • 49d85bf1 - Use move semantics consistently
    • dbce272b - Clang-format
    • a3050461 - Consistently use StdMat as default implementation for all operators
    • c99296a7 - Consistently use StdMat as default implementation for all operators (bis)
    • 6048fff3 - Clang-format
    • db526ab3 - Fix operator registration in factory

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading