~ubuntu-branches/ubuntu/trusty/cloog/trusty

« back to all changes in this revision

Viewing changes to isl/isl_scan.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-10-17 15:54:24 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20131017155424-3q1gw7yhddylfkpj
Tags: 0.18.1-1
* New upstream version.
* Add a comment to build-depend on libpod-latex-perl | perl (<< 5.17.0),
  when the documentation is built. Closes: #711681.
* Use dh_autotools-dev to update config.{sub,guess}. Closes: #719957.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#include "isl_scan.h"
14
14
#include <isl/seq.h>
15
15
#include "isl_tab.h"
 
16
#include <isl_val_private.h>
16
17
 
17
18
struct isl_counter {
18
19
        struct isl_scan_callback callback;
302
303
                return -1;
303
304
        return isl_set_count_upto(set, set->ctx->zero, count);
304
305
}
 
306
 
 
307
/* Count the total number of elements in "set" (in an inefficient way) and
 
308
 * return the result.
 
309
 */
 
310
__isl_give isl_val *isl_set_count_val(__isl_keep isl_set *set)
 
311
{
 
312
        isl_val *v;
 
313
 
 
314
        if (!set)
 
315
                return NULL;
 
316
        v = isl_val_zero(isl_set_get_ctx(set));
 
317
        v = isl_val_cow(v);
 
318
        if (!v)
 
319
                return NULL;
 
320
        if (isl_set_count(set, &v->n) < 0)
 
321
                v = isl_val_free(v);
 
322
        return v;
 
323
}