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

Added const attributes

This commit is contained in:
Anthony Scemama 2020-10-31 19:07:57 +01:00
parent cd93e6dc91
commit 00a051af49
3 changed files with 27 additions and 22 deletions

View File

@ -84,10 +84,10 @@ MunitResult test_qmckl_ao() {
*** Header *** Header
#+BEGIN_SRC C :comments link :tangle qmckl_ao.h #+BEGIN_SRC C :comments link :tangle qmckl_ao.h
qmckl_exit_code qmckl_ao_powers(qmckl_context context, qmckl_exit_code qmckl_ao_powers(const qmckl_context context,
int64_t n, const int64_t n,
double *X, int32_t *LMAX, const double *X, const int32_t *LMAX,
double *P, int64_t LDP); const double *P, const int64_t LDP);
#+END_SRC #+END_SRC
*** Source *** Source
@ -234,11 +234,11 @@ munit_assert_int(0, ==, test_qmckl_ao_powers(context));
*** Header *** Header
#+BEGIN_SRC C :comments link :tangle qmckl_ao.h #+BEGIN_SRC C :comments link :tangle qmckl_ao.h
qmckl_exit_code qmckl_ao_polynomial_vgl(qmckl_context context, qmckl_exit_code qmckl_ao_polynomial_vgl(const qmckl_context context,
double *X, double *R, const double *X, const double *R,
int32_t lmax, int64_t *n, const int32_t lmax, const int64_t *n,
int32_t *L, int64_t ldl, const int32_t *L, const int64_t ldl,
double *VGL, int64_t ldv); const double *VGL, const int64_t ldv);
#+END_SRC #+END_SRC
*** Source *** Source

View File

@ -275,11 +275,12 @@ qmckl_exit_code qmckl_context_destroy(qmckl_context context) {
The update functions return =QMCKL_SUCCESS= or =QMCKL_FAILURE=. The update functions return =QMCKL_SUCCESS= or =QMCKL_FAILURE=.
** =qmckl_context_update_precision= ** =qmckl_context_update_precision=
*** Source *** Header
#+BEGIN_SRC C :comments link :tangle qmckl_context.h #+BEGIN_SRC C :comments link :tangle qmckl_context.h
qmckl_exit_code qmckl_context_update_precision(const qmckl_context context, const int precision); qmckl_exit_code qmckl_context_update_precision(const qmckl_context context, const int precision);
#+END_SRC #+END_SRC
*** Source
#+BEGIN_SRC C :comments link :tangle qmckl_context.c #+BEGIN_SRC C :comments link :tangle qmckl_context.c
qmckl_exit_code qmckl_context_update_precision(const qmckl_context context, const int precision) { qmckl_exit_code qmckl_context_update_precision(const qmckl_context context, const int precision) {
qmckl_context_struct* ctx; qmckl_context_struct* ctx;
@ -297,11 +298,12 @@ qmckl_exit_code qmckl_context_update_precision(const qmckl_context context, cons
*** TODO Tests :noexport: *** TODO Tests :noexport:
** =qmckl_context_update_range= ** =qmckl_context_update_range=
*** Source *** Header
#+BEGIN_SRC C :comments link :tangle qmckl_context.h #+BEGIN_SRC C :comments link :tangle qmckl_context.h
qmckl_exit_code qmckl_context_update_range(const qmckl_context context, const int range); qmckl_exit_code qmckl_context_update_range(const qmckl_context context, const int range);
#+END_SRC #+END_SRC
*** Source
#+BEGIN_SRC C :comments link :tangle qmckl_context.c #+BEGIN_SRC C :comments link :tangle qmckl_context.c
qmckl_exit_code qmckl_context_update_range(const qmckl_context context, const int range) { qmckl_exit_code qmckl_context_update_range(const qmckl_context context, const int range) {
qmckl_context_struct* ctx; qmckl_context_struct* ctx;
@ -319,11 +321,12 @@ qmckl_exit_code qmckl_context_update_range(const qmckl_context context, const in
*** TODO Tests :noexport: *** TODO Tests :noexport:
** =qmckl_context_set_precision= ** =qmckl_context_set_precision=
*** Source *** Header
#+BEGIN_SRC C :comments link :tangle qmckl_context.h #+BEGIN_SRC C :comments link :tangle qmckl_context.h
qmckl_context qmckl_context_set_precision(const qmckl_context context, const int precision); qmckl_context qmckl_context_set_precision(const qmckl_context context, const int precision);
#+END_SRC #+END_SRC
*** Source
#+BEGIN_SRC C :comments link :tangle qmckl_context.c #+BEGIN_SRC C :comments link :tangle qmckl_context.c
qmckl_context qmckl_context_set_precision(const qmckl_context context, const int precision) { qmckl_context qmckl_context_set_precision(const qmckl_context context, const int precision) {
qmckl_context new_context; qmckl_context new_context;
@ -339,11 +342,12 @@ qmckl_context qmckl_context_set_precision(const qmckl_context context, const int
*** TODO Tests :noexport: *** TODO Tests :noexport:
** =qmckl_context_set_range= ** =qmckl_context_set_range=
*** Source *** Header
#+BEGIN_SRC C :comments link :tangle qmckl_context.h #+BEGIN_SRC C :comments link :tangle qmckl_context.h
qmckl_context qmckl_context_set_range(const qmckl_context context, const int range); qmckl_context qmckl_context_set_range(const qmckl_context context, const int range);
#+END_SRC #+END_SRC
*** Source
#+BEGIN_SRC C :comments link :tangle qmckl_context.c #+BEGIN_SRC C :comments link :tangle qmckl_context.c
qmckl_context qmckl_context_set_range(const qmckl_context context, const int range) { qmckl_context qmckl_context_set_range(const qmckl_context context, const int range) {
qmckl_context new_context; qmckl_context new_context;
@ -360,11 +364,12 @@ qmckl_context qmckl_context_set_range(const qmckl_context context, const int ran
*** TODO Tests :noexport: *** TODO Tests :noexport:
** =qmckl_context_get_precision= ** =qmckl_context_get_precision=
*** Source *** Header
#+BEGIN_SRC C :comments link :tangle qmckl_context.h #+BEGIN_SRC C :comments link :tangle qmckl_context.h
int qmckl_context_get_precision(const qmckl_context context); int qmckl_context_get_precision(const qmckl_context context);
#+END_SRC #+END_SRC
*** Source
#+BEGIN_SRC C :comments link :tangle qmckl_context.c #+BEGIN_SRC C :comments link :tangle qmckl_context.c
int qmckl_context_get_precision(const qmckl_context context) { int qmckl_context_get_precision(const qmckl_context context) {
qmckl_context_struct* ctx; qmckl_context_struct* ctx;
@ -375,12 +380,12 @@ int qmckl_context_get_precision(const qmckl_context context) {
*** TODO Tests :noexport: *** TODO Tests :noexport:
** =qmckl_context_get_range= ** =qmckl_context_get_range=
*** Source *** Header
#+BEGIN_SRC C :comments link :tangle qmckl_context.h #+BEGIN_SRC C :comments link :tangle qmckl_context.h
int qmckl_context_get_range(const qmckl_context context); int qmckl_context_get_range(const qmckl_context context);
#+END_SRC #+END_SRC
*** Source
#+BEGIN_SRC C :comments link :tangle qmckl_context.c #+BEGIN_SRC C :comments link :tangle qmckl_context.c
int qmckl_context_get_range(const qmckl_context context) { int qmckl_context_get_range(const qmckl_context context) {
qmckl_context_struct* ctx; qmckl_context_struct* ctx;

View File

@ -81,12 +81,12 @@ MunitResult test_qmckl_distance() {
*** Header *** Header
#+BEGIN_SRC C :comments link :tangle qmckl_distance.h #+BEGIN_SRC C :comments link :tangle qmckl_distance.h
qmckl_exit_code qmckl_distance_sq(qmckl_context context, qmckl_exit_code qmckl_distance_sq(const qmckl_context context,
char transa, char transb, const char transa, const char transb,
int64_t m, int64_t n, const int64_t m, const int64_t n,
double *A, int64_t lda, const double *A, const int64_t lda,
double *B, int64_t ldb, const double *B, const int64_t ldb,
double *C, int64_t ldc); const double *C, const int64_t ldc);
#+END_SRC #+END_SRC
*** Source *** Source