@@ -29,47 +29,47 @@ inline double cross_z(double a0, double a1, double a2, double b0, double b1,
2929// ----------------------------------------------------------------------------
3030// From exch.c
3131
32- void compute_exch_field (double * spin , double * field , double * energy , double Jx ,
33- double Jy , double Jz , int * ngbs , int n , int n_ngbs );
32+ void compute_exch_field (double * restrict spin , double * restrict field , double * restrict energy , double Jx ,
33+ double Jy , double Jz , int * restrict ngbs , int n , int n_ngbs );
3434
35- void compute_exch_field_spatial (double * spin , double * field , double * energy ,
36- double * J , int * ngbs , int n , int n_ngbs );
35+ void compute_exch_field_spatial (double * restrict spin , double * restrict field , double * restrict energy ,
36+ double * restrict J , int * restrict ngbs , int n , int n_ngbs );
3737
38- double compute_exch_energy (double * spin , double Jx , double Jy , double Jz ,
38+ double compute_exch_energy (double * restrict spin , double Jx , double Jy , double Jz ,
3939 int nx , int ny , int nz , int xperiodic ,
4040 int yperiodic );
4141
42- void compute_full_exch_field (double * spin , double * field , double * energy ,
43- double * J , int * ngbs , int n , int n_ngbs ,
44- int n_shells , int * n_ngbs_shell , int * sum_ngbs_shell
42+ void compute_full_exch_field (double * restrict spin , double * restrict field , double * restrict energy ,
43+ double * restrict J , int * restrict ngbs , int n , int n_ngbs ,
44+ int n_shells , int * restrict n_ngbs_shell , int * restrict sum_ngbs_shell
4545 );
4646
4747// -----------------------------------------------------------------------------
4848// From anis.c
4949
50- void compute_anis (double * spin , double * field , double * energy , double * Ku ,
51- double * axis , int n );
52- void compute_anis_cubic (double * spin , double * field , double * energy ,
50+ void compute_anis (double * restrict spin , double * restrict field , double * restrict energy , double * restrict Ku ,
51+ double * restrict axis , int n );
52+ void compute_anis_cubic (double * restrict spin , double * restrict field , double * restrict energy ,
5353 double * Kc , int n );
5454
5555// ----------------------------------------------------------------------------
5656// From dmi.c
5757
58- void dmi_field_bulk (double * spin , double * field , double * energy , double * D ,
59- int * ngbs , int n , int n_ngbs );
58+ void dmi_field_bulk (double * restrict spin , double * restrict field , double * restrict energy , double * D ,
59+ int * restrict ngbs , int n , int n_ngbs );
6060
6161void dmi_field_interfacial_atomistic (double * spin , double * field ,
6262 double * energy , double D , int * ngbs , int n ,
6363 int n_ngbs , int n_ngbs_dmi , double * DMI_vec );
6464
65- double dmi_energy (double * spin , double D , int nx , int ny , int nz , int xperiodic ,
65+ double dmi_energy (double * restrict spin , double D , int nx , int ny , int nz , int xperiodic ,
6666 int yperiodic );
6767
6868// ----------------------------------------------------------------------------
6969// From demag_full.c
7070
71- void demag_full (double * spin , double * field , double * energy , double * coords ,
72- double * mu_s , double * mu_s_scale , int n );
71+ void demag_full (double * restrict spin , double * restrict field , double * restrict energy , double * restrict coords ,
72+ double * restrict mu_s , double * restrict mu_s_scale , int n );
7373
7474// ----------------------------------------------------------------------------
7575// From util.c
@@ -93,15 +93,15 @@ void compute_px_py_c(double *spin, int nx, int ny, int nz, double *px,
9393
9494void normalise (double * m , int * pins , int n );
9595
96- void llg_rhs_dw_c (double * m , double * h , double * dm , double * T , double * alpha ,
97- double * mu_s_inv , int * pins , double * eta , int n , double gamma ,
96+ void llg_rhs_dw_c (double * restrict m , double * restrict h , double * restrict dm , double * restrict T , double * restrict alpha ,
97+ double * restrict mu_s_inv , int * pins , double * restrict eta , int n , double gamma ,
9898 double dt );
9999
100100// ----------------------------------------------------------------------------
101101// From mc.c
102102
103- void llg_s_rhs (double * dm_dt , double * spin , double * h , double * alpha ,
104- double * chi , double gamma , int n );
103+ void llg_s_rhs (double * restrict dm_dt , double * restrict spin , double * restrict h , double * restrict alpha ,
104+ double * restrict chi , double gamma , int n );
105105
106106void run_step_mc (mt19937_state * state , double * spin , double * new_spin ,
107107 int * ngbs , int * nngbs , int n_ngbs , double J , double J1 , double D ,
0 commit comments