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
|
#ifndef OPERATOR_PROTOTYPES_4D
#define OPERATOR_PROTOTYPES_4D
#include <cctk.h>
#include <cstdlib>
#include "defs.hh"
#include "bbox.hh"
#include "vect.hh"
#include "operator_prototypes.hh"
namespace CarpetLib {
using namespace std;
static inline
size_t
index4 (size_t const i, size_t const j, size_t const k, size_t const kl,
size_t const exti, size_t const extj, size_t const extk, size_t const extl)
CCTK_ATTRIBUTE_CONST;
static inline
size_t
index4 (size_t const i, size_t const j, size_t const k, size_t const l,
size_t const exti, size_t const extj, size_t const extk, size_t const extl)
{
#ifdef CARPET_DEBUG
assert (static_cast <ptrdiff_t> (i) >= 0 and i < exti);
assert (static_cast <ptrdiff_t> (j) >= 0 and j < extj);
assert (static_cast <ptrdiff_t> (k) >= 0 and k < extk);
assert (static_cast <ptrdiff_t> (l) >= 0 and l < extl);
#endif
return i + exti * (j + extj * (k + extk * l));
}
static int const dim4 = 4;
typedef vect <bool, dim4> bvect4;
typedef vect <int, dim4> ivect4;
typedef bbox <int, dim4> ibbox4;
template <typename T>
void
copy_4d (T const * restrict const src,
ivect4 const & restrict srcext,
T * restrict const dst,
ivect4 const & restrict dstext,
ibbox4 const & restrict srcbbox,
ibbox4 const & restrict dstbbox,
ibbox4 const & restrict regbbox);
template <typename T>
void
prolongate_4d_o1_rf2 (T const * restrict const src,
ivect4 const & restrict srcext,
T * restrict const dst,
ivect4 const & restrict dstext,
ibbox4 const & restrict srcbbox,
ibbox4 const & restrict dstbbox,
ibbox4 const & restrict regbbox);
template <typename T>
void
restrict_4d_rf2 (T const * restrict const src,
ivect4 const & restrict srcext,
T * restrict const dst,
ivect4 const & restrict dstext,
ibbox4 const & restrict srcbbox,
ibbox4 const & restrict dstbbox,
ibbox4 const & restrict regbbox);
} // namespace CarpetLib
#endif // #ifndef OPERATOR_PROTOTYPES_4D
|