Skip to content

Commit b978cae

Browse files
committed
Remove const type qualifier of primitive pass-by-value parameters
1 parent 5184728 commit b978cae

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

source/module_base/module_container/ATen/kernels/lapack.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ struct lapack_getrs<T, DEVICE_CPU> {
183183
template <typename T>
184184
struct lapack_geqrf<T, DEVICE_CPU> {
185185
void operator()(
186-
const int m,
187-
const int n,
186+
int m,
187+
int n,
188188
T* A,
189-
const int lda,
189+
int lda,
190190
T* tau,
191191
T* work,
192-
const int lwork)
192+
int lwork)
193193
{
194194
int info = 0;
195195
lapackConnector::geqrf(m, n, A, lda, tau, work, lwork, info);
@@ -199,6 +199,7 @@ struct lapack_geqrf<T, DEVICE_CPU> {
199199
}
200200
};
201201

202+
202203
template struct set_matrix<float, DEVICE_CPU>;
203204
template struct set_matrix<double, DEVICE_CPU>;
204205
template struct set_matrix<std::complex<float>, DEVICE_CPU>;

source/module_base/module_container/ATen/kernels/lapack.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,15 @@ struct lapack_getrs {
249249
const int& ldb);
250250
};
251251

252+
/**
253+
* @brief Functor for performing QR factorization using LAPACK's GEQRF routine.
254+
*
255+
* GEQRF: QR factorization
256+
* Computes the QR factorization of a general m-by-n matrix A using Householder reflectors.
257+
* The factorization has the form
258+
* A = Q * R,
259+
* where Q is orthogonal and R is upper triangular.
260+
*/
252261
template <typename T, typename Device>
253262
struct lapack_geqrf {
254263
/**
@@ -267,13 +276,13 @@ struct lapack_geqrf {
267276
* @param lwork The size of the workspace array.
268277
*/
269278
void operator()(
270-
const int m,
271-
const int n,
279+
int m,
280+
int n,
272281
T* A,
273-
const int lda,
282+
int lda,
274283
T* tau,
275284
T* work,
276-
const int lwork);
285+
int lwork);
277286
};
278287

279288

0 commit comments

Comments
 (0)