Skip to content

Commit 3a5886a

Browse files
committed
Rename dngvx to hegvx
1 parent f47631c commit 3a5886a

File tree

7 files changed

+34
-23
lines changed

7 files changed

+34
-23
lines changed

source/source_hsolver/diago_dav_subspace.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ void Diago_DavSubspace<T, Device>::diag_zhegvx(const int& nbase,
542542
if (this->diag_comm.rank == 0)
543543
{
544544
base_device::memory::synchronize_memory_op<T, Device, Device>()(this->d_scc, scc, nbase * this->nbase_x);
545-
dngvd_op<T, Device>()(this->ctx, nbase, this->nbase_x, this->hcc, this->d_scc, this->d_eigenvalue, this->vcc);
545+
hegvd_op<T, Device>()(this->ctx, nbase, this->nbase_x, this->hcc, this->d_scc, this->d_eigenvalue, this->vcc);
546546
syncmem_var_d2h_op()((*eigenvalue_iter).data(), this->d_eigenvalue, this->nbase_x);
547547
}
548548
#endif
@@ -564,7 +564,7 @@ void Diago_DavSubspace<T, Device>::diag_zhegvx(const int& nbase,
564564
s_diag[i][j] = scc[i * this->nbase_x + j];
565565
}
566566
}
567-
dngvx_op<T, Device>()(this->ctx,
567+
hegvx_op<T, Device>()(this->ctx,
568568
nbase,
569569
this->nbase_x,
570570
this->hcc,

source/source_hsolver/diago_iter_assist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ void DiagoIterAssist<T, Device>::diagH_LAPACK(const int nstart,
372372
resmem_var_op()(eigenvalues, nstart);
373373
setmem_var_op()(eigenvalues, 0, nstart);
374374

375-
dngvd_op<T, Device>()(ctx, nstart, ldh, hcc, scc, eigenvalues, vcc);
375+
hegvd_op<T, Device>()(ctx, nstart, ldh, hcc, scc, eigenvalues, vcc);
376376

377377
if (base_device::get_device_type<Device>(ctx) == base_device::GpuDevice)
378378
{

source/source_hsolver/kernels/cuda/dngvd_op.cu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ struct heevx_op<T, base_device::DEVICE_GPU>
244244
};
245245

246246
template <typename T>
247-
struct dngvx_op<T, base_device::DEVICE_GPU>
247+
struct hegvx_op<T, base_device::DEVICE_GPU>
248248
{
249249
using Real = typename GetTypeReal<T>::type;
250250
void operator()(const base_device::DEVICE_GPU* d,
@@ -262,16 +262,16 @@ struct dngvx_op<T, base_device::DEVICE_GPU>
262262

263263
template struct hegvd_op<std::complex<float>, base_device::DEVICE_GPU>;
264264
template struct heevx_op<std::complex<float>, base_device::DEVICE_GPU>;
265-
template struct dngvx_op<std::complex<float>, base_device::DEVICE_GPU>;
265+
template struct hegvx_op<std::complex<float>, base_device::DEVICE_GPU>;
266266

267267
template struct hegvd_op<std::complex<double>, base_device::DEVICE_GPU>;
268268
template struct heevx_op<std::complex<double>, base_device::DEVICE_GPU>;
269-
template struct dngvx_op<std::complex<double>, base_device::DEVICE_GPU>;
269+
template struct hegvx_op<std::complex<double>, base_device::DEVICE_GPU>;
270270

271271
#ifdef __LCAO
272272
template struct hegvd_op<double, base_device::DEVICE_GPU>;
273273
template struct heevx_op<double, base_device::DEVICE_GPU>;
274-
template struct dngvx_op<double, base_device::DEVICE_GPU>;
274+
template struct hegvx_op<double, base_device::DEVICE_GPU>;
275275
#endif
276276

277277
} // namespace hsolver

source/source_hsolver/kernels/dngvd_op.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct hegvd_op<T, base_device::DEVICE_CPU>
8383
};
8484

8585
template <typename T>
86-
struct dngv_op<T, base_device::DEVICE_CPU>
86+
struct hegv_op<T, base_device::DEVICE_CPU>
8787
{
8888
using Real = typename GetTypeReal<T>::type;
8989
void operator()(const base_device::DEVICE_CPU* d,
@@ -243,7 +243,7 @@ struct heevx_op<T, base_device::DEVICE_CPU>
243243
};
244244

245245
template <typename T>
246-
struct dngvx_op<T, base_device::DEVICE_CPU>
246+
struct hegvx_op<T, base_device::DEVICE_CPU>
247247
{
248248
using Real = typename GetTypeReal<T>::type;
249249
void operator()(const base_device::DEVICE_CPU* d,
@@ -335,15 +335,15 @@ template struct hegvd_op<std::complex<double>, base_device::DEVICE_CPU>;
335335
template struct heevx_op<std::complex<float>, base_device::DEVICE_CPU>;
336336
template struct heevx_op<std::complex<double>, base_device::DEVICE_CPU>;
337337

338-
template struct dngvx_op<std::complex<float>, base_device::DEVICE_CPU>;
339-
template struct dngvx_op<std::complex<double>, base_device::DEVICE_CPU>;
338+
template struct hegvx_op<std::complex<float>, base_device::DEVICE_CPU>;
339+
template struct hegvx_op<std::complex<double>, base_device::DEVICE_CPU>;
340340

341-
template struct dngv_op<std::complex<float>, base_device::DEVICE_CPU>;
342-
template struct dngv_op<std::complex<double>, base_device::DEVICE_CPU>;
341+
template struct hegv_op<std::complex<float>, base_device::DEVICE_CPU>;
342+
template struct hegv_op<std::complex<double>, base_device::DEVICE_CPU>;
343343
#ifdef __LCAO
344344
template struct hegvd_op<double, base_device::DEVICE_CPU>;
345345
template struct heevx_op<double, base_device::DEVICE_CPU>;
346-
template struct dngvx_op<double, base_device::DEVICE_CPU>;
347-
template struct dngv_op<double, base_device::DEVICE_CPU>;
346+
template struct hegvx_op<double, base_device::DEVICE_CPU>;
347+
template struct hegv_op<double, base_device::DEVICE_CPU>;
348348
#endif
349349
} // namespace hsolver

source/source_hsolver/kernels/dngvd_op.h

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
// TODO: This is a temperary location for these functions.
22
// And will be moved to a global module(module base) later.
3+
4+
// DeNse Generalized eigenValue eXtended
5+
// he stands for Hermitian
6+
// sy stands for Symmetric
7+
// gv stands for Generalized eigenValue problem
8+
// ev stands for EigenValues
9+
// dn stands for dense, maybe, who knows?
10+
// x stands for compute a subset of the eigenvalues and, optionally,
11+
// their corresponding eigenvectors
12+
// d for all, x for selected
13+
314
#ifndef MODULE_HSOLVER_DNGVD_H
415
#define MODULE_HSOLVER_DNGVD_H
516

@@ -47,10 +58,10 @@ struct hegvd_op
4758
};
4859

4960
template <typename T, typename Device>
50-
struct dngv_op
61+
struct hegv_op
5162
{
5263
using Real = typename GetTypeReal<T>::type;
53-
/// @brief DNGVX computes first m eigenvalues and eigenvectors of a complex generalized
64+
/// @brief HEGV computes first m eigenvalues and eigenvectors of a complex generalized
5465
/// Input Parameters
5566
/// @param d : the type of device
5667
/// @param nbase : the number of dim of the matrix
@@ -64,10 +75,10 @@ struct dngv_op
6475
};
6576

6677
template <typename T, typename Device>
67-
struct dngvx_op
78+
struct hegvx_op
6879
{
6980
using Real = typename GetTypeReal<T>::type;
70-
/// @brief DNGVX computes first m eigenvalues and eigenvectors of a complex generalized
81+
/// @brief HEGVX computes first m eigenvalues and eigenvectors of a complex generalized
7182
/// Input Parameters
7283
/// @param d : the type of device
7384
/// @param nbase : the number of dim of the matrix

source/source_hsolver/kernels/rocm/dngvd_op.hip.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ void heevx_op<std::complex<double>, base_device::DEVICE_GPU>::operator()(const b
328328
}
329329

330330
template <>
331-
void dngvx_op<std::complex<float>, base_device::DEVICE_GPU>::operator()(const base_device::DEVICE_GPU* d,
331+
void hegvx_op<std::complex<float>, base_device::DEVICE_GPU>::operator()(const base_device::DEVICE_GPU* d,
332332
const int nbase,
333333
const int ldh,
334334
std::complex<float>* hcc,
@@ -340,7 +340,7 @@ void dngvx_op<std::complex<float>, base_device::DEVICE_GPU>::operator()(const ba
340340
}
341341

342342
template <>
343-
void dngvx_op<std::complex<double>, base_device::DEVICE_GPU>::operator()(const base_device::DEVICE_GPU* d,
343+
void hegvx_op<std::complex<double>, base_device::DEVICE_GPU>::operator()(const base_device::DEVICE_GPU* d,
344344
const int nbase,
345345
const int ldh,
346346
std::complex<double>* hcc,
@@ -353,7 +353,7 @@ void dngvx_op<std::complex<double>, base_device::DEVICE_GPU>::operator()(const b
353353

354354
#ifdef __LCAO
355355
template <>
356-
void dngvx_op<double, base_device::DEVICE_GPU>::operator()(const base_device::DEVICE_GPU* d,
356+
void hegvx_op<double, base_device::DEVICE_GPU>::operator()(const base_device::DEVICE_GPU* d,
357357
const int nbase,
358358
const int ldh,
359359
double* hcc,

source/source_hsolver/test/test_diago_hs_para.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ void test_performance(int lda, int nb, int nbands, MPI_Comm comm,int case_numb,
231231
{
232232
h_tmp = h_mat;
233233
s_tmp = s_mat;
234-
hsolver::dngvx_op<T,base_device::DEVICE_CPU>()(ctx,
234+
hsolver::hegvx_op<T,base_device::DEVICE_CPU>()(ctx,
235235
lda,
236236
lda,
237237
h_tmp.data(),

0 commit comments

Comments
 (0)