1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-12-22 20:36:01 +01:00

Passing argument context instead of creating and passing a locally created context. #25

This commit is contained in:
Francois Coppens 2021-07-29 11:48:38 +02:00
parent afc6e115d3
commit a5e58c80d7

View File

@ -255,6 +255,7 @@ end function qmckl_sherman_morrison_f
#+begin_src c :tangle (eval c) :comments org
#include <stdbool.h>
#include "qmckl.h"
#include <stdio.h>
qmckl_exit_code qmckl_sherman_morrison_c(const qmckl_context context,
const uint64_t Dim,
@ -303,6 +304,7 @@ qmckl_exit_code qmckl_sherman_morrison_c(const qmckl_context context,
l += 1;
}
return QMCKL_SUCCESS;
}
@ -911,8 +913,6 @@ qmckl_exit_code qmckl_sherman_morrison_splitting_c(const qmckl_context context,
// std::cerr << "Called qmckl_sherman_morrison_splitting with " << N_updates << " updates" << std::endl;
// #endif
qmckl_context local_context;
local_context = qmckl_context_create();
qmckl_exit_code rc;
double later_updates[Dim * N_updates];
@ -923,7 +923,7 @@ qmckl_exit_code qmckl_sherman_morrison_splitting_c(const qmckl_context context,
breakdown, Slater_inv, later_updates, later_index, &later);
if (later > 0) {
rc = qmckl_sherman_morrison_splitting_c(local_context, Dim, later,
rc = qmckl_sherman_morrison_splitting_c(context, Dim, later,
later_updates, later_index, breakdown, Slater_inv);
}