Skip to content

Commit 8d23442

Browse files
ryandanehyactions-user
authored andcommitted
Apply pre-commmit fixes
1 parent 74a5e29 commit 8d23442

20 files changed

+49
-49
lines changed

resolve/GramSchmidt.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ namespace ReSolve
205205
s += h_L_[idxmap(j, k, num_vecs_ + 1)] * H[idxmap(i, k, num_vecs_ + 1)];
206206
} // for k
207207
H[idxmap(i, j, num_vecs_ + 1)] -= s;
208-
} // for j
208+
} // for j
209209
vec_Hcolumn_->setCurrentSize(i + 1);
210210
vec_Hcolumn_->update(&H[idxmap(i, 0, num_vecs_ + 1)], memory::HOST, memory::DEVICE);
211211
vector_handler_->massAxpy(n, vec_Hcolumn_, i, V, vec_w_, memspace);
@@ -248,7 +248,7 @@ namespace ReSolve
248248
s += h_L_[idxmap(j, k, num_vecs_ + 1)] * H[idxmap(i, k, num_vecs_ + 1)];
249249
} // for k
250250
H[idxmap(i, j, num_vecs_ + 1)] -= s;
251-
} // for j
251+
} // for j
252252

253253
// now compute h_rv = L^T h_H
254254
double h;
@@ -269,7 +269,7 @@ namespace ReSolve
269269
s += h_L_[idxmap(j, k, num_vecs_ + 1)] * h_aux_[k];
270270
} // for k
271271
h_aux_[j] -= s;
272-
} // for j
272+
} // for j
273273

274274
// and now subtract that from h_H
275275
for (int j = 0; j <= i; ++j) {

resolve/GramSchmidt.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace ReSolve
3232
GSVariant variant_;
3333
bool setup_complete_; // to avoid double allocations and stuff
3434

35-
index_type num_vecs_; // the same as restart
35+
index_type num_vecs_; // the same as restart
3636
vector_type* vec_rv_{nullptr};
3737
vector_type* vec_Hcolumn_{nullptr};
3838

resolve/LinSolverDirectCuSolverRf.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ namespace ReSolve
6262
// default
6363

6464
const cusolverRfFactorization_t fact_alg =
65-
CUSOLVERRF_FACTORIZATION_ALG0; // 0 - default, 1 or 2
65+
CUSOLVERRF_FACTORIZATION_ALG0; // 0 - default, 1 or 2
6666
const cusolverRfTriangularSolve_t solve_alg =
6767
CUSOLVERRF_TRIANGULAR_SOLVE_ALG1; // 1- default, 2 or 3 // 1 causes error
6868
this->setAlgorithms(fact_alg, solve_alg);

resolve/LinSolverDirectRocSolverRf.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ namespace ReSolve
4343
int solve(vector_type* rhs, vector_type* x);
4444
int solve(vector_type* rhs); // the solutuon is returned IN RHS (rhs is overwritten)
4545

46-
int setSolveMode(int mode); // should probably be enum
47-
int getSolveMode(); // should be enum too
46+
int setSolveMode(int mode); // should probably be enum
47+
int getSolveMode(); // should be enum too
4848

4949
private:
5050
rocblas_status status_rocblas_;
@@ -59,8 +59,8 @@ namespace ReSolve
5959
void addFactors(matrix::Sparse* L,
6060
matrix::Sparse* U); // create L+U from sepeate L, U factors
6161
rocsolver_rfinfo infoM_;
62-
matrix::Sparse* M_{nullptr}; // the matrix that contains added factors
63-
int solve_mode_; // 0 is default and 1 is fast
62+
matrix::Sparse* M_{nullptr}; // the matrix that contains added factors
63+
int solve_mode_; // 0 is default and 1 is fast
6464

6565
// not used by default - for fast solve
6666
rocsparse_mat_descr descr_L_{nullptr};

resolve/LinSolverIterativeFGMRES.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace ReSolve
1818
tol_ = 1e-14; // default
1919
maxit_ = 100; // default
2020
restart_ = 10;
21-
conv_cond_ = 0; // default
21+
conv_cond_ = 0; // default
2222

2323
d_V_ = nullptr;
2424
d_Z_ = nullptr;
@@ -37,7 +37,7 @@ namespace ReSolve
3737
tol_ = 1e-14; // default
3838
maxit_ = 100; // default
3939
restart_ = 10;
40-
conv_cond_ = 0; // default
40+
conv_cond_ = 0; // default
4141

4242
d_V_ = nullptr;
4343
d_Z_ = nullptr;

resolve/LinSolverIterativeFGMRES.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace ReSolve
7070
GramSchmidt* GS_;
7171
void precV(vector_type* rhs, vector_type* x); // multiply the vector by preconditioner
7272
LinSolverDirect* LU_solver_;
73-
index_type n_; // for simplicity
73+
index_type n_; // for simplicity
7474
real_type final_residual_norm_;
7575
real_type initial_residual_norm_;
7676
index_type fgmres_iters_;

resolve/SystemSolver.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ namespace
1212
~SystemSolver();
1313

1414
public:
15-
analyze(); // symbolic part
16-
factorize(); // numeric part
15+
analyze(); // symbolic part
16+
factorize(); // numeric part
1717
refactorize();
1818
solve(double* x, double* rhs); // for triangular solve
1919
refine(double, double* rhs); // for iterative refinement

resolve/cuda/cudaVectorKernels.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ namespace ReSolve
6868
// real_type* scale);
6969
} // namespace kernels
7070

