Permalink
Browse files

fmt: clang-format the mcscf module

  • Loading branch information...
andysim committed Aug 29, 2018
1 parent f7c1a59 commit 9fadc923f52ba71a9bd2dd6d3cb8d7a32c1fd73e
Showing with 2,233 additions and 2,414 deletions.
  1. +18 −22 psi4/src/psi4/mcscf/algebra_interface.cc
  2. +21 −26 psi4/src/psi4/mcscf/algebra_interface.h
  3. +23 −23 psi4/src/psi4/mcscf/algebra_interface_mangle.h
  4. +135 −170 psi4/src/psi4/mcscf/block_matrix.cc
  5. +68 −62 psi4/src/psi4/mcscf/block_matrix.h
  6. +74 −90 psi4/src/psi4/mcscf/block_vector.cc
  7. +44 −36 psi4/src/psi4/mcscf/block_vector.h
  8. +68 −105 psi4/src/psi4/mcscf/matrix_base.cc
  9. +37 −35 psi4/src/psi4/mcscf/matrix_base.h
  10. +3 −3 psi4/src/psi4/mcscf/mcscf.cc
  11. +5 −3 psi4/src/psi4/mcscf/mcscf.h
  12. +68 −82 psi4/src/psi4/mcscf/sblock_matrix.cc
  13. +58 −57 psi4/src/psi4/mcscf/sblock_matrix.h
  14. +34 −51 psi4/src/psi4/mcscf/sblock_vector.cc
  15. +46 −44 psi4/src/psi4/mcscf/sblock_vector.h
  16. +181 −191 psi4/src/psi4/mcscf/scf.cc
  17. +133 −133 psi4/src/psi4/mcscf/scf.h
  18. +101 −103 psi4/src/psi4/mcscf/scf_F.cc
  19. +114 −113 psi4/src/psi4/mcscf/scf_Feff.cc
  20. +69 −82 psi4/src/psi4/mcscf/scf_G.cc
  21. +23 −23 psi4/src/psi4/mcscf/scf_S_inverse_sqrt.cc
  22. +62 −62 psi4/src/psi4/mcscf/scf_canonicalize_MO.cc
  23. +25 −26 psi4/src/psi4/mcscf/scf_check_orthonormality.cc
  24. +27 −26 psi4/src/psi4/mcscf/scf_compute_energy.cc
  25. +28 −27 psi4/src/psi4/mcscf/scf_density_matrix.cc
  26. +77 −78 psi4/src/psi4/mcscf/scf_diis.cc
  27. +72 −73 psi4/src/psi4/mcscf/scf_energy.cc
  28. +38 −38 psi4/src/psi4/mcscf/scf_guess_occupation.cc
  29. +13 −12 psi4/src/psi4/mcscf/scf_initial_guess.cc
  30. +130 −138 psi4/src/psi4/mcscf/scf_iterate_scf_equations.cc
  31. +46 −47 psi4/src/psi4/mcscf/scf_pairs.cc
  32. +48 −60 psi4/src/psi4/mcscf/scf_print_eigenvectors_and_MO.cc
  33. +58 −58 psi4/src/psi4/mcscf/scf_read_so_oei.cc
  34. +219 −240 psi4/src/psi4/mcscf/scf_read_so_tei.cc
  35. +24 −27 psi4/src/psi4/mcscf/scf_save_info.cc
  36. +13 −20 psi4/src/psi4/mcscf/vector_base.cc
  37. +30 −28 psi4/src/psi4/mcscf/vector_base.h
