mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 10:06:09 +01:00
to be checked
This commit is contained in:
parent
3bd249176f
commit
4fac9f06c9
@ -4962,6 +4962,45 @@ integer function qmckl_compute_dim_cord_vect_f(context, cord_num, dim_cord_vect)
|
||||
end function qmckl_compute_dim_cord_vect_f
|
||||
#+end_src
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes
|
||||
qmckl_exit_code qmckl_compute_dim_cord_vect (
|
||||
const qmckl_context context,
|
||||
const int64_t cord_num,
|
||||
int64_t* const dim_cord_vect){
|
||||
|
||||
int lmax;
|
||||
|
||||
|
||||
if (context == QMCKL_NULL_CONTEXT) {
|
||||
return QMCKL_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
if (cord_num <= 0) {
|
||||
return QMCKL_INVALID_ARG_2;
|
||||
}
|
||||
|
||||
dim_cord_vect = 0;
|
||||
|
||||
for (int p=2; p < cord_num; ++p){
|
||||
for (int k=p-1; k <= 0; --k) {
|
||||
if (k != 0) {
|
||||
lmax = p - k;
|
||||
} else {
|
||||
lmax = p - k - 2;
|
||||
}
|
||||
for (l = lmax; l <= 0; --l) {
|
||||
// if ( iand(p - k - l, 1_8) == 1) continue;
|
||||
// Does it make sense? it should
|
||||
if ( ((p - k - l) & 1)==1) continue;
|
||||
dim_cord_vect = dim_cord_vect + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return QMCKL_SUCCESS;
|
||||
}
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_header(table=qmckl_factor_dim_cord_vect_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
|
||||
|
||||
#+RESULTS:
|
||||
@ -4973,28 +5012,6 @@ end function qmckl_compute_dim_cord_vect_f
|
||||
#+end_src
|
||||
|
||||
|
||||
#+CALL: generate_c_interface(table=qmckl_factor_dim_cord_vect_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src f90 :tangle (eval f) :comments org :exports none
|
||||
integer(c_int32_t) function qmckl_compute_dim_cord_vect &
|
||||
(context, cord_num, dim_cord_vect) &
|
||||
bind(C) result(info)
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
implicit none
|
||||
|
||||
integer (c_int64_t) , intent(in) , value :: context
|
||||
integer (c_int64_t) , intent(in) , value :: cord_num
|
||||
integer (c_int64_t) , intent(out) :: dim_cord_vect
|
||||
|
||||
integer(c_int32_t), external :: qmckl_compute_dim_cord_vect_f
|
||||
info = qmckl_compute_dim_cord_vect_f &
|
||||
(context, cord_num, dim_cord_vect)
|
||||
|
||||
end function qmckl_compute_dim_cord_vect
|
||||
#+end_src
|
||||
|
||||
*** Compute cord_vect_full
|
||||
:PROPERTIES:
|
||||
:Name: qmckl_compute_cord_vect_full
|
||||
|
Loading…
Reference in New Issue
Block a user