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

[pre-commit.ci] pre-commit autoupdate #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ repos:
- id: check-useless-excludes
- id: check-hooks-apply
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.3
rev: v19.1.7
hooks:
- id: clang-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
Expand Down
8 changes: 4 additions & 4 deletions include/tvm/graph/internal/Log.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Inputs;
* members to compare.
*/
template<typename ObjType, typename MemberType, typename... Args>
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>(args)...));
}
Expand All @@ -38,21 +38,21 @@ bool lexLess(const ObjType & l, const ObjType & r, MemberType ObjType::*member,
* to compare.
*/
template<typename ObjType, typename MemberType, typename... Args>
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>(args)...);
}

/** End of recursion. */
template<typename ObjType, typename MemberType>
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<typename ObjType, typename MemberType>
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);
}
Expand Down
9 changes: 3 additions & 6 deletions include/tvm/scheme/HierarchicalLeastSquares.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<HierarchicalLeastSquares>
Expand Down
22 changes: 10 additions & 12 deletions include/tvm/scheme/WeightedLeastSquares.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<WeightedLeastSquares>
Expand Down
6 changes: 3 additions & 3 deletions include/tvm/scheme/internal/CompiledAssignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ class WeightMultBase<NONE>
public:
static const bool useArg = false;

WeightMultBase(NoArg){};
WeightMultBase(NoArg) {};

template<typename T>
const T & applyWeightMult(const T & M)
Expand All @@ -376,7 +376,7 @@ class WeightMultBase<MINUS>
public:
static const bool useArg = false;

WeightMultBase(NoArg){};
WeightMultBase(NoArg) {};

double applyWeightMult(const double & M) { return -M; }

Expand Down Expand Up @@ -408,7 +408,7 @@ template<>
class WeightMultBase<SCALAR>
{
public:
WeightMultBase(const double & s) : s_(s){};
WeightMultBase(const double & s) : s_(s) {};

template<typename T>
decltype(double() * std::declval<T>()) applyWeightMult(const T & M)
Expand Down
8 changes: 4 additions & 4 deletions tests/CompiledAssignmentTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ struct call_impl
{
static CompiledAssignmentWrapper<MatrixType> call(Tuple && t)
{
return call_impl<MatrixType, A, W, M, F, Tuple, Total == 1 + sizeof...(N), Total, N..., sizeof...(N)>::call(
std::forward<Tuple>(t));
return call_impl < MatrixType, A, W, M, F, Tuple, Total == 1 + sizeof...(N), Total, N...,
sizeof...(N) > ::call(std::forward<Tuple>(t));
}
};

Expand All @@ -220,8 +220,8 @@ template<typename MatrixType, AssignType A, WeightMult W, MatrixMult M, Source F
CompiledAssignmentWrapper<MatrixType> call(Tuple && t)
{
typedef typename std::decay<Tuple>::type ttype;
return detail::call_impl<MatrixType, A, W, M, F, Tuple, 0 == std::tuple_size<ttype>::value,
std::tuple_size<ttype>::value>::call(std::forward<Tuple>(t));
return detail::call_impl < MatrixType, A, W, M, F, Tuple, 0 == std::tuple_size<ttype>::value,
std::tuple_size<ttype>::value > ::call(std::forward<Tuple>(t));
}

template<WeightMult W>
Expand Down
5 changes: 2 additions & 3 deletions tests/doctest/doctest.h
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ struct StringMaker<T *>
template<typename R, typename C>
struct StringMaker<R C::*>
{
static String convert(R C::*p)
static String convert(R C::* p)
{
if(p)
return detail::rawMemoryToString(p);
Expand Down Expand Up @@ -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);

Expand Down
Loading