@@ -29,9 +29,9 @@
#include "psi4/libmoinfo/libmoinfo.h"
#include "algebra_interface.h"
namespace psi{
namespace psi {
namespace mcscf{
namespace mcscf {
/*
** C_DGEMM_12()
@@ -42,17 +42,15 @@ namespace psi{
** ncb = number of columns in B
** ncc = number of columns in C
*/
void C_DGEMM_12(int m, int n, int k, double alpha,
double *A, int nra, double *B, int ncb, double beta, double *C,
int ncc)
{
// the only strange thing we need to do is reverse everything
// since the stride runs differently in C vs. Fortran
void C_DGEMM_12(int m, int n, int k, double alpha, double *A, int nra, double *B, int ncb, double beta, double *C,
int ncc) {
// the only strange thing we need to do is reverse everything
// since the stride runs differently in C vs. Fortran
/* also, do nothing if a dimension is 0 */
if (m == 0 || n == 0 || k == 0) return;
/* also, do nothing if a dimension is 0 */
if (m == 0 || n == 0 || k == 0) return;
F_DGEMM("t","t",&n,&m,&k,&alpha,B,&ncb,A,&nra,&beta,C,&ncc);
F_DGEMM("t", "t", &n, &m, &k, &alpha, B, &ncb, A, &nra, &beta, C, &ncc);
}
/*
@@ -64,18 +62,16 @@ void C_DGEMM_12(int m, int n, int k, double alpha,
** ncb = number of columns in B
** ncc = number of columns in C
*/
void C_DGEMM_22(int m, int n, int k, double alpha,
double *A, int nca, double *B, int ncb, double beta, double *C,
int ncc)
{
// the only strange thing we need to do is reverse everything
// since the stride runs differently in C vs. Fortran
void C_DGEMM_22(int m, int n, int k, double alpha, double *A, int nca, double *B, int ncb, double beta, double *C,
int ncc) {
// the only strange thing we need to do is reverse everything
// since the stride runs differently in C vs. Fortran
/* also, do nothing if a dimension is 0 */
if (m == 0 || n == 0 || k == 0) return;
/* also, do nothing if a dimension is 0 */
if (m == 0 || n == 0 || k == 0) return;
F_DGEMM("t","n",&n,&m,&k,&alpha,B,&ncb,A,&nca,&beta,C,&ncc);
F_DGEMM("t", "n", &n, &m, &k, &alpha, B, &ncb, A, &nca, &beta, C, &ncc);
}
}} /* End Namespaces */
} // namespace mcscf
} // namespace psi
@@ -31,42 +31,37 @@
#include "algebra_interface_mangle.h"
namespace psi{ namespace mcscf{
namespace psi {
namespace mcscf {
extern "C" void F_DAXPY(int *length, double *a, double *x, int *inc_x,
double *y, int *inc_y);
extern "C" void F_DCOPY(int *length, double *x, int *inc_x,
double *y, int *inc_y);
extern "C" void F_DGEMM(const char *transa, const char *transb, int *m, int *n, int *k,
double *alpha, double *A, int *lda, double *B, int *ldb,
double *beta, double *C, int *ldc);
extern "C" void F_DROT(int *ntot,double *x, int *incx,double *y, int *incy,
double *cotheta,double *sintheta);
extern "C" void F_DAXPY(int *length, double *a, double *x, int *inc_x, double *y, int *inc_y);
extern "C" void F_DCOPY(int *length, double *x, int *inc_x, double *y, int *inc_y);
extern "C" void F_DGEMM(const char *transa, const char *transb, int *m, int *n, int *k, double *alpha, double *A,
int *lda, double *B, int *ldb, double *beta, double *C, int *ldc);
extern "C" void F_DROT(int *ntot, double *x, int *incx, double *y, int *incy, double *cotheta, double *sintheta);
extern "C" void F_DSCAL(int *n, double *alpha, double *vec, int *inc);
extern "C" void F_DGEMV(char *transa, int *m, int *n, double *alpha, double *A,
int *lda, double *X, int *inc_x, double *beta,
double *Y, int *inc_y);
extern "C" void F_DGEMV(char *transa, int *m, int *n, double *alpha, double *A, int *lda, double *X, int *inc_x,
double *beta, double *Y, int *inc_y);
extern "C" double F_DDOT(int *n, double *x, int *incx, double *y, int *incy);
void C_DGEMM_12(int m, int n, int k, double alpha,double *A, int nra,
double *B, int ncb, double beta, double *C, int ncc);
void C_DGEMM_22(int m, int n, int k, double alpha,double *A, int nca,
double *B, int ncb, double beta, double *C, int ncc);
void C_DGEMM_12(int m, int n, int k, double alpha, double *A, int nra, double *B, int ncb, double beta, double *C,
int ncc);
void C_DGEMM_22(int m, int n, int k, double alpha, double *A, int nca, double *B, int ncb, double beta, double *C,
int ncc);
// void C_DGEMM_11(int m, int n, int k, double alpha,double *A, int nca,
// double *B, int ncb, double beta, double *C, int ncc);
// void C_DGEMM_21(int m, int n, int k, double alpha,double *A, int nca,
// double *B, int ncb, double beta, double *C, int ncc);
extern "C" void F_DGEEV(const char *jobvl, const char *jobvr, int *n, double *a, int *lda, double *wr, double *wi,
double *vl, int *ldvl, double *vr, int *ldvr, double *work, int *lwork, int *info);
extern "C" void F_DGESV(int *n, int *nrhs, double *A, int *lda, int *ipiv, double *B, int *ldb, int *info);
extern "C" void F_DGEEV(const char *jobvl, const char *jobvr, int *n, double *a, int *lda,
double *wr, double *wi, double *vl, int *ldvl, double *vr,
int *ldvr, double *work, int *lwork, int *info);
extern "C" void F_DGESV(int *n, int *nrhs, double *A, int *lda, int *ipiv,
double *B, int *ldb, int *info);
extern "C" void F_DSYEV(char *JOBZ, char *UPLO, int *N, double *A, int *LDA, double *W, double *WORK, int *LWORK,
int *INFO);
extern "C" void F_DSYEV(char *JOBZ, char *UPLO, int *N, double *A, int *LDA, double *W, double *WORK, int *LWORK, int *INFO );
} // namespace mcscf
} // namespace psi
}}
#endif // _psi_src_bin_mcscf_algebra_interface_h_
#endif // _psi_src_bin_mcscf_algebra_interface_h_
@@ -35,82 +35,82 @@
#ifdef USE_FCMANGLE_H
#include "FCMangle.h"
#define F_DAXPY FC_GLOBAL(daxpy, DAXPY)
#define F_DCOPY FC_GLOBAL(dcopy, DCOPY)
#define F_DGEMM FC_GLOBAL(dgemm, DGEMM)
#define F_DROT FC_GLOBAL(drot, DROT)
#define F_DSCAL FC_GLOBAL(dscal, DSCAL)
#define F_DGEMV FC_GLOBAL(dgemv, DGEMV)
#define F_DSPMV FC_GLOBAL(dfpmv, DSPMV)
#define F_DDOT FC_GLOBAL(ddot, DDOT)
#define F_DGEEV FC_GLOBAL(dgeev, DGEEV)
#define F_DGESV FC_GLOBAL(dgesv, DGESV)
#define F_DAXPY FC_GLOBAL(daxpy, DAXPY)
#define F_DCOPY FC_GLOBAL(dcopy, DCOPY)
#define F_DGEMM FC_GLOBAL(dgemm, DGEMM)
#define F_DROT FC_GLOBAL(drot, DROT)
#define F_DSCAL FC_GLOBAL(dscal, DSCAL)
#define F_DGEMV FC_GLOBAL(dgemv, DGEMV)
#define F_DSPMV FC_GLOBAL(dfpmv, DSPMV)
#define F_DDOT FC_GLOBAL(ddot, DDOT)
#define F_DGEEV FC_GLOBAL(dgeev, DGEEV)
#define F_DGESV FC_GLOBAL(dgesv, DGESV)
#define F_DGETRF FC_GLOBAL(dgetrf, DGETRF)
#define F_DGETRI FC_GLOBAL(dgetri, DGETRI)
#define F_DGESVD FC_GLOBAL(dgesvd, DGESVD)
#define F_DSYEV FC_GLOBAL(dsyev, DSYEV)
#else // USE_FCMANGLE_H
#if FC_SYMBOL==2
#define F_DSYEV FC_GLOBAL(dsyev, DSYEV)
#else // USE_FCMANGLE_H
#if FC_SYMBOL == 2
#define F_DAXPY daxpy_
#define F_DCOPY dcopy_
#define F_DGEMM dgemm_
#define F_DROT drot_
#define F_DSCAL dscal_
#define F_DGEMV dgemv_
#define F_DSPMV dspmv_
#define F_DDOT ddot_
#define F_DDOT ddot_
#define F_DGEEV dgeev_
#define F_DGESV dgesv_
#define F_DGETRF dgetrf_
#define F_DGETRI dgetri_
#define F_DGESVD dgesvd_
#define F_DSYEV dsyev_
#elif FC_SYMBOL==1
#elif FC_SYMBOL == 1
#define F_DAXPY daxpy
#define F_DCOPY dcopy
#define F_DGEMM dgemm
#define F_DROT drot
#define F_DSCAL dscal
#define F_DGEMV dgemv
#define F_DSPMV dspmv
#define F_DDOT ddot
#define F_DDOT ddot
#define F_DGEEV dgeev
#define F_DGESV dgesv
#define F_DGETRF dgetrf
#define F_DGETRI dgetri
#define F_DGESVD dgesvd
#define F_DSYEV dsyev
#elif FC_SYMBOL==3
#elif FC_SYMBOL == 3
#define F_DAXPY DAXPY
#define F_DCOPY DCOPY
#define F_DGEMM DGEMM
#define F_DROT DROT
#define F_DSCAL DSCAL
#define F_DGEMV DGEMV
#define F_DSPMV DSPMV
#define F_DDOT DDOT
#define F_DDOT DDOT
#define F_DGEEV DGEEV
#define F_DGESV DGESV
#define F_DGETRF DGETRF
#define F_DGETRI DGETRI
#define F_DGESVD DGESVD
#define F_DSYEV DSYEV
#elif FC_SYMBOL==4
#elif FC_SYMBOL == 4
#define F_DAXPY DAXPY_
#define F_DCOPY DCOPY_
#define F_DGEMM DGEMM_
#define F_DROT DROT_
#define F_DSCAL DSCAL_
#define F_DGEMV DGEMV_
#define F_DSPMV DSPMV_
#define F_DDOT DDOT_
#define F_DDOT DDOT_
#define F_DGEEV DGEEV_
#define F_DGESV DGESV_
#define F_DGETRF DGETRF_
#define F_DGETRI DGETRI_
#define F_DGESVD DGESVD_
#define F_DSYEV DSYEV_
#endif // FC_SYMBOL
#endif // USE_FCMANGLE_H
#endif // FC_SYMBOL
#endif // USE_FCMANGLE_H
#endif // _psi_src_bin_mcscf_algebra_interface_mangle_h_
#endif // _psi_src_bin_mcscf_algebra_interface_mangle_h_
Oops, something went wrong.

0 comments on commit 9fadc92

Please sign in to comment.