Coverage Report

Created: 2017-06-28 17:40

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/polly/lib/External/isl/isl_point.c
Line
Count
Source (jump to first uncovered line)
1
#include <isl_map_private.h>
2
#include <isl_point_private.h>
3
#include <isl/set.h>
4
#include <isl/union_set.h>
5
#include <isl_sample.h>
6
#include <isl_scan.h>
7
#include <isl_seq.h>
8
#include <isl_space_private.h>
9
#include <isl_val_private.h>
10
#include <isl_vec_private.h>
11
#include <isl_output_private.h>
12
#include <isl/deprecated/point_int.h>
13
14
#include <set_to_map.c>
15
16
isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt)
17
2
{
18
2
  return pnt ? isl_space_get_ctx(pnt->dim) : NULL;
19
2
}
20
21
__isl_give isl_space *isl_point_get_space(__isl_keep isl_point *pnt)
22
1
{
23
1
  return pnt ? isl_space_copy(pnt->dim) : NULL;
24
1
}
25
26
__isl_give isl_point *isl_point_alloc(__isl_take isl_space *dim,
27
  __isl_take isl_vec *vec)
28
390
{
29
390
  struct isl_point *pnt;
30
390
31
390
  if (
!dim || 390
!vec390
)
32
0
    goto error;
33
390
34
390
  
if (390
vec->size > 1 + isl_space_dim(dim, isl_dim_all)390
)
{0
35
0
    vec = isl_vec_cow(vec);
36
0
    if (!vec)
37
0
      goto error;
38
0
    vec->size = 1 + isl_space_dim(dim, isl_dim_all);
39
0
  }
40
390
41
390
  
pnt = 390
isl_alloc_type390
(dim->ctx, struct isl_point);
42
390
  if (!pnt)
43
0
    goto error;
44
390
45
390
  pnt->ref = 1;
46
390
  pnt->dim = dim;
47
390
  pnt->vec = vec;
48
390
49
390
  return pnt;
50
0
error:
51
0
  isl_space_free(dim);
52
0
  isl_vec_free(vec);
53
0
  return NULL;
54
390
}
55
56
__isl_give isl_point *isl_point_zero(__isl_take isl_space *dim)
57
1
{
58
1
  isl_vec *vec;
59
1
60
1
  if (!dim)
61
0
    return NULL;
62
1
  vec = isl_vec_alloc(dim->ctx, 1 + isl_space_dim(dim, isl_dim_all));
63
1
  if (!vec)
64
0
    goto error;
65
1
  
isl_int_set_si1
(vec->el[0], 1);1
66
1
  isl_seq_clr(vec->el + 1, vec->size - 1);
67
1
  return isl_point_alloc(dim, vec);
68
0
error:
69
0
  isl_space_free(dim);
70
0
  return NULL;
71
1
}
72
73
__isl_give isl_point *isl_point_dup(__isl_keep isl_point *pnt)
74
0
{
75
0
  struct isl_point *pnt2;
76
0
77
0
  if (!pnt)
78
0
    return NULL;
79
0
  pnt2 = isl_point_alloc(isl_space_copy(pnt->dim), isl_vec_copy(pnt->vec));
80
0
  return pnt2;
81
0
}
82
83
__isl_give isl_point *isl_point_cow(__isl_take isl_point *pnt)
84
0
{
85
0
  struct isl_point *pnt2;
86
0
  if (!pnt)
87
0
    return NULL;
88
0
89
0
  
if (0
pnt->ref == 10
)
90
0
    return pnt;
91
0
92
0
  pnt2 = isl_point_dup(pnt);
93
0
  isl_point_free(pnt);
94
0
  return pnt2;
95
0
}
96
97
__isl_give isl_point *isl_point_copy(__isl_keep isl_point *pnt)
98
1
{
99
1
  if (!pnt)
100
0
    return NULL;
101
1
102
1
  pnt->ref++;
103
1
  return pnt;
104
1
}
105
106
__isl_null isl_point *isl_point_free(__isl_take isl_point *pnt)
107
391
{
108
391
  if (!pnt)
109
0
    return NULL;
110
391
111
391
  
if (391
--pnt->ref > 0391
)
112
1
    return NULL;
113
391
114
390
  isl_space_free(pnt->dim);
115
390
  isl_vec_free(pnt->vec);
116
390
  free(pnt);
117
390
  return NULL;
118
391
}
119
120
__isl_give isl_point *isl_point_void(__isl_take isl_space *dim)
121
1
{
122
1
  if (!dim)
123
0
    return NULL;
124
1
125
1
  return isl_point_alloc(dim, isl_vec_alloc(dim->ctx, 0));
126
1
}
127
128
isl_bool isl_point_is_void(__isl_keep isl_point *pnt)
129
3
{
130
3
  if (!pnt)
131
0
    return isl_bool_error;
132
3
133
3
  return pnt->vec->size == 0;
134
3
}
135
136
int isl_point_get_coordinate(__isl_keep isl_point *pnt,
137
  enum isl_dim_type type, int pos, isl_int *v)
