mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-11-04 05:03:59 +01:00
Added macro HPC/DOC switch
This commit is contained in:
parent
4f0bdda4ff
commit
181f662c68
@ -561,7 +561,7 @@ qmckl_exit_code qmckl_sherman_morrison_naive(const qmckl_context context,
|
|||||||
<<naive_switch-case_generator()>>
|
<<naive_switch-case_generator()>>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // When SIMD_LENGTH > 1, called with LDS == Dim AND Dim != (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH)
|
else { // Updating smaller sub-matrix
|
||||||
return qmckl_sherman_morrison_naive_hpc(context,
|
return qmckl_sherman_morrison_naive_hpc(context,
|
||||||
LDS,
|
LDS,
|
||||||
Dim,
|
Dim,
|
||||||
@ -1070,7 +1070,7 @@ static inline qmckl_exit_code qmckl_slagel_splitting_{Dim}(
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+NAME:slagel_splitting_kernel_generator
|
#+NAME:slagel_splitting_kernel_generator
|
||||||
#+begin_src python :noweb yes :exports none
|
#+begin_src python :noweb yes
|
||||||
text="""
|
text="""
|
||||||
<<slagel_splitting_template_code>>
|
<<slagel_splitting_template_code>>
|
||||||
"""
|
"""
|
||||||
@ -1083,7 +1083,7 @@ return '\n'.join(result)
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+NAME:slagel_splitting_switch-case_generator
|
#+NAME:slagel_splitting_switch-case_generator
|
||||||
#+begin_src python :noweb yes :exports none
|
#+begin_src python :noweb yes
|
||||||
text="""
|
text="""
|
||||||
case {Dim}:
|
case {Dim}:
|
||||||
return qmckl_slagel_splitting_{Dim}(
|
return qmckl_slagel_splitting_{Dim}(
|
||||||
@ -1123,12 +1123,13 @@ qmckl_exit_code qmckl_slagel_splitting(
|
|||||||
uint64_t* later,
|
uint64_t* later,
|
||||||
double* determinant) {
|
double* determinant) {
|
||||||
|
|
||||||
|
#ifdef HAVE_HPC
|
||||||
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
|
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
|
||||||
switch (Dim) {
|
switch (Dim) {
|
||||||
<<slagel_splitting_switch-case_generator()>>
|
<<slagel_splitting_switch-case_generator()>>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // When SIMD_LENGTH > 1, called with LDS == Dim AND Dim != (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH)
|
else { // Updating smaller sub-matrix
|
||||||
return qmckl_slagel_splitting_hpc(
|
return qmckl_slagel_splitting_hpc(
|
||||||
LDS,
|
LDS,
|
||||||
Dim,
|
Dim,
|
||||||
@ -1142,6 +1143,32 @@ qmckl_exit_code qmckl_slagel_splitting(
|
|||||||
later,
|
later,
|
||||||
determinant);
|
determinant);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// return qmckl_slagel_splitting_doc(
|
||||||
|
// LDS,
|
||||||
|
// Dim,
|
||||||
|
// N_updates,
|
||||||
|
// Updates,
|
||||||
|
// Updates_index,
|
||||||
|
// breakdown,
|
||||||
|
// Slater_inv,
|
||||||
|
// later_updates,
|
||||||
|
// later_index,
|
||||||
|
// later,
|
||||||
|
// determinant);
|
||||||
|
return qmckl_slagel_splitting_hpc(
|
||||||
|
LDS,
|
||||||
|
Dim,
|
||||||
|
N_updates,
|
||||||
|
Updates,
|
||||||
|
Updates_index,
|
||||||
|
breakdown,
|
||||||
|
Slater_inv,
|
||||||
|
later_updates,
|
||||||
|
later_index,
|
||||||
|
later,
|
||||||
|
determinant);
|
||||||
|
#endif
|
||||||
|
|
||||||
return QMCKL_FAILURE;
|
return QMCKL_FAILURE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user