~ubuntu-branches/ubuntu/trusty/scotch/trusty

« back to all changes in this revision

Viewing changes to src/scotch/gmk_hy.c

  • Committer: Bazaar Package Importer
  • Author(s): "Adam C. Powell, IV", Christophe Trophime, Adam C. Powell, IV
  • Date: 2010-12-29 13:07:19 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20101229130719-jwalolw5d6av6wqx
Tags: 5.1.11.dfsg-1
[Christophe Trophime]
* New upstream release
* Forward-ported patches to version 5.1.10b.
* Install scotch headers properly.
* Fix chrpath commands in debian/rules.
* Fix (pt)scotch library install paths.
* Fix lintian errors and warnings.

[Adam C. Powell, IV]
* Forward-ported patches to version 5.1.11.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright 2004,2007,2008 ENSEIRB, INRIA & CNRS
 
1
/* Copyright 2004,2007,2008,2010 ENSEIRB, INRIA & CNRS
2
2
**
3
3
** This file is part of the Scotch software package for static mapping,
4
4
** graph partitioning and sparse matrix ordering.
50
50
/**                                 to   : 03 feb 2000     **/
51
51
/**                # Version 5.0  : from : 23 dec 2007     **/
52
52
/**                                 to   : 16 map 2008     **/
 
53
/**                # Version 5.1  : from : 01 jul 2010     **/
 
54
/**                                 to   : 15 aug 2010     **/
53
55
/**                                                        **/
54
56
/************************************************************/
55
57
 
131
133
          usagePrint (stdout, C_usageList);
132
134
          exit       (0);
133
135
        case 'V' :
134
 
          fprintf (stderr, "gmk_hy, version %s - F. Pellegrini\n", SCOTCH_VERSION);
135
 
          fprintf (stderr, "Copyright 2004,2007,2008 ENSEIRB, INRIA & CNRS, France\n");
 
136
          fprintf (stderr, "gmk_hy, version " SCOTCH_VERSION_STRING "\n");
 
137
          fprintf (stderr, "Copyright 2004,2007,2008,2010 ENSEIRB, INRIA & CNRS, France\n");
136
138
          fprintf (stderr, "This software is libre/free software under CeCILL-C -- see the user's manual for more information\n");
137
139
          return  (0);
138
140
        default :
147
149
  hnbr = 1 <<  hdim;                              /* Compute number of vertices */
148
150
  hbit = 1 << (hdim - 1);                         /* Compute highest bit value  */
149
151
 
150
 
  fprintf (C_filepntrsrcout, "0\n%ld\t%ld\n0\t000\n",
151
 
           (long) hnbr,                           /* Print number of vertices     */
152
 
           (long) (hdim * hnbr));                 /* Print number of edges (arcs) */
 
152
  fprintf (C_filepntrsrcout, "0\n" SCOTCH_NUMSTRING "\t" SCOTCH_NUMSTRING "\n0\t000\n",
 
153
           (SCOTCH_Num) hnbr,                     /* Print number of vertices     */
 
154
           (SCOTCH_Num) (hdim * hnbr));           /* Print number of edges (arcs) */
153
155
 
154
156
  for (hvrt = 0; hvrt < hnbr; hvrt ++) {          /* For all vertices */
155
 
    fprintf (C_filepntrsrcout, "%ld",
156
 
             (long) hdim);                        /* Output number of neighbors   */
157
 
    for (hngb = hbit; hngb > 0; hngb >>= 1)       /* For all vertex bits          */
158
 
      fprintf (C_filepntrsrcout, "\t%ld",         /* Write corresponding neighbor */
159
 
               (long) (hvrt ^ hngb));
 
157
    fprintf (C_filepntrsrcout, "" SCOTCH_NUMSTRING "",
 
158
             (SCOTCH_Num) hdim);                  /* Output number of neighbors         */
 
159
    for (hngb = hbit; hngb > 0; hngb >>= 1)       /* For all vertex bits                */
 
160
      fprintf (C_filepntrsrcout, "\t" SCOTCH_NUMSTRING, /* Write corresponding neighbor */
 
161
               (SCOTCH_Num) (hvrt ^ hngb));
160
162
    fprintf (C_filepntrsrcout, "\n");
161
163
  }
162
164