71-
} // namespace vector
71+
} // namespace vector
7272
} // namespace ReSolve

resolve/hip/hipVectorKernels.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ namespace ReSolve
6565
// real_type* scale);
6666
} // namespace kernels
6767

68-
} // namespace vector
68+
} // namespace vector
6969
} // namespace ReSolve

resolve/matrix/MatrixHandler.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@ namespace ReSolve
6767
void setValuesChanged(bool toWhat, std::string memspace);
6868

6969
private:
70-
bool new_matrix_{true}; ///< if the structure changed, you need a new handler.
70+
bool new_matrix_{true}; ///< if the structure changed, you need a new handler.
7171

7272
MemoryHandler mem_; ///< Device memory manager object
7373
MatrixHandlerImpl* cpuImpl_{nullptr}; ///< Pointer to CPU implementation
7474
MatrixHandlerImpl* cudaImpl_{nullptr}; ///< Pointer to CUDA implementation
7575
MatrixHandlerImpl* hipImpl_{nullptr}; ///< Pointer to HIP implementation
7676

77-
bool isCpuEnabled_{false}; ///< true if CPU implementation is instantiated
78-
bool isCudaEnabled_{false}; ///< true if CUDA implementation is instantiated
79-
bool isHipEnabled_{false}; ///< true if HIP implementation is instantiated
77+
bool isCpuEnabled_{false}; ///< true if CPU implementation is instantiated
78+
bool isCudaEnabled_{false}; ///< true if CUDA implementation is instantiated
79+
bool isHipEnabled_{false}; ///< true if HIP implementation is instantiated
8080
};
8181

8282
} // namespace ReSolve

resolve/matrix/MatrixHandlerCuda.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace ReSolve
4848
LinAlgWorkspaceCUDA* workspace_{nullptr};
4949
bool values_changed_{true}; ///< needed for matvec
5050

51-
MemoryHandler mem_; ///< Device memory manager object
51+
MemoryHandler mem_; ///< Device memory manager object
5252
};
5353

5454
} // namespace ReSolve

resolve/matrix/MatrixHandlerHip.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace ReSolve
5151
LinAlgWorkspaceHIP* workspace_{nullptr};
5252
bool values_changed_{true}; ///< needed for matvec
5353

54-
MemoryHandler mem_; ///< Device memory manager object
54+
MemoryHandler mem_; ///< Device memory manager object
5555
};
5656

5757
} // namespace ReSolve

