OpenScop  0.9.0
statement.c
Go to the documentation of this file.
1 
2  /*+-----------------------------------------------------------------**
3  ** OpenScop Library **
4  **-----------------------------------------------------------------**
5  ** statement.c **
6  **-----------------------------------------------------------------**
7  ** First version: 30/04/2008 **
8  **-----------------------------------------------------------------**
9 
10 
11  *****************************************************************************
12  * OpenScop: Structures and formats for polyhedral tools to talk together *
13  *****************************************************************************
14  * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, *
15  * / / / // // // // / / / // // / / // / /|,_, *
16  * / / / // // // // / / / // // / / // / / / /\ *
17  * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ *
18  * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ *
19  * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ *
20  * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ *
21  * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ *
22  * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ *
23  * | I | | | | e | | | | | | | | | | | | | \ \ \ *
24  * | T | | | | | | | | | | | | | | | | | \ \ \ *
25  * | E | | | | | | | | | | | | | | | | | \ \ \ *
26  * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ *
27  * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / *
28  * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' *
29  * *
30  * Copyright (C) 2008 University Paris-Sud 11 and INRIA *
31  * *
32  * (3-clause BSD license) *
33  * Redistribution and use in source and binary forms, with or without *
34  * modification, are permitted provided that the following conditions *
35  * are met: *
36  * *
37  * 1. Redistributions of source code must retain the above copyright notice, *
38  * this list of conditions and the following disclaimer. *
39  * 2. Redistributions in binary form must reproduce the above copyright *
40  * notice, this list of conditions and the following disclaimer in the *
41  * documentation and/or other materials provided with the distribution. *
42  * 3. The name of the author may not be used to endorse or promote products *
43  * derived from this software without specific prior written permission. *
44  * *
45  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR *
46  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES *
47  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. *
48  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, *
49  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT *
50  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, *
51  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *
52  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
53  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF *
54  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
55  * *
56  * OpenScop Library, a library to manipulate OpenScop formats and data *
57  * structures. Written by: *
58  * Cedric Bastoul <Cedric.Bastoul@u-psud.fr> and *
59  * Louis-Noel Pouchet <Louis-Noel.pouchet@inria.fr> *
60  * *
61  *****************************************************************************/
62 
63 
64 #include <stdlib.h>
65 #include <stdio.h>
66 #include <string.h>
67 #include <ctype.h>
68 
69 #include <osl/macros.h>
70 #include <osl/util.h>
71 #include <osl/strings.h>
72 #include <osl/body.h>
73 #include <osl/relation.h>
74 #include <osl/relation_list.h>
75 #include <osl/names.h>
76 #include <osl/interface.h>
77 #include <osl/generic.h>
78 #include <osl/statement.h>
79 
80 
81 /*+***************************************************************************
82  * Structure display functions *
83  *****************************************************************************/
84 
85 
96 void osl_statement_idump(FILE * file, osl_statement_p statement, int level) {
97  int j, first = 1, number = 1;
98 
99  // Go to the right level.
100  for (j = 0; j < level; j++)
101  fprintf(file, "|\t");
102 
103  if (statement != NULL)
104  fprintf(file, "+-- osl_statement_t (S%d)\n", number);
105  else
106  fprintf(file, "+-- NULL statement\n");
107 
108  while (statement != NULL) {
109  if (!first) {
110  // Go to the right level.
111  for (j = 0; j < level; j++)
112  fprintf(file, "|\t");
113  fprintf(file, "| osl_statement_t (S%d)\n", number);
114  }
115  else
116  first = 0;
117 
118  // A blank line.
119  for (j = 0; j <= level + 1; j++)
120  fprintf(file, "|\t");
121  fprintf(file, "\n");
122 
123  // Print the domain of the statement.
124  osl_relation_idump(file, statement->domain, level + 1);
125 
126  // Print the scattering of the statement.
127  osl_relation_idump(file, statement->scattering, level + 1);
128 
129  // Print the array access information of the statement.
130  osl_relation_list_idump(file, statement->access, level + 1);
131 
132  // Print the original body expression.
133  osl_generic_idump(file, statement->extension, level + 1);
134 
135  statement = statement->next;
136  number++;
137 
138  // Next line.
139  if (statement != NULL) {
140  for (j = 0; j <= level; j++)
141  fprintf(file, "|\t");
142  fprintf(file, "V\n");
143  }
144  }
145 
146  // The last line.
147  for (j = 0; j <= level; j++)
148  fprintf(file, "|\t");
149  fprintf(file, "\n");
150 }
151 
152 
161  osl_statement_idump(file, statement, 0);
162 }
163 
164 
172 static
174  int nb_parameters = OSL_UNDEFINED;
175  int nb_iterators = OSL_UNDEFINED;
176  int nb_scattdims = OSL_UNDEFINED;
177  int nb_localdims = OSL_UNDEFINED;
178  int array_id = OSL_UNDEFINED;
179 
180  osl_statement_get_attributes(statement, &nb_parameters, &nb_iterators,
181  &nb_scattdims, &nb_localdims, &array_id);
182 
183  return osl_names_generate("P", nb_parameters,
184  "i", nb_iterators,
185  "c", nb_scattdims,
186  "l", nb_localdims,
187  "A", array_id);
188 }
189 
190 
200  osl_names_p names) {
201  size_t nb_relations;
202  int number = 1;
203  int generated_names = 0;
204  int iterators_backedup = 0;
205  int nb_ext = 0;
206  osl_body_p body = NULL;
207  osl_strings_p iterators_backup = NULL;
208 
209  // Generate the dimension names if necessary and replace iterators with
210  // statement iterators if possible.
211  if (names == NULL) {
212  generated_names = 1;
213  names = osl_statement_names(statement);
214  }
215 
216  while (statement != NULL) {
217  // If possible, replace iterator names with statement iterator names.
218  body = (osl_body_p)osl_generic_lookup(statement->extension, OSL_URI_BODY);
219  if (body && body->iterators != NULL) {
220  iterators_backedup = 1;
221  iterators_backup = names->iterators;
222  names->iterators = body->iterators;
223  }
224 
225  nb_relations = 0;
226 
227  fprintf(file, "# =============================================== ");
228  fprintf(file, "Statement %d\n", number);
229 
230  fprintf(file, "# Number of relations describing the statement:\n");
231 
232  if (statement->domain != NULL)
233  nb_relations ++;
234  if (statement->scattering != NULL)
235  nb_relations ++;
236  nb_relations += osl_relation_list_count(statement->access);
237 
238  fprintf(file, "%lu\n\n", nb_relations);
239 
240  fprintf(file, "# ---------------------------------------------- ");
241  fprintf(file, "%2d.1 Domain\n", number);
242  osl_relation_pprint(file, statement->domain, names);
243  fprintf(file, "\n");
244 
245  fprintf(file, "# ---------------------------------------------- ");
246  fprintf(file, "%2d.2 Scattering\n", number);
247  osl_relation_pprint(file, statement->scattering, names);
248  fprintf(file, "\n");
249 
250  fprintf(file, "# ---------------------------------------------- ");
251  fprintf(file, "%2d.3 Access\n", number);
252  osl_relation_list_pprint_elts(file, statement->access, names);
253  fprintf(file, "\n");
254 
255  fprintf(file, "# ---------------------------------------------- ");
256  fprintf(file, "%2d.4 Statement Extensions\n", number);
257  fprintf(file, "# Number of Statement Extensions\n");
258  nb_ext = osl_generic_number(statement->extension);
259  fprintf(file, "%d\n", nb_ext);
260  if(nb_ext>0)
261  osl_generic_print(file, statement->extension);
262 
263  fprintf(file, "\n");
264 
265  // If necessary, switch back iterator names.
266  if (iterators_backedup) {
267  iterators_backedup = 0;
268  names->iterators = iterators_backup;
269  }
270 
271  statement = statement->next;
272  number++;
273  }
274 
275  if (generated_names)
276  osl_names_free(names);
277 }
278 
279 
289  osl_names_p names) {
290  int number = 1;
291  int generated_names = 0;
292  int iterators_backedup = 0;
293  osl_body_p body = NULL;
294  osl_strings_p iterators_backup = NULL;
295  int add_fakeiter;
296 
297  // Generate the dimension names if necessary and replace iterators with
298  // statement iterators if possible.
299  if (names == NULL) {
300  generated_names = 1;
301  names = osl_statement_names(statement);
302  }
303 
304  while (statement != NULL) {
305  // If possible, replace iterator names with statement iterator names.
306  body = (osl_body_p)osl_generic_lookup(statement->extension, OSL_URI_BODY);
307  if (body && body->iterators != NULL) {
308  iterators_backedup = 1;
309  iterators_backup = names->iterators;
310  names->iterators = body->iterators;
311  }
312 
313  add_fakeiter = statement->domain->nb_rows == 0 &&
314  statement->scattering->nb_rows == 1;
315 
316  fprintf(file, "# =============================================== ");
317  fprintf(file, "Statement %d\n", number);
318 
319  fprintf(file, "# ---------------------------------------------- ");
320  fprintf(file, "%2d.1 Domain\n", number);
321  fprintf(file, "# Iteration domain\n");
322  osl_relation_pprint_scoplib(file, statement->domain, names, 1, add_fakeiter);
323  fprintf(file, "\n");
324 
325  fprintf(file, "# ---------------------------------------------- ");
326  fprintf(file, "%2d.2 Scattering\n", number);
327  fprintf(file,"# Scattering function is provided\n1\n");
328  osl_relation_pprint_scoplib(file, statement->scattering, names, 0,
329  add_fakeiter);
330  fprintf(file, "\n");
331 
332  fprintf(file, "# ---------------------------------------------- ");
333  fprintf(file, "%2d.3 Access\n", number);
334  fprintf(file,"# Access informations are provided\n1\n");
335 
337  names, add_fakeiter);
338  fprintf(file, "\n");
339 
340  fprintf(file, "# ---------------------------------------------- ");
341  fprintf(file, "%2d.4 Body\n", number);
342  if (body != NULL) {
343  fprintf(file, "# Statement body is provided\n1\n");
344  osl_body_print_scoplib(file, body);
345  body = NULL; //re-initialize for next statement
346  }
347  else {
348  fprintf(file, "# Statement body is not provided\n0\n");
349  }
350 
351  fprintf(file, "\n");
352 
353  // If necessary, switch back iterator names.
354  if (iterators_backedup) {
355  iterators_backedup = 0;
356  names->iterators = iterators_backup;
357  }
358 
359  statement = statement->next;
360  number++;
361  }
362 
363  if (generated_names)
364  osl_names_free(names);
365 }
366 
367 
376 
377  osl_statement_pprint(file, statement, NULL);
378 }
379 
380 
381 /*****************************************************************************
382  * Reading function *
383  *****************************************************************************/
384 
385 
395 static
397  osl_relation_list_p domain_list;
398  osl_relation_list_p scattering_list;
399  size_t nb_domains, nb_scattering, nb_accesses;
400 
401  // Domain.
402  domain_list = osl_relation_list_filter(list, OSL_TYPE_DOMAIN);
403  nb_domains = osl_relation_list_count(domain_list);
404  if (nb_domains > 1)
405  OSL_error("more than one domain for a statement");
406 
407  if (domain_list != NULL) {
408  stmt->domain = domain_list->elt;
409  domain_list->elt = NULL;
410  osl_relation_list_free(domain_list);
411  }
412  else {
413  stmt->domain = NULL;
414  }
415 
416  // Scattering.
417  scattering_list=osl_relation_list_filter(list,OSL_TYPE_SCATTERING);
418  nb_scattering = osl_relation_list_count(scattering_list);
419  if (nb_scattering > 1)
420  OSL_error("more than one scattering relation for a statement");
421 
422  if (scattering_list != NULL) {
423  stmt->scattering = scattering_list->elt;
424  scattering_list->elt = NULL;
425  osl_relation_list_free(scattering_list);
426  }
427  else {
428  stmt->scattering = NULL;
429  }
430 
431  // Access.
432  stmt->access = osl_relation_list_filter(list, OSL_TYPE_ACCESS);
433  nb_accesses = osl_relation_list_count(stmt->access);
434 
435  if ((nb_domains + nb_scattering + nb_accesses) !=
436  (osl_relation_list_count(list)))
437  OSL_error("unexpected relation type to define a statement");
438 
440 }
441 
442 
453  int precision) {
455  osl_relation_list_p list;
456  osl_generic_p new = NULL;
457  int i, nb_ext = 0;
458 
459  if (file) {
460  // Read all statement relations.
461  list = osl_relation_list_pread(file, precision);
462 
463  // Store relations at the right place according to their type.
464  osl_statement_dispatch(stmt, list);
465 
466  // Read the Extensions
467  nb_ext = osl_util_read_int(file, NULL);
468  for (i=0; i<nb_ext; i++) {
469  new = osl_generic_read_one(file, registry);
470  osl_generic_add(&stmt->extension, new);
471  }
472  }
473 
474  return stmt;
475 }
476 
477 
487  int precision = osl_util_get_precision();
489  osl_statement_p statement = osl_statement_pread(foo, registry, precision);
490 
491  osl_interface_free(registry);
492  return statement;
493 }
494 
495 
496 /*+***************************************************************************
497  * Memory allocation/deallocation functions *
498  *****************************************************************************/
499 
500 
510 
511  OSL_malloc(statement, osl_statement_p, sizeof(osl_statement_t));
512  statement->domain = NULL;
513  statement->scattering = NULL;
514  statement->access = NULL;
515  statement->extension = NULL;
516  statement->next = NULL;
517 
518  return statement;
519 }
520 
521 
530 
531  while (statement != NULL) {
532  next = statement->next;
533  osl_relation_free(statement->domain);
534  osl_relation_free(statement->scattering);
535  osl_relation_list_free(statement->access);
536  osl_generic_free(statement->extension);
537 
538  free(statement);
539  statement = next;
540  }
541 }
542 
543 
544 /*+***************************************************************************
545  * Processing functions *
546  *****************************************************************************/
547 
548 
558  while (*location != NULL)
559  location = &((*location)->next);
560 
561  *location = statement;
562 }
563 
564 
573  int number = 0;
574 
575  while (statement != NULL) {
576  number++;
577  statement = statement->next;
578  }
579  return number;
580 }
581 
582 
592  int first = 1, i = 0;
593  osl_statement_p clone = NULL, node, previous = NULL;
594 
595  while ((statement != NULL) && ((n == -1) || (i < n))) {
596  node = osl_statement_malloc();
597  node->domain = osl_relation_clone(statement->domain);
598  node->scattering = osl_relation_clone(statement->scattering);
599  node->access = osl_relation_list_clone(statement->access);
600  node->extension = osl_generic_clone(statement->extension);
601  node->next = NULL;
602 
603  if (first) {
604  first = 0;
605  clone = node;
606  previous = node;
607  }
608  else {
609  previous->next = node;
610  previous = previous->next;
611  }
612 
613  i++;
614  statement = statement->next;
615  }
616 
617  return clone;
618 }
619 
620 
629  return osl_statement_nclone(statement, -1);
630 }
631 
632 
642 
643  if (s1 == s2)
644  return 1;
645 
646  if (((s1->next != NULL) && (s2->next == NULL)) ||
647  ((s1->next == NULL) && (s2->next != NULL))) {
648  OSL_info("statements are not the same");
649  return 0;
650  }
651 
652  if ((s1->next != NULL) && (s2->next != NULL)) {
653  if (!osl_statement_equal(s1->next, s2->next)) {
654  OSL_info("number of statements is not the same");
655  return 0;
656  }
657  }
658 
659  if (!osl_relation_equal(s1->domain, s2->domain)) {
660  OSL_info("statement domains are not the same");
661  return 0;
662  }
663 
664  if (!osl_relation_equal(s1->scattering, s2->scattering)) {
665  OSL_info("statement scatterings are not the same");
666  return 0;
667  }
668 
669  if (!osl_relation_list_equal(s1->access, s2->access)) {
670  OSL_info("statement accesses are not the same");
671  return 0;
672  }
673 
674  if (!osl_generic_equal(s1->extension, s2->extension)) {
675  OSL_info("statement bodies are not the same");
676  return 0;
677  }
678 
679  return 1;
680 }
681 
682 
694  int expected_nb_parameters) {
695  int expected_nb_iterators;
696  osl_body_p body = NULL;
697 
698  while (statement != NULL) {
699  // Check the domain.
700  if (!osl_relation_integrity_check(statement->domain,
701  OSL_TYPE_DOMAIN,
702  OSL_UNDEFINED,
703  0,
704  expected_nb_parameters)) {
705  return 0;
706  }
707 
708  // Get the number of iterators.
709  if (statement->domain != NULL)
710  expected_nb_iterators = statement->domain->nb_output_dims;
711  else
712  expected_nb_iterators = OSL_UNDEFINED;
713 
714  // Check the scattering relation.
716  OSL_TYPE_SCATTERING,
717  OSL_UNDEFINED,
718  expected_nb_iterators,
719  expected_nb_parameters)) {
720  return 0;
721  }
722 
723  // Check the access relations.
725  OSL_TYPE_ACCESS,
726  OSL_UNDEFINED,
727  expected_nb_iterators,
728  expected_nb_parameters)) {
729  return 0;
730  }
731 
732  // Check the statement body.
733  body = (osl_body_p)osl_generic_lookup(statement->extension, OSL_URI_BODY);
734  if ((expected_nb_iterators != OSL_UNDEFINED) &&
735  body && body->iterators != NULL &&
736  ((size_t)expected_nb_iterators != osl_strings_size(body->iterators))) {
737  OSL_warning("unexpected number of original iterators");
738  return 0;
739  }
740 
741  statement = statement->next;
742  }
743 
744  return 1;
745 }
746 
747 
756 
757  if (statement->domain == NULL) {
758  OSL_warning("no statement domain, assuming 0 iterators");
759  return 0;
760  }
761  else {
762  return statement->domain->nb_output_dims;
763  }
764 }
765 
766 
786  int * nb_parameters,
787  int * nb_iterators,
788  int * nb_scattdims,
789  int * nb_localdims,
790  int * array_id) {
791  int local_nb_parameters = OSL_UNDEFINED;
792  int local_nb_iterators = OSL_UNDEFINED;
793  int local_nb_scattdims = OSL_UNDEFINED;
794  int local_nb_localdims = OSL_UNDEFINED;
795  int local_array_id = OSL_UNDEFINED;
796 
797  while (statement != NULL) {
799  &local_nb_parameters,
800  &local_nb_iterators,
801  &local_nb_scattdims,
802  &local_nb_localdims,
803  &local_array_id);
804 
806  &local_nb_parameters,
807  &local_nb_iterators,
808  &local_nb_scattdims,
809  &local_nb_localdims,
810  &local_array_id);
811 
813  &local_nb_parameters,
814  &local_nb_iterators,
815  &local_nb_scattdims,
816  &local_nb_localdims,
817  &local_array_id);
818  // Update.
819  *nb_parameters = OSL_max(*nb_parameters, local_nb_parameters);
820  *nb_iterators = OSL_max(*nb_iterators, local_nb_iterators);
821  *nb_scattdims = OSL_max(*nb_scattdims, local_nb_scattdims);
822  *nb_localdims = OSL_max(*nb_localdims, local_nb_localdims);
823  *array_id = OSL_max(*array_id, local_array_id);
824  statement = statement->next;
825  }
826 }
827 
828 
836  osl_body_p body;
837  osl_extbody_p ebody;
838 
839  if (statement == NULL || statement->extension == NULL) {
840  return NULL;
841  }
842 
843  body = (osl_body_p)osl_generic_lookup(statement->extension, OSL_URI_BODY);
844  if (body != NULL)
845  return body;
846  ebody = (osl_extbody_p)osl_generic_lookup(statement->extension,
847  OSL_URI_EXTBODY);
848  if (ebody != NULL)
849  return ebody->body;
850  return NULL;
851 }
void osl_relation_free(osl_relation_p relation)
Definition: relation.c:1731
osl_names_p osl_names_generate(char *parameter_prefix, int nb_parameters, char *iterator_prefix, int nb_iterators, char *scatt_dim_prefix, int nb_scatt_dims, char *local_dim_prefix, int nb_local_dims, char *array_prefix, int nb_arrays)
Definition: names.c:206
void osl_relation_list_pprint_elts(FILE *file, osl_relation_list_p list, osl_names_p names)
osl_statement_p osl_statement_read(FILE *foo)
Definition: statement.c:486
int osl_generic_number(osl_generic_p generic)
Definition: generic.c:522
void osl_interface_free(osl_interface_p interface)
Definition: interface.c:237
struct osl_extbody * osl_extbody_p
Definition: extbody.h:92
osl_relation_list_p access
Definition: statement.h:91
int osl_statement_number(osl_statement_p statement)
Definition: statement.c:572
struct osl_body * osl_body_p
Definition: body.h:90
osl_statement_p osl_statement_pread(FILE *file, osl_interface_p registry, int precision)
Definition: statement.c:452
osl_interface_p registry
Definition: scop.h:103
int osl_statement_equal(osl_statement_p s1, osl_statement_p s2)
Definition: statement.c:641
osl_statement_p osl_statement_clone(osl_statement_p statement)
Definition: statement.c:628
void osl_statement_add(osl_statement_p *location, osl_statement_p statement)
Definition: statement.c:556
void osl_relation_list_get_attributes(osl_relation_list_p list, int *nb_parameters, int *nb_iterators, int *nb_scattdims, int *nb_localdims, int *array_id)
static void osl_statement_dispatch(osl_statement_p stmt, osl_relation_list_p list)
Definition: statement.c:396
void osl_statement_print(FILE *file, osl_statement_p statement)
Definition: statement.c:375
void osl_statement_free(osl_statement_p statement)
Definition: statement.c:528
osl_generic_p extension
Definition: statement.h:92
void osl_body_print_scoplib(FILE *file, osl_body_p body)
Definition: body.c:170
void * osl_generic_lookup(osl_generic_p x, char const *const URI)
Definition: generic.c:669
int nb_output_dims
Definition: relation.h:109
osl_relation_list_p osl_relation_list_filter(osl_relation_list_p list, int type)
void osl_generic_add(osl_generic_p *list, osl_generic_p generic)
Definition: generic.c:375
osl_strings_p iterators
Definition: names.h:83
int osl_statement_get_nb_iterators(osl_statement_p statement)
Definition: statement.c:755
osl_strings_p iterators
Definition: body.h:86
osl_relation_p domain
Definition: statement.h:89
void osl_statement_pprint_scoplib(FILE *file, osl_statement_p statement, osl_names_p names)
Definition: statement.c:288
void osl_relation_list_free(osl_relation_list_p list)
void osl_relation_pprint(FILE *file, osl_relation_p relation, osl_names_p names)
Definition: relation.c:1242
static osl_names_p osl_statement_names(osl_statement_p statement)
Definition: statement.c:173
osl_relation_p scattering
Definition: statement.h:90
int osl_relation_equal(osl_relation_p r1, osl_relation_p r2)
Definition: relation.c:2435
osl_body_p body
Definition: extbody.h:86
void osl_relation_idump(FILE *file, osl_relation_p relation, int level)
Definition: relation.c:164
int osl_util_get_precision()
Definition: util.c:518
void osl_relation_pprint_scoplib(FILE *file, osl_relation_p relation, osl_names_p names, int print_nth_part, int add_fakeiter)
Definition: relation.c:1260
osl_generic_p osl_generic_read_one(FILE *file, osl_interface_p registry)
Definition: generic.c:309
size_t osl_strings_size(osl_const_strings_const_p strings)
Definition: strings.c:413
void osl_statement_get_attributes(osl_statement_p statement, int *nb_parameters, int *nb_iterators, int *nb_scattdims, int *nb_localdims, int *array_id)
Definition: statement.c:785
osl_relation_list_p osl_relation_list_clone(osl_relation_list_p list)
void osl_relation_get_attributes(osl_relation_p relation, int *nb_parameters, int *nb_iterators, int *nb_scattdims, int *nb_localdims, int *array_id)
Definition: relation.c:2853
void osl_names_free(osl_names_p names)
Definition: names.c:172
void osl_relation_list_pprint_access_array_scoplib(FILE *file, osl_relation_list_p list, osl_names_p names, int add_fakeiter)
osl_statement_p osl_statement_malloc()
Definition: statement.c:508
int osl_relation_integrity_check(osl_relation_p relation, int expected_type, int expected_nb_output_dims, int expected_nb_input_dims, int expected_nb_parameters)
Definition: relation.c:2540
int osl_statement_integrity_check(osl_statement_p statement, int expected_nb_parameters)
Definition: statement.c:693
int osl_relation_list_equal(osl_relation_list_p l1, osl_relation_list_p l2)
osl_statement_p osl_statement_nclone(osl_statement_p statement, int n)
Definition: statement.c:591
void osl_generic_idump(FILE *file, osl_generic_p generic, int level)
Definition: generic.c:89
int osl_util_read_int(FILE *file, char **str)
Definition: util.c:140
osl_relation_p osl_relation_clone(osl_relation_p relation)
Definition: relation.c:1863
void osl_statement_dump(FILE *file, osl_statement_p statement)
Definition: statement.c:160
void osl_statement_pprint(FILE *file, osl_statement_p statement, osl_names_p names)
Definition: statement.c:199
int osl_relation_list_integrity_check(osl_relation_list_p list, int type, int expected_nb_output_dims, int expected_nb_input_dims, int expected_nb_parameters)
osl_relation_list_p osl_relation_list_pread(FILE *file, int precision)
osl_interface_p osl_interface_get_default_registry()
Definition: interface.c:386
osl_relation_p elt
Definition: relation_list.h:82
void osl_relation_list_idump(FILE *file, osl_relation_list_p l, int level)
Definition: relation_list.c:89
int osl_generic_equal(osl_generic_p x1, osl_generic_p x2)
Definition: generic.c:592
osl_generic_p osl_generic_clone(osl_generic_p generic)
Definition: generic.c:540
struct osl_scop * next
Definition: scop.h:107
osl_body_p osl_statement_get_body(osl_statement_p statement)
Definition: statement.c:835
void osl_statement_idump(FILE *file, osl_statement_p statement, int level)
Definition: statement.c:96
osl_statement_p statement
Definition: scop.h:102
size_t osl_relation_list_count(osl_relation_list_p list)
Definition: body.h:85
void osl_generic_print(FILE *file, osl_generic_p generic)
Definition: generic.c:196
struct osl_statement * next
Definition: statement.h:95
void osl_generic_free(osl_generic_p generic)
Definition: generic.c:489