1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-11-19 20:42:50 +01:00

Merge branch 'main' into patch-1

This commit is contained in:
vijay 2020-10-15 12:19:35 +02:00 committed by GitHub
commit 920f1a01d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 14 deletions

19
.github/workflows/test-build.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: test-build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: sudo apt-get install emacs
- name: make
run: make -C src/

View File

@ -1,4 +1,7 @@
# qmckl # qmckl
![Build Status](https://github.com/TREX-CoE/qmckl/workflows/test-build/badge.svg?branch=main)
Quantum Monte Carlo Kernel Library. Quantum Monte Carlo Kernel Library.
See the [Wiki](https://github.com/TREX-CoE/qmckl/wiki) for more information. See the [Wiki](https://github.com/TREX-CoE/qmckl/wiki) for more information.

View File

@ -4,10 +4,13 @@ CFLAGS=
FC=gfortran FC=gfortran
FFLAGS= FFLAGS=
SOURCE_FILES=$(wildcard *.org) ORG_SOURCE_FILES=qmckl_context.org
OBJECT_FILES=$(patsubst %.org,%.o,$(ORG_SOURCE_FILES))
.PHONY: clean .PHONY: clean
all: $(OBJECT_FILES)
%.c %.h: %.org %.c %.h: %.org
emacs --quick --no-init-file --batch --eval "(require 'org)" --eval '(org-babel-tangle-file "$^")' emacs --quick --no-init-file --batch --eval "(require 'org)" --eval '(org-babel-tangle-file "$^")'

View File

@ -66,11 +66,11 @@ qmckl_context qmckl_context_create() {
** =qmckl_context_copy= ** =qmckl_context_copy=
#+BEGIN_SRC C :tangle qmckl_context.h #+BEGIN_SRC C :tangle qmckl_context.h
qmckl_context qmckl_context_copy(qmckl_context context); qmckl_context qmckl_context_copy(const qmckl_context context);
#+END_SRC #+END_SRC
#+BEGIN_SRC C :tangle qmckl_context.c #+BEGIN_SRC C :tangle qmckl_context.c
qmckl_context qmckl_context_copy(qmckl_context context) { qmckl_context qmckl_context_copy(const qmckl_context context) {
qmckl_context_struct* old_context; qmckl_context_struct* old_context;
qmckl_context_struct* new_context; qmckl_context_struct* new_context;
@ -123,11 +123,11 @@ qmckl_context qmckl_context_destroy(qmckl_context context) {
** =qmckl_context_set_precision= ** =qmckl_context_set_precision=
#+BEGIN_SRC C :tangle qmckl_context.h #+BEGIN_SRC C :tangle qmckl_context.h
qmckl_context qmckl_context_set_precision(qmckl_context context, int precision); qmckl_context qmckl_context_set_precision(const qmckl_context context, int precision);
#+END_SRC #+END_SRC
#+BEGIN_SRC C :tangle qmckl_context.c #+BEGIN_SRC C :tangle qmckl_context.c
qmckl_context qmckl_context_set_precision(qmckl_context context, int precision) { qmckl_context qmckl_context_set_precision(const qmckl_context context, int precision) {
qmckl_context_struct* ctx; qmckl_context_struct* ctx;
if (precision < 2) return (qmckl_context) 0; if (precision < 2) return (qmckl_context) 0;
@ -141,11 +141,11 @@ qmckl_context qmckl_context_set_precision(qmckl_context context, int precision)
** =qmckl_context_set_range= ** =qmckl_context_set_range=
#+BEGIN_SRC C :tangle qmckl_context.h #+BEGIN_SRC C :tangle qmckl_context.h
qmckl_context qmckl_context_set_range(qmckl_context context, int range); qmckl_context qmckl_context_set_range(const qmckl_context context, int range);
#+END_SRC #+END_SRC
#+BEGIN_SRC C :tangle qmckl_context.c #+BEGIN_SRC C :tangle qmckl_context.c
qmckl_context qmckl_context_set_range(qmckl_context context, int range) { qmckl_context qmckl_context_set_range(const qmckl_context context, int range) {
qmckl_context_struct* ctx; qmckl_context_struct* ctx;
if (range < 2) return (qmckl_context) 0; if (range < 2) return (qmckl_context) 0;
@ -162,11 +162,11 @@ qmckl_context qmckl_context_set_range(qmckl_context context, int range) {
** =qmckl_context_get_precision= ** =qmckl_context_get_precision=
#+BEGIN_SRC C :tangle qmckl_context.h #+BEGIN_SRC C :tangle qmckl_context.h
int qmckl_context_get_precision(qmckl_context context); int qmckl_context_get_precision(const qmckl_context context);
#+END_SRC #+END_SRC
#+BEGIN_SRC C :tangle qmckl_context.c #+BEGIN_SRC C :tangle qmckl_context.c
int qmckl_context_get_precision(qmckl_context context) { int qmckl_context_get_precision(const qmckl_context context) {
qmckl_context_struct* ctx; qmckl_context_struct* ctx;
ctx = (qmckl_context_struct*) context; ctx = (qmckl_context_struct*) context;
return ctx->precision; return ctx->precision;
@ -176,11 +176,11 @@ int qmckl_context_get_precision(qmckl_context context) {
** =qmckl_context_get_range= ** =qmckl_context_get_range=
#+BEGIN_SRC C :tangle qmckl_context.h #+BEGIN_SRC C :tangle qmckl_context.h
int qmckl_context_get_range(qmckl_context context); int qmckl_context_get_range(const qmckl_context context);
#+END_SRC #+END_SRC
#+BEGIN_SRC C :tangle qmckl_context.c #+BEGIN_SRC C :tangle qmckl_context.c
int qmckl_context_get_range(qmckl_context context) { int qmckl_context_get_range(const qmckl_context context) {
qmckl_context_struct* ctx; qmckl_context_struct* ctx;
ctx = (qmckl_context_struct*) context; ctx = (qmckl_context_struct*) context;
return ctx->range; return ctx->range;