resolve/matrix/Sparse.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ namespace ReSolve
100100
bool owns_gpu_data_{false}; ///< for row/col data
101101
bool owns_gpu_vals_{false}; ///< for values
102102

103-
MemoryHandler mem_; ///< Device memory manager object
103+
MemoryHandler mem_; ///< Device memory manager object
104104
};
105-
} // namespace matrix
105+
} // namespace matrix
106106
} // namespace ReSolve

resolve/vector/Vector.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ namespace ReSolve
6161

6262
MemoryHandler mem_; ///< Device memory manager object
6363
};
64-
} // namespace vector
64+
} // namespace vector
6565
} // namespace ReSolve

resolve/vector/VectorHandlerCuda.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ namespace ReSolve
203203
alpha->getData(memory::DEVICE), // B
204204
k + 1, // ldb
205205
&ONE,
206-
y->getData(memory::DEVICE), // c
207-
size); // ldc
206+
y->getData(memory::DEVICE), // c
207+
size); // ldc
208208
}
209209
}
210210

@@ -244,14 +244,14 @@ namespace ReSolve
244244
cublasDgemm(handle_cublas,
245245
CUBLAS_OP_T,
246246
CUBLAS_OP_N,
247-
k + 1, // m
248-
2, // n
249-
size, // k
250-
&ONE, // alpha
251-
V->getData(memory::DEVICE), // A
252-
size, // lda
253-
x->getData(memory::DEVICE), // B
254-
size, // ldb
247+
k + 1, // m
248+
2, // n
249+
size, // k
250+
&ONE, // alpha
251+
V->getData(memory::DEVICE), // A
252+
size, // lda
253+
x->getData(memory::DEVICE), // B
254+
size, // ldb
255255
&ZERO,
256256
res->getData(memory::DEVICE), // c
257257
k + 1); // ldc

resolve/vector/VectorHandlerHip.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ namespace ReSolve
203203
alpha->getData(memory::DEVICE), // B
204204
k, // ldb
205205
&ONE,
206-
y->getData(memory::DEVICE), // c
207-
size); // ldc
206+
y->getData(memory::DEVICE), // c
207+
size); // ldc
208208
}
209209
}
210210

@@ -244,14 +244,14 @@ namespace ReSolve
244244
rocblas_dgemm(handle_rocblas,
245245
rocblas_operation_transpose,
246246
rocblas_operation_none,
247-
k + 1, // m
248-
2, // n
249-
size, // k
250-
&ONE, // alpha
251-
V->getData(memory::DEVICE), // A
252-
size, // lda
253-
x->getData(memory::DEVICE), // B
254-
size, // ldb
247+
k + 1, // m
248+
2, // n
249+
size, // k
250+
&ONE, // alpha
251+
V->getData(memory::DEVICE), // A
252+
size, // lda
253+
x->getData(memory::DEVICE), // B
254+
size, // ldb
255255
&ZERO,
256256
res->getData(memory::DEVICE), // c
257257
k + 1); // ldc

tests/unit/matrix/MatrixHandlerTests.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,5 +170,5 @@ namespace ReSolve
170170
}
171171
}; // class MatrixHandlerTests
172172

173-
} // namespace tests
173+
} // namespace tests
174174
} // namespace ReSolve

tests/unit/matrix/MatrixIoTests.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,5 +292,5 @@ namespace ReSolve
292292
std::string datafiles_folder_;
293293
}; // class MatrixIoTests
294294

295-
} // namespace tests
295+
} // namespace tests
296296
} // namespace ReSolve

tests/unit/memory/MemoryUtilsTests.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,5 @@ namespace ReSolve
107107

108108
}; // class MemoryUtilsTests
109109

110-
} // namespace tests
110+
} // namespace tests
111111
} // namespace ReSolve

tests/unit/utilities/logger/LoggerTests.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,5 @@ namespace ReSolve
195195
const std::string message_ = "[MESSAGE] ";
196196
}; // class LoggerTests
197197

198-
} // namespace tests
198+
} // namespace tests
199199
} // namespace ReSolve

0 commit comments

Comments
 (0)