aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetSlab/src/slab.h
blob: 8ee30f837fbb899709affd049bc6ac890505c76b (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
/* $Header:$ */

#ifndef CARPETSLAB_H
#define CARPETSLAB_H

#include "cctk.h"

#ifdef __cplusplus
namespace CarpetSlab {
  extern "C" {
#endif
    
    CCTK_INT CarpetSlab_Get (CCTK_POINTER_TO_CONST const cctkGH,
                             CCTK_INT const mapping_handle,
                             CCTK_INT const proc,
                             CCTK_INT const vindex,
                             CCTK_INT const timelevel,
                             CCTK_INT const hdatatype,
                             void * const hdata);
    
    CCTK_INT CarpetSlab_GetList (CCTK_POINTER_TO_CONST const cctkGH,
                                 CCTK_INT const mapping_handle,
                                 CCTK_INT const num_arrays,
                                 CCTK_INT const * const procs,
                                 CCTK_INT const * const vindices,
                                 CCTK_INT const * const timelevels,
                                 CCTK_INT const * const hdatatypes,
                                 void * const * const hdata,
                                 CCTK_INT * const retvals);
    
    CCTK_INT CarpetSlab_LocalMappingByIndex (CCTK_POINTER_TO_CONST const cctkGH,
                                             CCTK_INT const vindex,
                                             CCTK_INT const hdim,
                                             CCTK_INT const * const direction,
                                             CCTK_INT const * const origin,
                                             CCTK_INT const * const extent,
                                             CCTK_INT const * const downsample,
                                             CCTK_INT const table_handle,
                                             CCTK_INT (* const conversion_fn) (CCTK_INT const nelems,
                                                                               CCTK_INT const src_stride,
                                                                               CCTK_INT const dst_stride,
                                                                               CCTK_INT const src_type,
                                                                               CCTK_INT const dst_type,
                                                                               void const * const from,
                                                                               void * const to),
                                             CCTK_INT * const hsize_local,
                                             CCTK_INT * const hsize_global,
                                             CCTK_INT * const hoffset_global);
    
    CCTK_INT CarpetSlab_GlobalMappingByIndex (CCTK_POINTER_TO_CONST const cctkGH,
                                              CCTK_INT const vindex,
                                              CCTK_INT const hdim,
                                              CCTK_INT const * const direction,
                                              CCTK_INT const * const origin,
                                              CCTK_INT const * const extent,
                                              CCTK_INT const * const downsample,
                                              CCTK_INT const table_handle,
                                              CCTK_INT (* const conversion_fn) (CCTK_INT const nelems,
                                                                                CCTK_INT const src_stride,
                                                                                CCTK_INT const dst_stride,
                                                                                CCTK_INT const src_type,
                                                                                CCTK_INT const dst_type,
                                                                                void const * const from,
                                                                                void * const to),
                                              CCTK_INT * const hsize);
    
    CCTK_INT CarpetSlab_FreeMapping (CCTK_INT const mapping_handle);



    /* Old interface -- don't use */
    int Hyperslab_GetHyperslab (const cGH* const GH,
				const int target_proc,
				const int vindex,
				const int vtimelvl,
				const int hdim,
				const int global_startpoint [/*vdim*/],
				const int directions [/*vdim*/],
				const int lengths [/*hdim*/],
				const int downsample [/*hdim*/],
				void** const hdata,
				int hsize [/*hdim*/]);

#ifdef __cplusplus
  } /* extern "C" */
} /* namespace CarpetSlab */
#endif

#endif /* !defined(CARPETSLAB_H) */