138
0
{
139
0
  if (
!pnt || 0
isl_point_is_void(pnt)0
)
140
0
    return -1;
141
0
142
0
  
if (0
pos < 0 || 0
pos >= isl_space_dim(pnt->dim, type)0
)
143
0
    isl_die(isl_point_get_ctx(pnt), isl_error_invalid,
144
0
      "position out of bounds", return -1);
145
0
146
0
  
if (0
type == isl_dim_set0
)
147
0
    pos += isl_space_dim(pnt->dim, isl_dim_param);
148
0
  isl_int_set(*v, pnt->vec->el[1 + pos]);
149
0
150
0
  return 0;
151
0
}
152
153
/* Return the value of coordinate "pos" of type "type" of "pnt".
154
 */
155
__isl_give isl_val *isl_point_get_coordinate_val(__isl_keep isl_point *pnt,
156
  enum isl_dim_type type, int pos)
157
0
{
158
0
  isl_ctx *ctx;
159
0
  isl_val *v;
160
0
161
0
  if (!pnt)
162
0
    return NULL;
163
0
164
0
  ctx = isl_point_get_ctx(pnt);
165
0
  if (isl_point_is_void(pnt))
166
0
    isl_die(ctx, isl_error_invalid,
167
0
      "void point does not have coordinates", return NULL);
168
0
  
if (0
pos < 0 || 0
pos >= isl_space_dim(pnt->dim, type)0
)
169
0
    isl_die(ctx, isl_error_invalid,
170
0
      "position out of bounds", return NULL);
171
0
172
0
  
if (0
type == isl_dim_set0
)
173
0
    pos += isl_space_dim(pnt->dim, isl_dim_param);
174
0
175
0
  v = isl_val_rat_from_isl_int(ctx, pnt->vec->el[1 + pos],
176
0
            pnt->vec->el[0]);
177
0
  return isl_val_normalize(v);
178
0
}
179
180
__isl_give isl_point *isl_point_set_coordinate(__isl_take isl_point *pnt,
181
  enum isl_dim_type type, int pos, isl_int v)
182
0
{
183
0
  if (
!pnt || 0
isl_point_is_void(pnt)0
)
184
0
    return pnt;
185
0
186
0
  pnt = isl_point_cow(pnt);
187
0
  if (!pnt)
188
0
    return NULL;
189
0
  pnt->vec = isl_vec_cow(pnt->vec);
190
0
  if (!pnt->vec)
191
0
    goto error;
192
0
193
0
  
if (0
type == isl_dim_set0
)
194
0
    pos += isl_space_dim(pnt->dim, isl_dim_param);
195
0
196
0
  isl_int_set(pnt->vec->el[1 + pos], v);
197
0
198
0
  return pnt;
199
0
error:
200
0
  isl_point_free(pnt);
201
0
  return NULL;
202
0
}
203
204
/* Replace coordinate "pos" of type "type" of "pnt" by "v".
205
 */
206
__isl_give isl_point *isl_point_set_coordinate_val(__isl_take isl_point *pnt,
207
  enum isl_dim_type type, int pos, __isl_take isl_val *v)
