Skip to content

Commit f1b3cb1

Browse files
committed
Swap order of arguments in get_excitation_degree_c
1 parent 109ba4a commit f1b3cb1

5 files changed

Lines changed: 10 additions & 11 deletions

File tree

external/simple_gpu

src/determinants/c_slater_rules.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#include <arm_neon.h>
1111
#endif
1212

13-
void get_excitation_degree_c(const int32_t nint,
14-
const uint64_t *restrict key1,
13+
void get_excitation_degree_c(const uint64_t *restrict key1,
1514
const uint64_t *restrict key2,
16-
int32_t *restrict degree_ptr) {
15+
int32_t *restrict degree_ptr,
16+
const int32_t nint) {
1717

1818
const size_t n = (size_t)nint << 1; // n = Nint * 2
1919
uint64_t total_pop = 0;

src/determinants/slater_rules.irp.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ subroutine get_excitation_degree(key1,key2,degree,Nint)
99
integer(bit_kind), intent(in) :: key1(Nint*2)
1010
integer(bit_kind), intent(in) :: key2(Nint*2)
1111
integer, intent(out) :: degree
12-
call get_excitation_degree_c(Nint,key1,key2,degree)
12+
call get_excitation_degree_c(key1,key2,degree,Nint)
1313
end
1414

1515
subroutine get_excitation_degree_ref(key1,key2,degree,Nint)

src/determinants/slater_rules.org

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module slater_rules_opt
2525

2626
#+begin_src f90 :tangle slater_rules_opt.f90
2727
interface
28-
subroutine get_excitation_degree_c(nint, key1, key2, degree) bind(C)
28+
subroutine get_excitation_degree_c(key1, key2, degree, nint) bind(C)
2929
import :: c_int, c_int64_t
3030
integer(c_int), value, intent(in) :: nint
3131
integer(c_int64_t), intent(in) :: key1(2*nint)
@@ -37,10 +37,10 @@ module slater_rules_opt
3737

3838

3939
#+begin_src c :tangle c_slater_rules.c
40-
void get_excitation_degree_c(const int32_t nint,
41-
const uint64_t *restrict key1,
40+
void get_excitation_degree_c(const uint64_t *restrict key1,
4241
const uint64_t *restrict key2,
43-
int32_t *restrict degree_ptr) {
42+
int32_t *restrict degree_ptr,
43+
const int32_t nint) {
4444

4545
const size_t n = (size_t)nint << 1; // n = Nint * 2
4646
uint64_t total_pop = 0;

src/determinants/slater_rules_opt.f90

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module slater_rules_opt
33
implicit none
44

55
interface
6-
subroutine get_excitation_degree_c(nint, key1, key2, degree) bind(C)
6+
subroutine get_excitation_degree_c(key1, key2, degree, nint) bind(C)
77
import :: c_int, c_int64_t
88
integer(c_int), value, intent(in) :: nint
99
integer(c_int64_t), intent(in) :: key1(2*nint)
@@ -12,5 +12,4 @@ subroutine get_excitation_degree_c(nint, key1, key2, degree) bind(C)
1212
end subroutine get_excitation_degree_c
1313
end interface
1414

15-
1615
end module slater_rules_opt

0 commit comments

Comments
 (0)