aboutsummaryrefslogtreecommitdiff
path: root/src/common/store.c
blob: 1d414fe01f0cd5043a18bdafe3cfb020b5f2d2c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
/* store.c -- store molecule coefficients in Jacobian */
/* $Header$ */

#include "cctk.h"
#include "../InterpLocalUniform.h"

#include "structs.h"
#include "store.h"

/******************************************************************************/

/*
 * 1-D routines
 */

#undef  COEFF
#define COEFF(mi)	Jacobian_ptr[Jacobian_mi_stride*mi]

void AEILocalInterp_store_1dcube2
      (fp factor, const struct coeffs_struct_1d_cube_size2 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride)
{
#include "1d.cube.size2/store-coeffs.c"
}

void AEILocalInterp_store_1dcube3
      (fp factor, const struct coeffs_struct_1d_cube_size3 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride)
{
#include "1d.cube.size3/store-coeffs.c"
}

void AEILocalInterp_store_1dcube4
      (fp factor, const struct coeffs_struct_1d_cube_size4 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride)
{
#include "1d.cube.size4/store-coeffs.c"
}

void AEILocalInterp_store_1dcube5
      (fp factor, const struct coeffs_struct_1d_cube_size5 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride)
{
#include "1d.cube.size5/store-coeffs.c"
}

void AEILocalInterp_store_1dcube6
      (fp factor, const struct coeffs_struct_1d_cube_size6 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride)
{
#include "1d.cube.size6/store-coeffs.c"
}

void AEILocalInterp_store_1dcube7
      (fp factor, const struct coeffs_struct_1d_cube_size7 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride)
{
#include "1d.cube.size7/store-coeffs.c"
}

/******************************************************************************/

/*
 * 2-D routines
 */

#undef  COEFF
#define COEFF(mi,mj)	Jacobian_ptr[   Jacobian_mi_stride*mi \
				      + Jacobian_mj_stride*mj ]

void AEILocalInterp_store_2dcube2
      (fp factor, const struct coeffs_struct_2d_cube_size2 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride, int Jacobian_mj_stride)
{
#include "2d.cube.size2/store-coeffs.c"
}

void AEILocalInterp_store_2dcube3
      (fp factor, const struct coeffs_struct_2d_cube_size3 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride, int Jacobian_mj_stride)
{
#include "2d.cube.size3/store-coeffs.c"
}

void AEILocalInterp_store_2dcube4
      (fp factor, const struct coeffs_struct_2d_cube_size4 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride, int Jacobian_mj_stride)
{
#include "2d.cube.size4/store-coeffs.c"
}

void AEILocalInterp_store_2dcube5
      (fp factor, const struct coeffs_struct_2d_cube_size5 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride, int Jacobian_mj_stride)
{
#include "2d.cube.size5/store-coeffs.c"
}

void AEILocalInterp_store_2dcube6
      (fp factor, const struct coeffs_struct_2d_cube_size6 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride, int Jacobian_mj_stride)
{
#include "2d.cube.size6/store-coeffs.c"
}

/******************************************************************************/

/*
 * 3-D routines
 */

#undef  COEFF
#define COEFF(mi,mj,mk)	Jacobian_ptr[   Jacobian_mi_stride*mi \
				      + Jacobian_mj_stride*mj \
				      + Jacobian_mk_stride*mk ]

void AEILocalInterp_store_3dcube2
      (fp factor, const struct coeffs_struct_3d_cube_size2 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride)
{
#include "3d.cube.size2/store-coeffs.c"
}

void AEILocalInterp_store_3dcube3
      (fp factor, const struct coeffs_struct_3d_cube_size3 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride)
{
#include "3d.cube.size3/store-coeffs.c"
}

void AEILocalInterp_store_3dcube4
      (fp factor, const struct coeffs_struct_3d_cube_size4 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride)
{
#include "3d.cube.size4/store-coeffs.c"
}

void AEILocalInterp_store_3dcube5
      (fp factor, const struct coeffs_struct_3d_cube_size5 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride)
{
#include "3d.cube.size5/store-coeffs.c"
}

void AEILocalInterp_store_3dcube6
      (fp factor, const struct coeffs_struct_3d_cube_size6 *restrict const coeffs,
       fp *restrict Jacobian_ptr,
       int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride)
{
#include "3d.cube.size6/store-coeffs.c"
}