summaryrefslogtreecommitdiff
path: root/src/include/cctk_Schedule.h
blob: 8e14fc2bfbfe52d4ddf38af6166861f726e47c5d (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
 /*@@
   @header    cctk_schedule.h
   @date      Thu Sep 16 19:05:27 1999
   @author    Tom Goodale
   @desc 
   Routines for creating schedule stuff.
   @enddesc 
   @version $Header$
 @@*/

#ifndef _CCTK_SCHEDULE_H_
#define _CCTK_SCHEDULE_H_

typedef enum {LangNone, LangC, LangFortran} cLanguage;

typedef enum {FunctionNoArgs, FunctionStandard} cFunctionType;

typedef struct
{
  cLanguage language;

  int (*FortranCaller)(cGH *, void *);

  cFunctionType type;

  int n_SyncGroups;

  int *SyncGroups;

} cFunctionData;

#ifdef __cplusplus
extern "C" {
#endif

  /*int CCTK_ScheduleFunction(void *function,
                          const char *name,
                          const char *thorn,
                          const char *implementation,
                          const char *description,
                          const char *where,
                          const char *language,
                          int n_mem_groups,
                          int n_comm_groups,
                          int n_trigger_groups,
                          int n_before,
                          int n_after,
                          int n_while,
                          ...);

int CCTK_ScheduleGroup(const char *name,
                       const char *thorn,
                       const char *implementation,
                       const char *description,
                       const char *where,
                       int n_mem_groups,
                       int n_comm_groups,
                       int n_trigger_groups,
                       int n_before,
                       int n_after,
                       int n_while,
                       ...);

int CCTK_ScheduleGroupStorage(const char *group);

int CCTK_ScheduleGroupComm(const char *group);

int CCTK_ScheduleTraverse(const char *where, 
                          void *GH,   
                          int (*calling_function)(void *, void *, void *));

int CCTK_ScheduleGHInit(void *GH);
  */

int CCTK_SchedulePrint(const char *where);
int CCTK_SchedulePrintTimes(const char *where);

cLanguage CCTK_TranslateLanguage(const char *sval);

#ifdef __cplusplus
}
#endif

#endif /*_CCTK_SCHEDULE_H_*/