modernize and reformat with clang-tidy and clang-format
This commit is contained in:
@ -130,7 +130,10 @@ TEST(LeptonCustomFunction, zbl)
|
||||
|
||||
class ExampleFunction : public Lepton::CustomFunction {
|
||||
int getNumArguments() const override { return 2; }
|
||||
double evaluate(const double *arguments) const override { return 2.0 * arguments[0] * arguments[1]; }
|
||||
double evaluate(const double *arguments) const override
|
||||
{
|
||||
return 2.0 * arguments[0] * arguments[1];
|
||||
}
|
||||
double evaluateDerivative(const double *arguments, const int *derivOrder) const override
|
||||
{
|
||||
if (derivOrder[0] == 1) {
|
||||
|
||||
@ -24,7 +24,7 @@ TEST(Types, ubuf)
|
||||
{
|
||||
double buf[3];
|
||||
double d1 = 0.1;
|
||||
int i1 = -10;
|
||||
int i1 = -10;
|
||||
#if defined(LAMMPS_SMALLSMALL)
|
||||
bigint b1 = 2048;
|
||||
#else
|
||||
@ -43,14 +43,14 @@ TEST(Types, multitype)
|
||||
{
|
||||
multitype m[7];
|
||||
int64_t b1 = (3L << 48) - 1;
|
||||
int i1 = 20;
|
||||
double d1 = 0.1;
|
||||
int i1 = 20;
|
||||
double d1 = 0.1;
|
||||
|
||||
m[0] = b1;
|
||||
m[1] = i1;
|
||||
m[2] = d1;
|
||||
|
||||
m[3] = (bigint) -((1L << 40) + (1L << 50));
|
||||
m[3] = (bigint) - ((1L << 40) + (1L << 50));
|
||||
m[4] = -1023;
|
||||
m[5] = -2.225;
|
||||
|
||||
@ -72,7 +72,7 @@ TEST(Types, multitype)
|
||||
EXPECT_EQ(m[2].data.d, d1);
|
||||
|
||||
#if !defined(LAMMPS_SMALLSMALL)
|
||||
EXPECT_EQ(m[3].data.b, -((1L << 40) + (1L << 50)));
|
||||
EXPECT_EQ(m[3].data.b, -((1L << 40) + (1L << 50)));
|
||||
#endif
|
||||
EXPECT_EQ(m[4].data.i, -1023);
|
||||
EXPECT_EQ(m[5].data.d, -2.225);
|
||||
|
||||
@ -385,9 +385,9 @@ void TestJacobi(int n, //<! matrix size
|
||||
Alloc2D(n, n, &M);
|
||||
Alloc2D(n, n, &evecs);
|
||||
Alloc2D(n, n, &evecs_known);
|
||||
Scalar *evals = new Scalar[n];
|
||||
Scalar *evals_known = new Scalar[n];
|
||||
Scalar *test_evec = new Scalar[n];
|
||||
auto *evals = new Scalar[n];
|
||||
auto *evals_known = new Scalar[n];
|
||||
auto *test_evec = new Scalar[n];
|
||||
|
||||
#endif
|
||||
|
||||
@ -464,7 +464,7 @@ void TestJacobi(int n, //<! matrix size
|
||||
Scalar const(*)[NF]>::SORT_INCREASING_ABS_EVALS);
|
||||
#else
|
||||
ecalc.Diagonalize(M, evals, evecs,
|
||||
Jacobi<Scalar, Scalar *, Scalar **,
|
||||
Jacobi<Scalar, Scalar *, Scalar **,
|
||||
Scalar const *const *>::SORT_INCREASING_ABS_EVALS);
|
||||
#endif
|
||||
|
||||
@ -488,7 +488,7 @@ void TestJacobi(int n, //<! matrix size
|
||||
Scalar const(*)[NF]>::SORT_DECREASING_ABS_EVALS);
|
||||
#else
|
||||
ecalc.Diagonalize(M, evals, evecs,
|
||||
Jacobi<Scalar, Scalar *, Scalar **,
|
||||
Jacobi<Scalar, Scalar *, Scalar **,
|
||||
Scalar const *const *>::SORT_DECREASING_ABS_EVALS);
|
||||
#endif
|
||||
|
||||
@ -511,7 +511,7 @@ void TestJacobi(int n, //<! matrix size
|
||||
Scalar const(*)[NF]>::SORT_INCREASING_EVALS);
|
||||
#else
|
||||
ecalc.Diagonalize(M, evals, evecs,
|
||||
Jacobi<Scalar, Scalar *, Scalar **,
|
||||
Jacobi<Scalar, Scalar *, Scalar **,
|
||||
Scalar const *const *>::SORT_INCREASING_EVALS);
|
||||
#endif
|
||||
for (int i = 1; i < n; i++)
|
||||
@ -533,8 +533,8 @@ void TestJacobi(int n, //<! matrix size
|
||||
Jacobi<Scalar, Scalar *, Scalar(*)[NF], Scalar const(*)[NF]>::DO_NOT_SORT);
|
||||
#else
|
||||
ecalc.Diagonalize(
|
||||
M, evals, evecs,
|
||||
Jacobi<Scalar, Scalar *, Scalar **, Scalar const *const *>::DO_NOT_SORT);
|
||||
M, evals, evecs,
|
||||
Jacobi<Scalar, Scalar *, Scalar **, Scalar const *const *>::DO_NOT_SORT);
|
||||
#endif
|
||||
|
||||
} // if (test_code_coverage)
|
||||
|
||||
Reference in New Issue
Block a user