mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-11-19 20:42:50 +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()>>
|
||||
}
|
||||
}
|
||||
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,
|
||||
LDS,
|
||||
Dim,
|
||||
@ -1070,7 +1070,7 @@ static inline qmckl_exit_code qmckl_slagel_splitting_{Dim}(
|
||||
#+end_src
|
||||
|
||||
#+NAME:slagel_splitting_kernel_generator
|
||||
#+begin_src python :noweb yes :exports none
|
||||
#+begin_src python :noweb yes
|
||||
text="""
|
||||
<<slagel_splitting_template_code>>
|
||||
"""
|
||||
@ -1083,7 +1083,7 @@ return '\n'.join(result)
|
||||
#+end_src
|
||||
|
||||
#+NAME:slagel_splitting_switch-case_generator
|
||||
#+begin_src python :noweb yes :exports none
|
||||
#+begin_src python :noweb yes
|
||||
text="""
|
||||
case {Dim}:
|
||||
return qmckl_slagel_splitting_{Dim}(
|
||||
@ -1123,12 +1123,13 @@ qmckl_exit_code qmckl_slagel_splitting(
|
||||
uint64_t* later,
|
||||
double* determinant) {
|
||||
|
||||
#ifdef HAVE_HPC
|
||||
if (LDS == (1+(Dim-1)/SIMD_LENGTH)*SIMD_LENGTH) { // Most cases
|
||||
switch (Dim) {
|
||||
<<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(
|
||||
LDS,
|
||||
Dim,
|
||||
@ -1142,7 +1143,33 @@ qmckl_exit_code qmckl_slagel_splitting(
|
||||
later,
|
||||
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;
|
||||
}
|
||||
#+end_src
|
||||
|
Loading…
Reference in New Issue
Block a user