208
0
{
209
0
  if (
!pnt || 0
!v0
)
210
0
    goto error;
211
0
  
if (0
isl_point_is_void(pnt)0
)
212
0
    isl_die(isl_point_get_ctx(pnt), isl_error_invalid,
213
0
      "void point does not have coordinates", goto error);
214
0
  
if (0
pos < 0 || 0
pos >= isl_space_dim(pnt->dim, type)0
)
215
0
    isl_die(isl_point_get_ctx(pnt), isl_error_invalid,
216
0
      "position out of bounds", goto error);
217
0
  
if (0
!isl_val_is_rat(v)0
)
218
0
    isl_die(isl_point_get_ctx(pnt), isl_error_invalid,
219
0
      "expecting rational value", goto error);
220
0
221
0
  
if (0
isl_int_eq0
(pnt->vec->el[1 + pos], v->n) &&0
222
0
      
isl_int_eq0
(pnt->vec->el[0], v->d))
{0
223
0
    isl_val_free(v);
224
0
    return pnt;
225
0
  }
226
0
227
0
  pnt = isl_point_cow(pnt);
228
0
  if (!pnt)
229
0
    goto error;
230
0
  pnt->vec = isl_vec_cow(pnt->vec);
231
0
  if (!pnt->vec)
232
0
    goto error;
233
0
234
0
  
if (0
isl_int_eq0
(pnt->vec->el[0], v->d))
{0
235
0
    isl_int_set(pnt->vec->el[1 + pos], v->n);
236
0
  } else 
if (0
isl_int_is_one0
(v->d))
{0
237
0
    isl_int_mul(pnt->vec->el[1 + pos], pnt->vec->el[0], v->n);
238
0
  } else {
239
0
    isl_seq_scale(pnt->vec->el + 1,
240
0
        pnt->vec->el + 1, v->d, pnt->vec->size - 1);
241
0
    isl_int_mul(pnt->vec->el[1 + pos], pnt->vec->el[0], v->n);
242
0
    isl_int_mul(pnt->vec->el[0], pnt->vec->el[0], v->d);
243
0
    pnt->vec = isl_vec_normalize(pnt->vec);
244
0
    if (!pnt->vec)
245
0
      goto error;
246
0
  }
247
0
248
0
  isl_val_free(v);
249
0
  return pnt;
250
0
error:
251
0
  isl_val_free(v);
252
0
  isl_point_free(pnt);
253
0
  return NULL;
254
0
}
255
256
__isl_give isl_point *isl_point_add_ui(__isl_take isl_point *pnt,
257
  enum isl_dim_type type, int pos, unsigned val)
258
0
{
259
0
  if (
!pnt || 0
isl_point_is_void(pnt)0
)
260
0
    return pnt;
261
0
262
0
  pnt = isl_point_cow(pnt);
263
0
  if (!pnt)
264
0
    return NULL;
265
0
  pnt->vec = isl_vec_cow(pnt->vec);
266
0
  if (!pnt->vec)
267
0
    goto error;
268
0
269
0
  
if (0
type == isl_dim_set0
)
270
0
    pos += isl_space_dim(pnt->dim, isl_dim_param);
271
0
272
0
  isl_int_add_ui(pnt->vec->el[1 + pos], pnt->vec->el[1 + pos], val);
273
0
274
0
  return pnt;
275
0
error:
276
0
  isl_point_free(pnt);
277
0
  return NULL;
278
0
}
279
280
__isl_give isl_point *isl_point_sub_ui(__isl_take isl_point *pnt,
281
  enum isl_dim_type type, int pos, unsigned val)
282
0
{
283
0
  if (
!pnt || 0
isl_point_is_void(pnt)0
)
284
0
    return pnt;
285
0
286
0
  pnt = isl_point_cow(pnt);
287
0
  if (!pnt)
288
0
    return NULL;
289
0
  pnt->vec = isl_vec_cow(pnt->vec);
290
0
  if (!pnt->vec)
291
0
    goto error;
292
0
293
0
  
if (0
type == isl_dim_set0
)
294
0
    pos += isl_space_dim(pnt->dim, isl_dim_param);
295
0
296
0
  isl_int_sub_ui(pnt->vec->el[1 + pos], pnt->vec->el[1 + pos], val);
297
0
298
0
  return pnt;
299
0
error:
300
0
  isl_point_free(pnt);
301
0
  return NULL;
302
0
}
303
304
struct isl_foreach_point {
305
  struct isl_scan_callback callback;
306
  isl_stat (*fn)(__isl_take isl_point *pnt, void *user);
307
  void *user;
308
  isl_space *dim;
309
};
310
311
static isl_stat foreach_point(struct isl_scan_callback *cb,
312
  __isl_take isl_vec *sample)
313
0
{
314
0
  struct isl_foreach_point *fp = (struct isl_foreach_point *)cb;
315
0
  isl_point *pnt;
316
0
317
0
  pnt = isl_point_alloc(isl_space_copy(fp->dim), sample);
318
0
319
0
  return fp->fn(pnt, fp->user);
320
0
}
321
322
isl_stat isl_set_foreach_point(__isl_keep isl_set *set,
323
  isl_stat (*fn)(__isl_take isl_point *pnt, void *user), void *user)
