72 #define PVECTOR(v) CHUNK(v)
73 #define VECTOR gen_chunk*
74 #define PVECTOR_NEWGEN_DOMAIN (-1)
75 #define gen_PVECTOR_cons gen_cons
79 #define DELTAV ((Variable) 12)
80 #define TEMPLATEV ((Variable) 13)
81 #define TSHIFTV ((Variable) 14)
85 #define function_mapping(f) (((f)+1)->h)
89 #define add_to_list_of_vars(l, fun, n)\
90 l = gen_nconc(make_list_of_dummy_variables((entity(*)())fun, n), l);
92 #define one_statement_unstructured(u) \
93 ((control_predecessors(unstructured_control(u)) == NIL) && \
94 (control_successors(unstructured_control(u)) == NIL))
96 #define entity_functional(e) (type_functional(entity_type(e)))
98 #define update_functional_as_model(e, model) \
99 free_functional(entity_functional(e)), \
100 entity_functional(e) = copy_functional(entity_functional(model));
102 #define min(a,b) (((a)<(b))?(a):(b))
103 #define max(a,b) (((a)>(b))?(a):(b))
106 #define iceil(a,b) ((((a)-1)/(b))+1)
108 #ifndef bool_undefined
109 #define bool_undefined ((bool) (-15))
110 #define bool_undefined_p(b) ((b)==bool_undefined)
113 #ifndef int_undefined
114 #define int_undefined ((int) (-15))
115 #define int_undefined_p(i) ((i)==int_undefined)
120 #define GLOBAL_PARAMETERS_H "global_parameters.h"
121 #define GLOBAL_INIT_H "global_init.h"
125 #define HOST_NAME "HOST"
126 #define NODE_NAME "NODE"
138 #define GEN_DEBUG(D, W, P) ifdebug(D) { pips_debug(D, "%s:\n", W); P;}
140 #define DEBUG_MTRX(D, W, M) GEN_DEBUG(D, W, matrix_fprint(stderr, M))
141 #define DEBUG_STAT(D, W, S) GEN_DEBUG(D, W, print_statement(S))
142 #define DEBUG_CODE(D, W, M, S) GEN_DEBUG(D, W, hpfc_print_code(stderr, M, S))
143 #define DEBUG_SYST(D, W, S) GEN_DEBUG(D, W, sc_syst_debug(S))
144 #define DEBUG_ELST(D, W, L)\
145 GEN_DEBUG(D, W, fprint_entity_list(stderr, L); fprintf(stderr, "\n"))
146 #define DEBUG_BASE(D, W, B)\
147 GEN_DEBUG(D, W, base_fprint(stderr, B, (string(*)(Variable))entity_local_name);\
148 fprintf(stderr, "\n"))
150 #define what_stat_debug(level, stat)\
152 { intptr_t so_ = statement_ordering(stat);\
153 pips_debug(level, "statement %p (%"PRIdPTR",%"PRIdPTR":%"PRIdPTR")\n",\
154 stat, ORDERING_NUMBER(so_), ORDERING_STATEMENT(so_), \
155 statement_number(stat));}
159 #define is_movement_collect 0
160 #define is_movement_update 1
161 #define movement_collect_p(t) ((t)==(is_movement_collect))
162 #define movement_update_p(t) ((t)==(is_movement_update))
166 #define SND_TO_C "HPFC SNDTO C"
167 #define SND_TO_H "HPFC SNDTO H"
168 #define SND_TO_A "HPFC SNDTO A"
169 #define SND_TO_A_BY_H "HPFC HSNDTO A"
170 #define SND_TO_O "HPFC SNDTO O"
171 #define SND_TO_OS "HPFC SNDTO OS"
172 #define SND_TO_OOS "HPFC SNDTO OOS"
174 #define SND_TO_HA "HPFC NSNDTO HA"
175 #define SND_TO_NO "HPFC SNDTO NO"
176 #define SND_TO_HNO "HPFC SNDTO HNO"
178 #define RCV_FR_S "HPFC RCVFR S"
179 #define RCV_FR_H "HPFC RCVFR H"
180 #define RCV_FR_C "HPFC RCVFR C"
182 #define RCV_FR_mCS "HPFC RCVFR HNBCAST S"
183 #define RCV_FR_mCH "HPFC RCVFR mCH"
185 #define CMP_COMPUTER "HPFC CMPCOMPUTER"
186 #define CMP_OWNERS "HPFC CMPOWNERS"
187 #define CMP_NEIGHBOUR "HPFC CMPNEIGHBOUR"
188 #define CMP_LID "HPFC CMPLID"
190 #define TWIN_P "HPFC TWIN P"
192 #define CND_SENDERP "HPFC SENDERP"
193 #define CND_OWNERP "HPFC OWNERP"
194 #define CND_COMPUTERP "HPFC COMPUTERP"
195 #define CND_COMPINOWNP "HPFC COMPUTERINOWNERSP"
197 #define LOCAL_IND "HPFC LOCALIND"
198 #define LOCAL_IND_GAMMA "HPFC LOCALINDGAMMA"
199 #define LOCAL_IND_DELTA "HPFC LOCALINDDELTA"
201 #define INIT_NODE "HPFC INIT NODE"
202 #define INIT_HOST "HPFC INIT HOST"
203 #define NODE_END "HPFC NODE END"
204 #define HOST_END "HPFC HOST END"
206 #define HPFC_STOP "HPFC STOP"
208 #define LOOP_BOUNDS "HPFC LOOP BOUNDS"
209 #define SYNCHRO "HPFC SYNCHRO"
210 #define IDIVIDE "HPFC DIVIDE"
212 #define SND_TO_N "HPFC SNDTO N"
213 #define RCV_FR_N "HPFC RCVFR N"
217 #define BUFPCK " BUFPCK"
218 #define BUFUPK " BUFUPK"
220 #define BROADCAST "HPFC BROADCAST "
221 #define GUARDED_BRD "HPFC REMAPBRD "
225 #define HPFC_HCAST "HPFC HCAST"
226 #define HPFC_NCAST "HPFC NCAST"
227 #define HPFC_sN2H "HPFC SND TO HOST"
228 #define HPFC_sH2N "HPFC SND TO NODE"
229 #define HPFC_rH2N "HPFC RCV FROM HOST"
230 #define HPFC_rN2H "HPFC RCV FROM NODE"
234 #define HOST_TIMEON "HPFC HTIMEON"
235 #define NODE_TIMEON "HPFC NTIMEON"
236 #define HOST_TIMEOFF "HPFC HTIMEOFF"
237 #define NODE_TIMEOFF "HPFC NTIMEOFF"
238 #define HPFC_HTELL "HPFC HTELL"
239 #define HPFC_NTELL "HPFC NTELL"
241 #define RENAME_SUFFIX "_rename"
247 #define PVM_INITSEND "pvmfinitsend"
248 #define PVM_SEND "pvmfsend"
249 #define PVM_CAST "pvmfmcast"
250 #define PVM_RECV "pvmfrecv"
251 #define PVM_PACK "pvmfpack"
252 #define PVM_UNPACK "pvmfunpack"
256 #define PVM_BYTE1 "HPFC BYTE1"
257 #define PVM_INTEGER2 "HPFC INTEGER2"
258 #define PVM_INTEGER4 "HPFC INTEGER4"
259 #define PVM_REAL4 "HPFC REAL4"
260 #define PVM_REAL8 "HPFC REAL8"
261 #define PVM_COMPLEX8 "HPFC COMPLEX8"
262 #define PVM_COMPLEX16 "HPFC COMPLEX16"
263 #define PVM_STRING "HPFC STRING"
267 #define MYPOS "MY POS"
268 #define MYLID "MY LID"
269 #define MSTATUS "MSTATUS"
270 #define LIVEMAPPING "LIVE MAPPING"
271 #define NODETIDS "NODE TIDS"
272 #define HOST_TID "HOST TID"
273 #define NBTASKS "MAX SIZE OF PROCS"
274 #define MCASTHOST "MCAST HOST"
275 #define SEND_CHANNELS "SEND CHANNELS"
276 #define RECV_CHANNELS "RECV CHANNELS"
277 #define HOST_SND_CHAN "HOST SND CHANNEL"
278 #define HOST_RCV_CHAN "HOST RCV CHANNEL"
282 #define BUFFER " BUFF"
283 #define BUFSZ " BUFF SIZE"
284 #define BUFFER_INDEX "BUF INDEX"
285 #define BUFFER_SIZE "SIZE OF BUFFER"
286 #define BUFFER_RCV_SIZE "SIZE OF RECEIVED BUFFER"
287 #define LAZY_SEND "LAZY SEND"
288 #define LAZY_RECV "LAZY RECV"
289 #define SND_NOT_INIT "SEND NOT INITIALIZED"
290 #define RCV_NOT_PRF "RECEIVED NOT PERFORMED"
291 #define BUFFER_ENCODING "BUFFER ENCODING"
295 #define T_LID "T LID"
296 #define T_LIDp "T LIDp"
297 #define INFO "HPFC INFO"
298 #define BUFID "HPFC BUFID"
302 #define LAZY_MESSAGES "HPFC_LAZY_MESSAGES"
303 #define USE_BUFFERS "HPFC_USE_BUFFERS"
310 #define set_integer(var, i) \
311 make_assign_statement(entity_to_expression(var), int_to_expression(i))
313 #define set_logical(var, b) \
314 make_assign_statement(entity_to_expression(var),\
315 make_call_expression(MakeConstant \
316 (b ? ".TRUE." : ".FALSE.", is_basic_logical), NIL))
318 #define set_expression(var, e) \
319 make_assign_statement(entity_to_expression(var), e)
321 #define local_index_is_different_p(array, dim) \
322 (new_declaration_tag(array, dim)!=is_hpf_newdecl_none)
324 #define FindArrayDimAlignmentOfArray(array, dim) \
325 (FindAlignmentOfDim(align_alignment(load_hpf_alignment(array)), dim))
327 #define FindTemplateDimAlignmentOfArray(array, dim) \
328 (FindAlignmentOfTemplateDim(align_alignment(load_hpf_alignment(array)), dim))
330 #define array_to_template(array) \
331 (align_template(load_hpf_alignment(array)))
333 #define template_to_processors(template) \
334 (distribute_processors(load_hpf_distribution(template)))
336 #define array_to_processors(array) \
337 (template_to_processors(array_to_template(array)))
339 #define hpfc_name_to_expression(s) \
340 (MakeNullaryCall(hpfc_name_to_entity(s)))
342 #define condition_computerp() \
343 hpfc_name_to_expression(CND_COMPUTERP)
345 #define condition_senderp() \
346 hpfc_name_to_expression(CND_SENDERP)
348 #define condition_ownerp() \
349 hpfc_name_to_expression(CND_OWNERP)
351 #define condition_computer_in_owners() \
352 hpfc_name_to_expression(CND_COMPINOWNP)
354 #define condition_not_computer_in_owners()\
355 (MakeUnaryCall(entity_intrinsic(NOT_OPERATOR_NAME), \
356 condition_computer_in_owners()))
358 #define hpfc_name_to_stmt(s) \
359 (hpfc_make_call_statement(hpfc_name_to_entity(s), NIL))
361 #define st_init_host() hpfc_name_to_stmt(INIT_HOST)
362 #define st_init_node() hpfc_name_to_stmt(INIT_NODE)
363 #define st_host_end() hpfc_name_to_stmt(HOST_END)
364 #define st_node_end() hpfc_name_to_stmt(NODE_END)
366 #define hpfc_name_and_ref_to_stmt(s, val) \
367 st_call_send_or_receive(hpfc_name_to_entity(s), val)
371 #define st_send_to_computer(val) \
372 hpfc_name_and_ref_to_stmt(SND_TO_C, val)
374 #define st_send_to_host(val) \
375 hpfc_name_and_ref_to_stmt(SND_TO_H, val)
377 #define st_send_to_all_nodes(val) \
378 hpfc_name_and_ref_to_stmt(SND_TO_A, val)
380 #define st_host_send_to_all_nodes(val) \
381 hpfc_name_and_ref_to_stmt(SND_TO_A_BY_H, val)
383 #define st_send_to_neighbour() \
384 hpfc_make_call_statement(hpfc_name_to_entity(SND_TO_N), NIL)
386 #define st_send_to_owner(val) \
387 hpfc_name_and_ref_to_stmt(SND_TO_O, val)
389 #define st_send_to_owners(val) \
390 hpfc_name_and_ref_to_stmt(SND_TO_OS, val)
392 #define st_send_to_other_owners(val) \
393 hpfc_name_and_ref_to_stmt(SND_TO_OOS, val)
395 #define st_send_to_host_and_all_nodes(val) \
396 hpfc_name_and_ref_to_stmt(SND_TO_HA, val)
398 #define st_send_to_not_owners(val) \
399 hpfc_name_and_ref_to_stmt(SND_TO_NO, val)
401 #define st_send_to_host_and_not_owners(val) \
402 hpfc_name_and_ref_to_stmt(SND_TO_HNO, val)
407 #define st_receive_from_neighbour() \
408 hpfc_make_call_statement(hpfc_name_to_entity(RCV_FR_N), NIL)
410 #define st_receive_from_sender(goal) \
411 hpfc_name_and_ref_to_stmt(RCV_FR_S, goal)
413 #define st_receive_from_host(goal) \
414 hpfc_name_and_ref_to_stmt(RCV_FR_H, goal)
416 #define st_receive_from_computer(goal) \
417 hpfc_name_and_ref_to_stmt(RCV_FR_C, goal)
419 #define st_receive_mcast_from_sender(goal) \
420 hpfc_name_and_ref_to_stmt(RCV_FR_mCS, goal)
422 #define st_receive_mcast_from_host(goal) \
423 hpfc_name_and_ref_to_stmt(RCV_FR_mCH, goal)
426 #define primary_entity_p(a) (a==load_primary_entity(a))
430 #define hpfc_warning \
431 if (!get_bool_property("HPFC_NO_WARNING")) pips_user_warning
435 #define NO_FILE (strdup(""))
440 #define HOST_SUFFIX "_host.f"
441 #define NODE_SUFFIX "_node.f"
442 #define HINC_SUFFIX "_host.h"
443 #define NINC_SUFFIX "_node.h"
444 #define BOTH_SUFFIX "_both.f"
445 #define PARM_SUFFIX "_parameters.h"
446 #define INIT_SUFFIX "_init.h"
bdt base
Current expression.
void fprint_entity_list(FILE *fp, list l)
void fprint_entity_list(FILE *fp,list l): prints a list of entities on file fp.
list base_to_list(Pbase base)
Most includes are centralized here.
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.