summaryrefslogtreecommitdiff
path: root/src/include/cctk_Schedule.h
blob: e291aa5ca231434fd39a374d689dcf0bdce4296a (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
 /*@@
   @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, FunctionOneArg, FunctionStandard} cFunctionType;

typedef struct
{
  cLanguage language;
  
  int (*FortranCaller)(cGH *, void *);

  cFunctionType type;

  int n_SyncGroups;

  int *SyncGroups;

  /* Option Flags */

  int global;

  /* The last items should be considered volatile and may
     not stay here */

  int n_TriggerGroups;
  int *TriggerGroups;
  char *where;
  char *routine;
  char *thorn;

} cFunctionData;

#ifdef __cplusplus
extern "C" 
{
#endif

int CCTK_CallFunction(void *function, 
                      cFunctionData *fdata, 
                      void *data);

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

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

cLanguage CCTK_TranslateLanguage(const char *sval);

  /*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);
  */


#ifdef __cplusplus
}
#endif

#endif /*_CCTK_SCHEDULE_H_*/