** =qmckl.h= header file This file produces the =qmckl.h= header file, which is to be included when qmckl functions are used. We also create here the =qmckl_f.f90= which is the Fortran interface file. *** Top of header files :noexport: #+BEGIN_SRC C :tangle qmckl.h #ifndef QMCKL_H #define QMCKL_H #include #include #include #+END_SRC #+BEGIN_SRC f90 :tangle qmckl_f.f90 module qmckl use, intrinsic :: iso_c_binding #+END_SRC The bottoms of the files are located in the [[qmckl_footer.org]] file. *** Constants **** Success/failure These are the codes returned by the functions to indicate success or failure. All such functions should have as a return type =qmckl_exit_code=. #+BEGIN_SRC C :comments org :tangle qmckl.h #define QMCKL_SUCCESS 0 #define QMCKL_FAILURE 1 typedef int32_t qmckl_exit_code; typedef int64_t qmckl_context ; #+END_SRC #+BEGIN_SRC f90 :comments org :tangle qmckl_f.f90 integer, parameter :: QMCKL_SUCCESS = 0 integer, parameter :: QMCKL_FAILURE = 0 #+END_SRC **** Precision-related constants Controlling numerical precision enables optimizations. Here, the default parameters determining the target numerical precision and range are defined. #+BEGIN_SRC C :comments org :tangle qmckl.h #define QMCKL_DEFAULT_PRECISION 53 #define QMCKL_DEFAULT_RANGE 11 #+END_SRC #+BEGIN_SRC f90 :comments org :tangle qmckl_f.f90 integer, parameter :: QMCKL_DEFAULT_PRECISION = 53 integer, parameter :: QMCKL_DEFAULT_RANGE = 11 #+END_SRC # -*- mode: org -*- # vim: syntax=c