FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
abacus-develop/source/source_base/gather_math_lib_info.cpp at develop · pplab/abacus-develop · GitHub
pplab
/
abacus-develop
Public
forked from
deepmodeling/abacus-develop
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
abacus-develop
/
source
/
source_base
/
gather_math_lib_info.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
80 lines (74 loc) · 2.91 KB
Breadcrumbs
abacus-develop
/
source
/
source_base
/
gather_math_lib_info.cpp
Copy path
File metadata and controls
80 lines (74 loc) · 2.91 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//
This file defines the math lib wrapper for output information before executing computations.
/*
When INFO is defined in cmake configure, a macro of GATHER_INFO will be defined.
This macro will be used to output information before executing computations.
Results will output to OUT/math_info.log, see ModuleBase::Global_File::make_dir_out .
*/
#
include
<
ostream
>
#
undef
GATHER_INFO
#
include
"
source_base/module_external/blas_connector.h
"
#
include
"
source_base/module_external/lapack_connector.h
"
#
include
<
iostream
>
void
zgemm_i
(
const
char
*transa,
const
char
*transb,
const
int
*m,
const
int
*n,
const
int
*k,
const
std::
complex
<
double
> *alpha,
const
std::
complex
<
double
> *a,
const
int
*lda,
const
std::
complex
<
double
> *b,
const
int
*ldb,
const
std::
complex
<
double
> *beta,
std::
complex
<
double
> *c,
const
int
*ldc)
{
GlobalV::ofs_info.
unsetf
(std::ios_base::floatfield);
GlobalV::ofs_info <<
"
zgemm
"
<< *transa <<
"
"
<< *transb <<
"
"
<< *m <<
"
"
<< *n <<
"
"
<< *k <<
"
"
<< *alpha <<
"
"
<< *lda <<
"
"
<< *ldb <<
"
"
<< *beta <<
"
"
<< *ldc << std::endl;
zgemm_
(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc);
}
void
zaxpy_i
(
const
int
*N,
const
std::
complex
<
double
> *alpha,
const
std::
complex
<
double
> *X,
const
int
*incX,
std::
complex
<
double
> *Y,
const
int
*incY)
{
//
std::cout << "zaxpy " << *N << std::endl;
//
alpha is a coefficient
//
incX, incY is always 1
zaxpy_
(N, alpha, X, incX, Y, incY);
}
void
zhegvx_i
(
const
int
*itype,
const
char
*jobz,
const
char
*range,
const
char
*uplo,
const
int
*n,
std::
complex
<
double
> *a,
const
int
*lda,
std::
complex
<
double
> *b,
const
int
*ldb,
const
double
*vl,
const
double
*vu,
const
int
*il,
const
int
*iu,
const
double
*abstol,
const
int
*m,
double
*w,
std::
complex
<
double
> *z,
const
int
*ldz,
std::
complex
<
double
> *work,
const
int
*lwork,
double
*rwork,
int
*iwork,
int
*ifail,
int
*info)
{
GlobalV::ofs_info.
unsetf
(std::ios_base::floatfield);
GlobalV::ofs_info <<
"
zhegvx
"
<< *itype <<
"
"
<< *jobz <<
"
"
<< *range <<
"
"
<< *uplo
<<
"
"
<< *n <<
"
"
<< *lda <<
"
"
<< *ldb <<
"
"
<< *vl <<
"
"
<< *vu <<
"
"
<< *il <<
"
"
<< *iu
<<
"
"
<< *abstol <<
"
"
<< *m <<
"
"
<< *lwork <<
"
"
<< *info << std::endl;
zhegvx_
(itype, jobz, range, uplo, n, a, lda, b, ldb, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork,
iwork, ifail, info);
}
Back
|
FazBrowse Home
|
New Git URL