aboutsummaryrefslogtreecommitdiff
path: root/src/common/load-template.h
blob: f4b7bf3453c863631bca12a31d844d9c6905cbb4 (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
/* load-template.h -- prototype template for load functions */
/* $Header$ */

/*
 * Each of the functions defined in this file loades a molecule-sized
 * piece of an input array into a data struct.  There is one function for
 * each combination of molecule size and input array datatype.
 *
 * The following macros should be #defined
 *	LOAD_FUNCTION_NAME
 *	INT_STRIDE_IJK
 *	DATA_STRUCT
 */

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

/*
 * load-data routines for real datatypes
 */

void LOAD_FUNCTION_NAME(r)(const CCTK_REAL *restrict ptr,
			   INT_STRIDE_IJK,
			   struct DATA_STRUCT *restrict data);

#ifdef HAVE_CCTK_REAL4
  void LOAD_FUNCTION_NAME(r4)(const CCTK_REAL4 *restrict ptr,
			      INT_STRIDE_IJK,
			      struct DATA_STRUCT *restrict data);
#endif

#ifdef HAVE_CCTK_REAL8
  void LOAD_FUNCTION_NAME(r8)(const CCTK_REAL8 *restrict ptr,
			      INT_STRIDE_IJK,
			      struct DATA_STRUCT *restrict data);
#endif

#ifdef HAVE_CCTK_REAL16
  void LOAD_FUNCTION_NAME(r16)(const CCTK_REAL16 *restrict ptr,
				INT_STRIDE_IJK,
				struct DATA_STRUCT *restrict data);
#endif

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

/*
 * load-data routines for complex datatypes
 */

void LOAD_FUNCTION_NAME(c)(const CCTK_REAL (*restrict ptr)[COMPLEX_N_PARTS],
			   INT_STRIDE_IJK, int part,
			   struct DATA_STRUCT *restrict data);

#ifdef HAVE_CCTK_COMPLEX8
  void LOAD_FUNCTION_NAME(c8)(const CCTK_REAL4 (*restrict ptr)[COMPLEX_N_PARTS],
			      INT_STRIDE_IJK, int part,
			      struct DATA_STRUCT *restrict data);
#endif

#ifdef HAVE_CCTK_COMPLEX16
  void LOAD_FUNCTION_NAME(c16)(const CCTK_REAL8 (*restrict ptr)[COMPLEX_N_PARTS],
				INT_STRIDE_IJK, int part,
				struct DATA_STRUCT *restrict data);
#endif

#ifdef HAVE_CCTK_COMPLEX32
  void LOAD_FUNCTION_NAME(c32)(const CCTK_REAL16 (*restrict ptr)[COMPLEX_N_PARTS],
				INT_STRIDE_IJK, int part,
				struct DATA_STRUCT *restrict data);
#endif