@@ -22,11 +22,11 @@ namespace A2D {
2222*/
2323
2424template <typename T, int N>
25- A2D_FUNCTION void MatInv (const Mat<T, N, N>& A, Mat<T, N, N>& Ainv) {
25+ A2D_FUNCTION void MatInv (const Mat<T, N, N> & A, Mat<T, N, N> & Ainv) {
2626 MatInvCore<T, N>(get_data (A), get_data (Ainv));
2727}
2828template <typename T, int N>
29- A2D_FUNCTION void MatInv (const SymMat<T, N>& S, SymMat<T, N>& Sinv) {
29+ A2D_FUNCTION void MatInv (const SymMat<T, N> & S, SymMat<T, N> & Sinv) {
3030 SymMatInvCore<T, N>(get_data (S), get_data (Sinv));
3131}
3232
@@ -56,7 +56,7 @@ class MatInvExpr {
5656 static constexpr MatOp NORMAL = MatOp::NORMAL;
5757 static constexpr MatOp TRANSPOSE = MatOp::TRANSPOSE;
5858
59- A2D_FUNCTION MatInvExpr (Atype& A, Btype& Ainv) : A(A), Ainv(Ainv) {}
59+ A2D_FUNCTION MatInvExpr (Atype & A, Btype & Ainv) : A(A), Ainv(Ainv) {}
6060
6161 A2D_FUNCTION void eval () { MatInvCore<T, N>(get_data (A), get_data (Ainv)); }
6262
@@ -67,8 +67,8 @@ class MatInvExpr {
6767 static_assert (
6868 !(order == ADorder::FIRST and forder == ADorder::SECOND),
6969 " Can't perform second order forward with first order objects" );
70- constexpr ADseed seed = conditional_value < ADseed,
71- forder == ADorder::FIRST, ADseed::b, ADseed::p > ::value;
70+ constexpr ADseed seed = conditional_value< ADseed, forder == ADorder::FIRST ,
71+ ADseed::b, ADseed::p> ::value;
7272
7373 T temp[N * N];
7474 MatMatMultCore<T, N, N, N, N, N, N, NORMAL, NORMAL>(
@@ -120,17 +120,17 @@ class MatInvExpr {
120120 T (-1.0 ), temp, get_data (Ainv), GetSeed<ADseed::h>::get_data (A));
121121 }
122122
123- Atype& A;
124- Btype& Ainv;
123+ Atype & A;
124+ Btype & Ainv;
125125};
126126
127127template <class Atype , class Btype >
128- A2D_FUNCTION auto MatInv (ADObj<Atype>& A, ADObj<Btype>& Ainv) {
128+ A2D_FUNCTION auto MatInv (ADObj<Atype> & A, ADObj<Btype> & Ainv) {
129129 return MatInvExpr<ADObj<Atype>, ADObj<Btype>>(A, Ainv);
130130}
131131
132132template <class Atype , class Btype >
133- A2D_FUNCTION auto MatInv (A2DObj<Atype>& A, A2DObj<Btype>& Ainv) {
133+ A2D_FUNCTION auto MatInv (A2DObj<Atype> & A, A2DObj<Btype> & Ainv) {
134134 return MatInvExpr<A2DObj<Atype>, A2DObj<Btype>>(A, Ainv);
135135}
136136
@@ -150,7 +150,7 @@ class MatInvTest : public A2DTest<T, Mat<T, N, N>, Mat<T, N, N>> {
150150 }
151151
152152 // Evaluate the matrix-matrix product
153- Output eval (const Input& x) {
153+ Output eval (const Input & x) {
154154 Mat<T, N, N> A;
155155 Mat<T, N, N> B;
156156 x.get_values (A);
@@ -159,7 +159,7 @@ class MatInvTest : public A2DTest<T, Mat<T, N, N>, Mat<T, N, N>> {
159159 }
160160
161161 // Compute the derivative
162- void deriv (const Output& seed, const Input& x, Input& g) {
162+ void deriv (const Output & seed, const Input & x, Input & g) {
163163 ADObj<Mat<T, N, N>> A;
164164 ADObj<Mat<T, N, N>> B;
165165
@@ -171,8 +171,8 @@ class MatInvTest : public A2DTest<T, Mat<T, N, N>, Mat<T, N, N>> {
171171 }
172172
173173 // Compute the second-derivative
174- void hprod (const Output& seed, const Output& hval, const Input& x,
175- const Input& p, Input& h) {
174+ void hprod (const Output & seed, const Output & hval, const Input & x,
175+ const Input & p, Input & h) {
176176 A2DObj<Mat<T, N, N>> A;
177177 A2DObj<Mat<T, N, N>> B;
178178
0 commit comments