324
66
{
325
66
  struct isl_foreach_point fp = { { &foreach_point }, fn, user };
326
66
  int i;
327
66
328
66
  if (!set)
329
0
    return isl_stat_error;
330
66
331
66
  fp.dim = isl_set_get_space(set);
332
66
  if (!fp.dim)
333
0
    return isl_stat_error;
334
66
335
66
  set = isl_set_copy(set);
336
66
  set = isl_set_cow(set);
337
66
  set = isl_set_make_disjoint(set);
338
66
  set = isl_set_compute_divs(set);
339
66
  if (!set)
340
0
    goto error;
341
66
342
66
  
for (i = 0; 66
i < set->n66
;
++i0
)
343
0
    
if (0
isl_basic_set_scan(isl_basic_set_copy(set->p[i]),0
344
0
          &fp.callback) < 0)
345
0
      goto error;
346
66
347
66
  isl_set_free(set);
348
66
  isl_space_free(fp.dim);
349
66
350
66
  return isl_stat_ok;
351
0
error:
352
0
  isl_set_free(set);
353
0
  isl_space_free(fp.dim);
354
0
  return isl_stat_error;
355
66
}
356
357
/* Return 1 if "bmap" contains the point "point".
358
 * "bmap" is assumed to have known divs.
359
 * The point is first extended with the divs and then passed
360
 * to basic_map_contains.
361
 */
362
isl_bool isl_basic_map_contains_point(__isl_keep isl_basic_map *bmap,
363
  __isl_keep isl_point *point)
364
410
{
365
410
  int i;
366
410
  struct isl_vec *vec;
367
410
  unsigned dim;
368
410
  isl_bool contains;
369
410
370
410
  if (
!bmap || 410
!point410
)
371
0
    return isl_bool_error;
372
410
  
isl_assert410
(bmap->ctx, isl_space_is_equal(bmap->dim, point->dim),410
373
410
    return isl_bool_error);
374
410
  
if (410
bmap->n_div == 0410
)
375
406
    return isl_basic_map_contains(bmap, point->vec);
376
410
377
4
  dim = isl_basic_map_total_dim(bmap) - bmap->n_div;
378
4
  vec = isl_vec_alloc(bmap->ctx, 1 + dim + bmap->n_div);
379
4
  if (!vec)
380
0
    return isl_bool_error;
381
4
382
4
  isl_seq_cpy(vec->el, point->vec->el, point->vec->size);
383
11
  for (i = 0; 
i < bmap->n_div11
;
++i7
)
{7
384
7
    isl_seq_inner_product(bmap->div[i] + 1, vec->el,
385
7
          1 + dim + i, &vec->el[1+dim+i]);
386
7
    isl_int_fdiv_q(vec->el[1+dim+i], vec->el[1+dim+i],
387
7
        bmap->div[i][0]);
388
7
  }
389
4
390
4
  contains = isl_basic_map_contains(bmap, vec);
391
4
392
4
  isl_vec_free(vec);
393
4
  return contains;
394
4
}
395
396
isl_bool isl_map_contains_point(__isl_keep isl_map *map,
397
  __isl_keep isl_point *point)
398
1
{
399
1
  int i;
400
1
  isl_bool found = isl_bool_false;
401
1
402
1
  if (
!map || 1
!point1
)
403
0
    return isl_bool_error;
404
1
405
1
  map = isl_map_copy(map);
406
1
  map = isl_map_compute_divs(map);
407
1
  if (!map)
408
0
    return isl_bool_error;
409
1
410
1
  
for (i = 0; 1
i < map->n1
;
++i0
)
{1
411
1
    found = isl_basic_map_contains_point(map->p[i], point);
412
1
    if (found < 0)
413
0
      goto error;
414
1
    
if (1
found1
)
415
1
      break;
416
1
  }
417
1
  isl_map_free(map);
418
1
419
1
  return found;
420
0
error:
421
0
  isl_map_free(map);
422
0
  return isl_bool_error;
423
1
}
424
425
isl_bool isl_set_contains_point(__isl_keep isl_set *set,
426
  __isl_keep isl_point *point)
