diff --git a/include/tvm/graph/internal/Log.h b/include/tvm/graph/internal/Log.h index d9a76d2f7..f4090e058 100644 --- a/include/tvm/graph/internal/Log.h +++ b/include/tvm/graph/internal/Log.h @@ -29,7 +29,7 @@ class Inputs; * members to compare. */ template -bool lexLess(const ObjType & l, const ObjType & r, MemberType ObjType::*member, Args &&... args) +bool lexLess(const ObjType & l, const ObjType & r, MemberType ObjType::* member, Args &&... args) { return (l.*member) < (r.*member) || ((l.*member == r.*member) && lexLess(l, r, std::forward(args)...)); } @@ -38,21 +38,21 @@ bool lexLess(const ObjType & l, const ObjType & r, MemberType ObjType::*member, * to compare. */ template -bool eq(const ObjType & l, const ObjType & r, MemberType ObjType::*member, Args &&... args) +bool eq(const ObjType & l, const ObjType & r, MemberType ObjType::* member, Args &&... args) { return (l.*member == r.*member) && eq(l, r, std::forward(args)...); } /** End of recursion. */ template -bool lexLess(const ObjType & l, const ObjType & r, MemberType ObjType::*member) +bool lexLess(const ObjType & l, const ObjType & r, MemberType ObjType::* member) { return (l.*member) < (r.*member); } /** End of recursion. */ template -bool eq(const ObjType & l, const ObjType & r, MemberType ObjType::*member) +bool eq(const ObjType & l, const ObjType & r, MemberType ObjType::* member) { return (l.*member) == (r.*member); } diff --git a/include/tvm/scheme/HierarchicalLeastSquares.h b/include/tvm/scheme/HierarchicalLeastSquares.h index dace5ea6c..1b67832bb 100644 --- a/include/tvm/scheme/HierarchicalLeastSquares.h +++ b/include/tvm/scheme/HierarchicalLeastSquares.h @@ -14,12 +14,9 @@ namespace tvm namespace scheme { /** A set of options for HierarchicalLeastSquares. */ -class TVM_DLLAPI HierarchicalLeastSquaresOptions -{ - /** If \a true, a damping task is added after the last level - */ - TVM_ADD_NON_DEFAULT_OPTION(autoDamping, false) -}; +class TVM_DLLAPI HierarchicalLeastSquaresOptions{/** If \a true, a damping task is added after the last level + */ + TVM_ADD_NON_DEFAULT_OPTION(autoDamping, false)}; /** This class implements the hierarchical least square scheme. */ class TVM_DLLAPI HierarchicalLeastSquares : public abstract::LinearResolutionScheme diff --git a/include/tvm/scheme/WeightedLeastSquares.h b/include/tvm/scheme/WeightedLeastSquares.h index ab44c3e60..66161d003 100644 --- a/include/tvm/scheme/WeightedLeastSquares.h +++ b/include/tvm/scheme/WeightedLeastSquares.h @@ -14,18 +14,16 @@ namespace tvm namespace scheme { /** A set of options for WeightedLeastSquares. */ -class TVM_DLLAPI WeightedLeastSquaresOptions -{ - /** If \a true, a damping task is added when no constraint with level >=1 has been - * given. - */ - TVM_ADD_NON_DEFAULT_OPTION(autoDamping, false) - /** The factor to emulate priority for priority levels >= 1. - * E.g. if a task T1 has a weight w1 and priority 1, and a task T2 has a weight w2 and - * priority 2, the weighted least-squares problem will be assembled with weights - * \p scalarizationWeight * w1 and w2 for T1 and T2 respectively. */ - TVM_ADD_NON_DEFAULT_OPTION(scalarizationWeight, 1000.) -}; +class TVM_DLLAPI WeightedLeastSquaresOptions{ + /** If \a true, a damping task is added when no constraint with level >=1 has been + * given. + */ + TVM_ADD_NON_DEFAULT_OPTION(autoDamping, false) + /** The factor to emulate priority for priority levels >= 1. + * E.g. if a task T1 has a weight w1 and priority 1, and a task T2 has a weight w2 and + * priority 2, the weighted least-squares problem will be assembled with weights + * \p scalarizationWeight * w1 and w2 for T1 and T2 respectively. */ + TVM_ADD_NON_DEFAULT_OPTION(scalarizationWeight, 1000.)}; /** This class implements the classic weighted least square scheme. */ class TVM_DLLAPI WeightedLeastSquares : public abstract::LinearResolutionScheme diff --git a/include/tvm/scheme/internal/CompiledAssignment.h b/include/tvm/scheme/internal/CompiledAssignment.h index f411fde36..f5957ad5a 100644 --- a/include/tvm/scheme/internal/CompiledAssignment.h +++ b/include/tvm/scheme/internal/CompiledAssignment.h @@ -360,7 +360,7 @@ class WeightMultBase public: static const bool useArg = false; - WeightMultBase(NoArg){}; + WeightMultBase(NoArg) {}; template const T & applyWeightMult(const T & M) @@ -376,7 +376,7 @@ class WeightMultBase public: static const bool useArg = false; - WeightMultBase(NoArg){}; + WeightMultBase(NoArg) {}; double applyWeightMult(const double & M) { return -M; } @@ -408,7 +408,7 @@ template<> class WeightMultBase { public: - WeightMultBase(const double & s) : s_(s){}; + WeightMultBase(const double & s) : s_(s) {}; template decltype(double() * std::declval()) applyWeightMult(const T & M) diff --git a/tests/CompiledAssignmentTest.cpp b/tests/CompiledAssignmentTest.cpp index 2212a2af2..c390d86a0 100644 --- a/tests/CompiledAssignmentTest.cpp +++ b/tests/CompiledAssignmentTest.cpp @@ -197,8 +197,8 @@ struct call_impl { static CompiledAssignmentWrapper call(Tuple && t) { - return call_impl::call( - std::forward(t)); + return call_impl < MatrixType, A, W, M, F, Tuple, Total == 1 + sizeof...(N), Total, N..., + sizeof...(N) > ::call(std::forward(t)); } }; @@ -220,8 +220,8 @@ template call(Tuple && t) { typedef typename std::decay::type ttype; - return detail::call_impl::value, - std::tuple_size::value>::call(std::forward(t)); + return detail::call_impl < MatrixType, A, W, M, F, Tuple, 0 == std::tuple_size::value, + std::tuple_size::value > ::call(std::forward(t)); } template diff --git a/tests/doctest/doctest.h b/tests/doctest/doctest.h index 16d6edc7b..2beb64e79 100644 --- a/tests/doctest/doctest.h +++ b/tests/doctest/doctest.h @@ -1007,7 +1007,7 @@ struct StringMaker template struct StringMaker { - static String convert(R C::*p) + static String convert(R C::* p) { if(p) return detail::rawMemoryToString(p); @@ -1159,8 +1159,7 @@ namespace detail #endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING // clang-format on -struct DOCTEST_INTERFACE TestFailureException -{}; +struct DOCTEST_INTERFACE TestFailureException{}; DOCTEST_INTERFACE bool checkIfShouldThrow(assertType::Enum at);