LCOV - code coverage report
Current view: top level - metalib_isl - isl_multi_cmp.c (source / functions) Hit Total Coverage
Test: 2018-10-31_point_maint_greina16.lcov Lines: 0 15 0.0 %
Date: 2018-11-01 11:27:00 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /*
       2             :  * Copyright 2016      Sven Verdoolaege
       3             :  *
       4             :  * Use of this software is governed by the MIT license
       5             :  *
       6             :  * Written by Sven Verdoolaege
       7             :  */
       8             : 
       9             : #include <isl_multi_macro.h>
      10             : 
      11             : /* Compare two multi expressions.
      12             :  *
      13             :  * Return -1 if "multi1" is "smaller" than "multi2", 1 if "multi1" is "greater"
      14             :  * than "multi2" and 0 if they are equal.
      15             :  */
      16           0 : int FN(MULTI(BASE),plain_cmp)(__isl_keep MULTI(BASE) *multi1,
      17             :         __isl_keep MULTI(BASE) *multi2)
      18             : {
      19             :         int i;
      20             :         int cmp;
      21             : 
      22           0 :         if (multi1 == multi2)
      23           0 :                 return 0;
      24           0 :         if (!multi1)
      25           0 :                 return -1;
      26           0 :         if (!multi2)
      27           0 :                 return 1;
      28             : 
      29           0 :         cmp = isl_space_cmp(multi1->space, multi2->space);
      30           0 :         if (cmp != 0)
      31           0 :                 return cmp;
      32             : 
      33           0 :         for (i = 0; i < multi1->n; ++i) {
      34           0 :                 cmp = FN(EL,plain_cmp)(multi1->u.p[i], multi2->u.p[i]);
      35           0 :                 if (cmp != 0)
      36           0 :                         return cmp;
      37             :         }
      38             : 
      39           0 :         return 0;
      40             : }

Generated by: LCOV version 1.12