427
1
{
428
1
  return isl_map_contains_point(set_to_map(set), point);
429
1
}
430
431
__isl_give isl_basic_set *isl_basic_set_from_point(__isl_take isl_point *pnt)
432
1
{
433
1
  isl_basic_set *bset;
434
1
  isl_basic_set *model;
435
1
436
1
  if (!pnt)
437
0
    return NULL;
438
1
439
1
  model = isl_basic_set_empty(isl_space_copy(pnt->dim));
440
1
  bset = isl_basic_set_from_vec(isl_vec_copy(pnt->vec));
441
1
  bset = isl_basic_set_from_underlying_set(bset, model);
442
1
  isl_point_free(pnt);
443
1
444
1
  return bset;
445
1
}
446
447
__isl_give isl_set *isl_set_from_point(__isl_take isl_point *pnt)
448
0
{
449
0
  isl_basic_set *bset;
450
0
  bset = isl_basic_set_from_point(pnt);
451
0
  return isl_set_from_basic_set(bset);
452
0
}
453
454
/* Construct a union set, containing the single element "pnt".
455
 * If "pnt" is void, then return an empty union set.
456
 */
457
__isl_give isl_union_set *isl_union_set_from_point(__isl_take isl_point *pnt)
458
0
{
459
0
  if (!pnt)
460
0
    return NULL;
461
0
  
if (0
isl_point_is_void(pnt)0
)
{0
462
0
    isl_space *space;
463
0
464
0
    space = isl_point_get_space(pnt);
465
0
    isl_point_free(pnt);
466
0
    return isl_union_set_empty(space);
467
0
  }
468
0
469
0
  return isl_union_set_from_set(isl_set_from_point(pnt));
470
0
}
471
472
__isl_give isl_basic_set *isl_basic_set_box_from_points(
473
  __isl_take isl_point *pnt1, __isl_take isl_point *pnt2)
474
0
{
475
0
  isl_basic_set *bset = NULL;
476
0
  unsigned total;
477
0
  int i;
478
0
  int k;
479
0
  isl_int t;
480
0
481
0
  isl_int_init(t);
482
0
483
0
  if (
!pnt1 || 0
!pnt20
)
484
0
    goto error;
485
0
486
0
  
isl_assert0
(pnt1->dim->ctx,0
487
0
      isl_space_is_equal(pnt1->dim, pnt2->dim), goto error);
488
0
489
0
  
if (0
isl_point_is_void(pnt1) && 0
isl_point_is_void(pnt2)0
)
{0
490
0
    isl_space *dim = isl_space_copy(pnt1->dim);
491
0
    isl_point_free(pnt1);
492
0
    isl_point_free(pnt2);
493
0
    isl_int_clear(t);
494
0
    return isl_basic_set_empty(dim);
495
0
  }
496
0
  
if (0
isl_point_is_void(pnt1)0
)
{0
497
0
    isl_point_free(pnt1);
498
0
    isl_int_clear(t);
499
0
    return isl_basic_set_from_point(pnt2);
500
0
  }
501
0
  
if (0
isl_point_is_void(pnt2)0
)
{0
502
0
    isl_point_free(pnt2);
503
0
    isl_int_clear(t);
504
0
    return isl_basic_set_from_point(pnt1);
505
0
  }
506
0
507
0
  total = isl_space_dim(pnt1->dim, isl_dim_all);
508
0
  bset = isl_basic_set_alloc_space(isl_space_copy(pnt1->dim), 0, 0, 2 * total);
509
0
510
0
  for (i = 0; 
i < total0
;
++i0
)
{0
511
0
    isl_int_mul(t, pnt1->vec->el[1 + i], pnt2->vec->el[0]);
512
0
    isl_int_submul(t, pnt2->vec->el[1 + i], pnt1->vec->el[0]);
513
0
514
0
    k = isl_basic_set_alloc_inequality(bset);
515
0
    if (k < 0)
516
0
      goto error;
517
0
    isl_seq_clr(bset->ineq[k] + 1, total);
518
0
    if (
isl_int_is_pos0
(t))
{0
519
0
      isl_int_set_si(bset->ineq[k][1 + i], -1);
520
0
      isl_int_set(bset->ineq[k][0], pnt1->vec->el[1 + i]);
521
0
    } else {
522
0
      isl_int_set_si(bset->ineq[k][1 + i], 1);
523
0
      isl_int_neg(bset->ineq[k][0], pnt1->vec->el[1 + i]);
524
0
    }
525
0
    isl_int_fdiv_q(bset->ineq[k][0], bset->ineq[k][0], pnt1->vec->el[0]);
526
0
527
0
    k = isl_basic_set_alloc_inequality(bset);
528
0
    if (k < 0)
529
0
      goto error;
530
0
    isl_seq_clr(bset->ineq[k] + 1, total);
531
0
    if (
isl_int_is_pos0
(t))
{0
532
0
      isl_int_set_si(bset->ineq[k][1 + i], 1);
533
0
      isl_int_neg(bset->ineq[k][0], pnt2->vec->el[1 + i]);
534
0
    } else {
535
0
      isl_int_set_si(bset->ineq[k][1 + i], -1);
536
0
      isl_int_set(bset->ineq[k][0], pnt2->vec->el[1 + i]);
537
0
    }
538
0
    isl_int_fdiv_q(bset->ineq[k][0], bset->ineq[k][0], pnt2->vec->el[0]);
539
0
  }
540
0
541
0
  bset = isl_basic_set_finalize(bset);
542
0
543
0
  isl_point_free(pnt1);
544
0
  isl_point_free(pnt2);
545
0
546
0
  isl_int_clear(t);
547
0
548
0
  return bset;
549
0
error:
550
0
  isl_point_free(pnt1);
551
0
  isl_point_free(pnt2);
552
0
  isl_int_clear(t);
553
0
  isl_basic_set_free(bset);
554
0
  return NULL;
555
0
}
556
557
__isl_give isl_set *isl_set_box_from_points(__isl_take isl_point *pnt1,
558
  __isl_take isl_point *pnt2)
