Skip to content

Commit

Permalink
Applying clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
lucbv committed Feb 1, 2024
1 parent caac290 commit 331ab32
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 32 deletions.
67 changes: 37 additions & 30 deletions lapack/tpls/KokkosLapack_Host_tpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,26 @@ void F77_BLAS_MANGLE(zgesv, ZGESV)(int*, int*, std::complex<double>*, int*,
/// Gesvd
///

void F77_BLAS_MANGLE(sgesvd, SGESVD)(const char*, const char*, const int*, const int*,
float*, const int*, float*, float*, const int*, float*,
const int*, float*, int*, int*);
void F77_BLAS_MANGLE(dgesvd, DGESVD)(const char*, const char*, const int*, const int*,
double*, const int*, double*, double*, const int*,
double*, const int*, double*, int*, int*);
void F77_BLAS_MANGLE(cgesvd, CGESVD)(const char*, const char*, const int*, const int*,
std::complex<float>*, const int*, float*,
std::complex<float>*, const int*,
std::complex<float>*, const int*,
std::complex<float>*, int*, float*, int*);
void F77_BLAS_MANGLE(zgesvd,
ZGESVD)(const char*, const char*, const int*, const int*,
std::complex<double>*, const int*, double*,
std::complex<double>*, const int*, std::complex<double>*,
const int*, std::complex<double>*, int*, double*, int*);
void F77_BLAS_MANGLE(sgesvd, SGESVD)(const char*, const char*, const int*,
const int*, float*, const int*, float*,
float*, const int*, float*, const int*,
float*, int*, int*);
void F77_BLAS_MANGLE(dgesvd, DGESVD)(const char*, const char*, const int*,
const int*, double*, const int*, double*,
double*, const int*, double*, const int*,
double*, int*, int*);
void F77_BLAS_MANGLE(cgesvd, CGESVD)(const char*, const char*, const int*,
const int*, std::complex<float>*,
const int*, float*, std::complex<float>*,
const int*, std::complex<float>*,
const int*, std::complex<float>*, int*,
float*, int*);
void F77_BLAS_MANGLE(zgesvd, ZGESVD)(const char*, const char*, const int*,
const int*, std::complex<double>*,
const int*, double*, std::complex<double>*,
const int*, std::complex<double>*,
const int*, std::complex<double>*, int*,
double*, int*);

///
/// Trtri
Expand Down Expand Up @@ -108,9 +112,10 @@ void HostLapack<float>::gesv(int n, int rhs, float* a, int lda, int* ipiv,
F77_FUNC_SGESV(&n, &rhs, a, &lda, ipiv, b, &ldb, &info);
}
template <>
void HostLapack<float>::gesvd(const char jobu, const char jobvt, const int m, const int n,
float* a, const int lda, float* s, float* u, const int ldu,
float* vt, const int ldvt, float* work, int lwork,
void HostLapack<float>::gesvd(const char jobu, const char jobvt, const int m,
const int n, float* a, const int lda, float* s,
float* u, const int ldu, float* vt,
const int ldvt, float* work, int lwork,
float* /*rwork*/, int info) {
F77_FUNC_SGESVD(&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work,
&lwork, &info);
Expand All @@ -133,10 +138,11 @@ void HostLapack<double>::gesv(int n, int rhs, double* a, int lda, int* ipiv,
F77_FUNC_DGESV(&n, &rhs, a, &lda, ipiv, b, &ldb, &info);
}
template <>
void HostLapack<double>::gesvd(const char jobu, const char jobvt, const int m, const int n,
double* a, const int lda, double* s, double* u,
const int ldu, double* vt, const int ldvt, double* work,
int lwork, double* /*rwork*/, int info) {
void HostLapack<double>::gesvd(const char jobu, const char jobvt, const int m,
const int n, double* a, const int lda, double* s,
double* u, const int ldu, double* vt,
const int ldvt, double* work, int lwork,
double* /*rwork*/, int info) {
F77_FUNC_DGESVD(&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work,
&lwork, &info);
}
Expand All @@ -161,9 +167,10 @@ void HostLapack<std::complex<float> >::gesv(int n, int rhs,
}
template <>
void HostLapack<std::complex<float> >::gesvd(
const char jobu, const char jobvt, const int m, const int n, std::complex<float>* a,
const int lda, float* s, std::complex<float>* u, const int ldu, std::complex<float>* vt,
const int ldvt, std::complex<float>* work, int lwork, float* rwork, int info) {
const char jobu, const char jobvt, const int m, const int n,
std::complex<float>* a, const int lda, float* s, std::complex<float>* u,
const int ldu, std::complex<float>* vt, const int ldvt,
std::complex<float>* work, int lwork, float* rwork, int info) {
F77_FUNC_CGESVD(&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work,
&lwork, rwork, &info);
}
Expand All @@ -189,10 +196,10 @@ void HostLapack<std::complex<double> >::gesv(int n, int rhs,
}
template <>
void HostLapack<std::complex<double> >::gesvd(
const char jobu, const char jobvt, const int m, const int n, std::complex<double>* a,
const int lda, double* s, std::complex<double>* u, const int ldu,
std::complex<double>* vt, const int ldvt, std::complex<double>* work, int lwork,
double* rwork, int info) {
const char jobu, const char jobvt, const int m, const int n,
std::complex<double>* a, const int lda, double* s, std::complex<double>* u,
const int ldu, std::complex<double>* vt, const int ldvt,
std::complex<double>* work, int lwork, double* rwork, int info) {
F77_FUNC_ZGESVD(&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work,
&lwork, rwork, &info);
}
Expand Down
5 changes: 3 additions & 2 deletions lapack/tpls/KokkosLapack_Host_tpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ struct HostLapack {
static void gesv(int n, int rhs, T *a, int lda, int *ipiv, T *b, int ldb,
int info);

static void gesvd(const char jobu, const char jobvt, const int m, const int n, T *A,
const int lda, typename Kokkos::ArithTraits<T>::mag_type *S, T *U,
static void gesvd(const char jobu, const char jobvt, const int m, const int n,
T *A, const int lda,
typename Kokkos::ArithTraits<T>::mag_type *S, T *U,
const int ldu, T *Vt, const int ldvt, T *work, int lwork,
typename Kokkos::ArithTraits<T>::mag_type *rwork, int info);

Expand Down

0 comments on commit 331ab32

Please sign in to comment.