-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathoculus.macros
183 lines (118 loc) · 4.33 KB
/
oculus.macros
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
! this file, ext.F90, has been constructed by macro expansion; see ext.h for source;
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
m4_changequote({,})m4_dnl ; can put comments here;
m4_changecom(!)m4_dnl ; can put comments here;
m4_define(INTEGER,integer)m4_dnl ; can put comments here;
m4_define(REAL,real)m4_dnl ; can put comments here;
m4_define(CHARACTER,character)m4_dnl ; can put comments here;
m4_define(RALLOCATE,{
!macro expansion of rallocate
#ifdef DEBUG
if( allocated($1) ) then
cput = zero
write(0,'("macros : ",f10.2," : myid=",i3," ; $1 already allocated ;")') cput-cpus, myid
stop '$1 allocated'
endif
if( Wmacros ) write(ounit,'("macros : ", 10x ," : myid=",i3," ; allocating $1 ;")') myid
#endif
allocate( $1$2, stat=astat )
#ifdef DEBUG
if( astat.ne.0 ) then
cput = zero
write(0,'("macros : ",f10.2," : myid=",i3," ; error allocating $1 ;")') cput-cpus, myid
stop 'error allocating $1'
endif
if( Wmacros ) write(ounit,'("macros : ", 10x ," : myid=",i3," ; allocated $1 ;")') myid
#endif
$1$2 = zero
})m4_dnl ; can put comments here;
m4_define(IALLOCATE,{
!macro expansion of iallocate
#ifdef DEBUG
if( allocated($1) ) then
cput = zero
write(0,'("macros : ",f10.2," : myid=",i3," ; $1 already allocated ;")') cput-cpus, myid
stop '$1 allocated'
endif
if( Wmacros ) write(ounit,'("macros : ", 10x ," : myid=",i3," ; allocating $1 ;")') myid
#endif
allocate( $1$2, stat=astat )
#ifdef DEBUG
if( astat.ne.0 ) then
cput = zero
write(0,'("macros : ",f10.2," : myid=",i3," ; error allocating $1 ;")') cput-cpus, myid
stop 'error allocating $1'
endif
if( Wmacros ) write(ounit,'("macros : ", 10x ," : myid=",i3," ; allocated $1 ;")') myid
#endif
$1$2 = 0
})m4_dnl ; can put comments here;
m4_define(LALLOCATE,{
!macro expansion of lallocate
#ifdef DEBUG
if(allocated($1)) then
cput = zero
write(0,'("macros : ",f10.2," : myid=",i3," ; $1 already allocated ;")') cput-cpus, myid
stop '$1 allocated'
endif
if( Wmacros ) write(ounit,'("macros : ", 10x ," : myid=",i3," ; allocating $1 ;")') myid
#endif
allocate($1$2,stat=astat)
#ifdef DEBUG
if( astat.ne.0 ) then
cput = zero
write(0,'("macros : ",f10.2," : myid=",i3," ; error allocating $1 ;")') cput-cpus, myid
stop 'error allocating $1'
endif
if( Wmacros ) write(ounit,'("macros : ", 10x ," : myid=",i3," ; allocated $1 ;")') myid
#endif
$1$2 = .false.
})m4_dnl ; can put comments here;
m4_define(ALLOCATE,{
!macro expansion of allocate
#ifdef DEBUG
if( allocated($1) ) then
cput = zero
write(0,'("macros : ",f10.2," : myid=",i3," ; $1 already allocated ;")') cput-cpus, myid
stop '$1 allocated'
endif
if( Wmacros ) write(ounit,'("macros : ", 10x ," : myid=",i3," ; allocating $1 ;")') myid
#endif
allocate($1$2,stat=astat)
#ifdef DEBUG
if( astat.ne.0 ) then
cput = zero
write(0,'("macros : ",f10.2," : myid=",i3," ; error allocating $1 ;")') cput-cpus, myid
stop 'error allocating $1'
endif
if( Wmacros ) write(ounit,'("macros : ", 10x ," : myid=",i3," ; allocated $1 ;")') myid
#endif
})m4_dnl ; can put comments here;
m4_define(DEALLOCATE,{
!macro expansion of deallocate
#ifdef DEBUG
if( .not.allocated($1) ) then
cput = zero
write(0,'("macros : ",f10.2," : myid=",i3," ; $1 not allocated ;")') cput-cpus, myid
stop '$1 allocated'
endif
if( Wmacros ) write(ounit,'("macros : ", 10x ," : myid=",i3," ; de-allocating $1 ;")') myid
#endif
deallocate($1,stat=astat)
#ifdef DEBUG
if( astat.ne.0 ) then
cput = zero
write(0,'("macros : ",f10.2," : myid=",i3," ; error de-allocating $1 ;")') cput-cpus, myid
stop 'error allocating $1'
endif
if( Wmacros ) write(ounit,'("macros : ", 10x ," : myid=",i3," ; de-allocated $1 ;")') myid
#endif
})m4_dnl ; can put comments here;
m4_define(FATALERROR,
!macro expansion of fatalerror
if( $2 ) then
write(0,'("$1 : fatal : $2 ; $3 ;")')
stop "$1 : $2 ; $3 ;"
endif
)m4_dnl ; can put comments here;