559
0
{
560
0
  isl_basic_set *bset;
561
0
  bset = isl_basic_set_box_from_points(pnt1, pnt2);
562
0
  return isl_set_from_basic_set(bset);
563
0
}
564
565
/* Print the coordinate at position "pos" of the point "pnt".
566
 */
567
static __isl_give isl_printer *print_coordinate(__isl_take isl_printer *p,
568
  struct isl_print_space_data *data, unsigned pos)
569
0
{
570
0
  isl_point *pnt = data->user;
571
0
572
0
  p = isl_printer_print_isl_int(p, pnt->vec->el[1 + pos]);
573
0
  if (
!0
isl_int_is_one0
(pnt->vec->el[0]))
{0
574
0
    p = isl_printer_print_str(p, "/");
575
0
    p = isl_printer_print_isl_int(p, pnt->vec->el[0]);
576
0
  }
577
0
578
0
  return p;
579
0
}
580
581
__isl_give isl_printer *isl_printer_print_point(
582
  __isl_take isl_printer *p, __isl_keep isl_point *pnt)
583
0
{
584
0
  struct isl_print_space_data data = { 0 };
585
0
  int i;
586
0
  unsigned nparam;
587
0
588
0
  if (!pnt)
589
0
    return p;
590
0
  
if (0
isl_point_is_void(pnt)0
)
{0
591
0
    p = isl_printer_print_str(p, "void");
592
0
    return p;
593
0
  }
594
0
595
0
  nparam = isl_space_dim(pnt->dim, isl_dim_param);
596
0
  if (
nparam > 00
)
{0
597
0
    p = isl_printer_print_str(p, "[");
598
0
    for (i = 0; 
i < nparam0
;
++i0
)
{0
599
0
      const char *name;
600
0
      if (i)
601
0
        p = isl_printer_print_str(p, ", ");
602
0
      name = isl_space_get_dim_name(pnt->dim, isl_dim_param, i);
603
0
      if (
name0
)
{0
604
0
        p = isl_printer_print_str(p, name);
605
0
        p = isl_printer_print_str(p, " = ");
606
0
      }
607
0
      p = isl_printer_print_isl_int(p, pnt->vec->el[1 + i]);
608
0
      if (
!0
isl_int_is_one0
(pnt->vec->el[0]))
{0
609
0
        p = isl_printer_print_str(p, "/");
610
0
        p = isl_printer_print_isl_int(p, pnt->vec->el[0]);
611
0
      }
612
0
    }
613
0
    p = isl_printer_print_str(p, "]");
614
0
    p = isl_printer_print_str(p, " -> ");
615
0
  }
616
0
  data.print_dim = &print_coordinate;
617
0
  data.user = pnt;
618
0
  p = isl_printer_print_str(p, "{ ");
619
0
  p = isl_print_space(pnt->dim, p, 0, &data);
620
0
  p = isl_printer_print_str(p, " }");
621
0
  return p;
622
0
}