Skip to content

Commit 339fb5c

Browse files
adhamsiactions-user
authored andcommitted
Apply pre-commmit fixes
1 parent 1e67b77 commit 339fb5c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

resolve/hykkt/cholesky/CholeskySolverCpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ namespace ReSolve
7373

7474
cholmod_sparse* CholeskySolverCpu::convertToCholmod(matrix::Csr* A)
7575
{
76-
A_chol_ = cholmod_allocate_sparse((size_t) A->getNumRows(),
76+
A_chol_ = cholmod_allocate_sparse((size_t) A->getNumRows(),
7777
(size_t) A->getNumColumns(),
7878
(size_t) A->getNnz(),
7979
1,

resolve/hykkt/cholesky/CholeskySolverCpu.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace ReSolve
1818
void solve(vector::Vector* x, vector::Vector* b);
1919

2020
private:
21-
MemoryHandler mem_;
21+
MemoryHandler mem_;
2222

2323
cholmod_common Common_;
2424
cholmod_sparse* A_chol_; // cholmod sparse matrix representation

tests/unit/hykkt/HykktCholeskyTests.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ namespace ReSolve
9898
std::string testname(__func__);
9999
testname += " n = " + std::to_string(n);
100100

101-
cholmod_sparse* L = randomSparseLowerTriangular((size_t) n);
102-
cholmod_sparse* L_tr = cholmod_transpose(L, 1, &Common);
101+
cholmod_sparse* L = randomSparseLowerTriangular((size_t) n);
102+
cholmod_sparse* L_tr = cholmod_transpose(L, 1, &Common);
103103
cholmod_sparse* A_chol = cholmod_ssmult(L, L_tr, 0, 1, 0, &Common);
104104

105105
matrix::Csr* A = new matrix::Csr((index_type) A_chol->nrow, (index_type) A_chol->ncol, (index_type) A_chol->nzmax);
@@ -157,18 +157,18 @@ namespace ReSolve
157157
delete x_expected;
158158
delete b;
159159
delete x;
160-
160+
161161
return status.report(testname.c_str());
162162
}
163163

164164
TestOutcome randomizedReuseSparsityPattern(index_type n, index_type trials)
165-
{
165+
{
166166
TestStatus status;
167167
std::string testname(__func__);
168168
testname += " n = " + std::to_string(n) + ", trials = " + std::to_string(trials);
169169

170-
cholmod_sparse* L = randomSparseLowerTriangular((size_t) n);
171-
cholmod_sparse* L_tr = cholmod_transpose(L, 1, &Common);
170+
cholmod_sparse* L = randomSparseLowerTriangular((size_t) n);
171+
cholmod_sparse* L_tr = cholmod_transpose(L, 1, &Common);
172172
cholmod_sparse* A_chol = cholmod_ssmult(L, L_tr, 0, 1, 0, &Common);
173173

174174
matrix::Csr* A = new matrix::Csr((index_type) A_chol->nrow, (index_type) A_chol->ncol, (index_type) A_chol->nzmax);
@@ -230,7 +230,7 @@ namespace ReSolve
230230
}
231231
cholmod_free_sparse(&L_tr, &Common);
232232
cholmod_free_sparse(&A_chol, &Common);
233-
L_tr = cholmod_transpose(L, 1, &Common);
233+
L_tr = cholmod_transpose(L, 1, &Common);
234234
A_chol = cholmod_ssmult(L, L_tr, 0, 1, 0, &Common);
235235
A->copyValues(static_cast<double*>(A_chol->x), memory::HOST, memspace_);
236236
A->setUpdated(memspace_);
@@ -256,7 +256,7 @@ namespace ReSolve
256256
cholmod_sparse* randomSparseLowerTriangular(size_t n)
257257
{
258258
double density = 2.0 / n;
259-
size_t nnz = 0;
259+
size_t nnz = 0;
260260
std::vector<int> L_p(n + 1, 0);
261261
std::vector<int> L_i;
262262
std::vector<double> L_x;
@@ -281,7 +281,7 @@ namespace ReSolve
281281
std::copy(L_p.begin(), L_p.end(), static_cast<int*>(L->p));
282282
std::copy(L_i.begin(), L_i.end(), static_cast<int*>(L->i));
283283
std::copy(L_x.begin(), L_x.end(), static_cast<double*>(L->x));
284-
284+
285285
return L;
286286
}
287287

0 commit comments

Comments
 (0)