diff --git a/README.html b/README.html index d74124d..d399ca4 100644 --- a/README.html +++ b/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +
The qmckl.h
header file has to be included in C codes when
@@ -385,12 +385,12 @@ Both files are located in the include/
directory.
In a traditional source code, most of the lines of source files of a program @@ -436,8 +436,8 @@ interactively, in the same spirit as Jupyter notebooks.
For a tutorial on literate programming with org-mode, follow this link. @@ -469,8 +469,8 @@ org-mode.
Most of the codes of the TREX CoE are written in Fortran with some scripts in @@ -518,8 +518,8 @@ For more guidelines on using Fortran to generate a C interface, see
The authors should follow the recommendations of the @@ -535,8 +535,8 @@ freed
The proposed API should allow the library to: deal with memory transfers @@ -547,8 +547,8 @@ functions (see below).
To avoid namespace collisions, we use qmckl_
as a prefix for all exported
@@ -573,8 +573,8 @@ form is allowed.
In the C language, the number of bits used by the integer types can change @@ -607,15 +607,15 @@ bindings in other languages in other repositories.
Global variables should be avoided in the library, because it is
possible that one single program needs to use multiple instances
of the library. To solve this problem we propose to use a pointer
to a context
variable, built by the library with the
-qmckl_context_create
function. The =context= contains the global
+qmckl_context_create
function. The =context= contains the global
state of the library, and is used as the first argument of many
QMCkl functions.
qmckl_context_destroy
.
Low-level functions are very simple functions which are leaves of @@ -645,14 +645,14 @@ the function call tree (they don't call any other QMCkl function).
These functions are pure, and unaware of the QMCkl
-context
. They are not allowed to allocate/deallocate memory, and
+context
. They are not allowed to allocate/deallocate memory, and
if they need temporary memory it should be provided in input.
High-level functions are at the top of the function call tree. @@ -665,27 +665,27 @@ temporary storage, to simplify the use of accelerators.
The high-level functions should be pure, unless the introduction
of non-purity is justified. All the side effects should be made in
-the context
variable.
+the context
variable.
The number of bits of precision required for a function should be
given as an input of low-level computational functions. This input
will be used to define the values of the different thresholds that
might be used to avoid computing unnecessary noise. High-level
-functions will use the precision specified in the context
+functions will use the precision specified in the context
variable.
Reducing the scaling of an algorithm usually implies also reducing @@ -698,8 +698,8 @@ implemented adapted to different problem sizes.
stdint
should be used for integers (int32_t
, int64_t
)
The qmckl_ao_power
function computes all the powers of the n
@@ -574,8 +574,8 @@ Requirements:
A polynomial is centered on a nucleus \(\mathbf{R}_i\) @@ -960,8 +960,8 @@ munit_assert_int(0, ==, test_qmckl_ao_polynomial_vgl(context));
qmckl_ao_gaussian_vgl
computes the values, gradients and
@@ -1193,13 +1193,13 @@ Requirements :
qmckl_context_update_ao_basis
+qmckl_context_update_ao_basis
qmckl_context_set_ao_basis
+qmckl_context_set_ao_basis
QMCKL_NULL_CONTEXT
for the context is equivalent to a
The context appears as an immutable data structure: modifying a
@@ -419,8 +419,8 @@ and ctx
is a qmckl_context_struct*
pointer.
The main data structure contains pointers to other data structures, @@ -430,7 +430,7 @@ pointers.
typedef struct qmckl_context_struct { +typedef struct qmckl_context_struct { /* Pointer to the previous context, before modification */ struct qmckl_context_struct * prev; @@ -510,8 +510,8 @@ if the context is valid,QMCKL_NULL_CONTEXT
otherwise.
To create a new context, qmckl_context_create()
should be used.
@@ -549,8 +549,8 @@ To create a new context, qmckl_context_create()
should be used.
qmckl_context_previous
returns the previous context. It returns
@@ -572,8 +572,8 @@ To create a new context, qmckl_context_create()
should be used.
For thread safety, the context may be locked/unlocked. The lock is @@ -633,8 +633,8 @@ number of times the thread has locked it is saved in the
qmckl_context_copy
makes a shallow copy of a context. It returns
@@ -680,8 +680,8 @@ number of times the thread has locked it is saved in the
The context is destroyed with qmckl_context_destroy
, leaving the ancestors untouched.
@@ -736,12 +736,12 @@ It frees the context, and returns the previous context.
Pointers to all allocated memory domains are stored in the context, @@ -750,7 +750,7 @@ computation of the amount of currently used memory by the library.
typedef struct qmckl_memory_struct { +typedef struct qmckl_memory_struct { struct qmckl_memory_struct * next ; void * pointer ; size_t size ; @@ -760,8 +760,8 @@ computation of the amount of currently used memory by the library.
The following function, called in qmckl_memory.c
, appends a new
@@ -819,8 +819,8 @@ immediately with QMCKL_SUCCESS
.
The following function, called in qmckl_memory.c
, removes a
@@ -859,11 +859,7 @@ immediately with QMCKL_SUCCESS
.
qmckl_unlock(context);
- if (alloc != NULL) {
- return QMCKL_SUCCESS;
- } else {
- return QMCKL_DEALLOCATION_FAILED;
- }
+ return QMCKL_SUCCESS;
}
QMCKL_SUCCESS
.
#define QMCKL_MAX_FUN_LEN 256 +#define QMCKL_MAX_FUN_LEN 256 #define QMCKL_MAX_MSG_LEN 1024 typedef struct qmckl_error_struct { @@ -894,8 +890,8 @@ immediately withQMCKL_SUCCESS
.
The error is updated in the context using @@ -1044,8 +1040,8 @@ For example, this function can be used as
Controlling numerical precision enables optimizations. Here, the @@ -1053,7 +1049,7 @@ default parameters determining the target numerical precision and range are defined.
-context
is not QMCKL_NULL_CONTEXT
qmckl_exit_code qmckl_distance_sq ( @@ -503,8 +503,8 @@ between all pairs of points in two sets, one point within each set:
integer function qmckl_distance_sq_f(context, transa, transb, m, n, A, LDA, B, LDB, C, LDC) result(info) @@ -637,8 +637,8 @@ between all pairs of points in two sets, one point within each set:
This function might be more efficient when A
and B
are
@@ -651,7 +651,7 @@ transposed.
The library should never make the calling programs abort, nor perform any input/output operations. This decision has to be taken @@ -329,7 +329,7 @@ by the developer of the code calling the library. All the functions return with an exit code, defined as
typedef int32_t qmckl_exit_code; +typedef int32_t qmckl_exit_code;