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

« back to all changes in this revision

Viewing changes to src/libscotch/library_dgraph_order_f.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:
42
42
/**   DATES      : # Version 5.0  : from : 16 feb 2007     **/
43
43
/**                                 to     31 may 2008     **/
44
44
/**                # Version 5.1  : from : 27 mar 2010     **/
45
 
/**                                 to     29 mar 2010     **/
 
45
/**                                 to     25 jul 2010     **/
46
46
/**                                                        **/
47
47
/************************************************************/
48
48
 
63
63
/*                                    */
64
64
/**************************************/
65
65
 
66
 
FORTRAN (                                           \
67
 
SCOTCHFSTRATDGRAPHORDER, scotchfstratdgraphorder, ( \
68
 
SCOTCH_Strat * const        stratptr,               \
69
 
const char * const          string,                 \
70
 
int * const                 revaptr,                \
71
 
const int                   strnbr),                \
72
 
(stratptr, string, revaptr, strnbr))
73
 
{
74
 
  char * restrict     strtab;                     /* Pointer to null-terminated string */
75
 
 
76
 
  if ((strtab = (char *) memAlloc (strnbr + 1)) == NULL) { /* Allocate temporary space */
77
 
    errorPrint ("SCOTCHFSTRATDGRAPHORDER: out of memory (1)");
78
 
    *revaptr = 1;
79
 
  }
80
 
  memCpy (strtab, string, strnbr);                /* Copy string contents */
81
 
  strtab[strnbr] = '\0';                          /* Terminate string     */
82
 
 
83
 
  *revaptr = SCOTCH_stratDgraphOrder (stratptr, strtab); /* Call original routine */
84
 
 
85
 
  memFree (strtab);                               /* Prevent compiler warnings */
86
 
}
87
 
 
88
66
/*
89
67
**
90
68
*/
158
136
 
159
137
FORTRAN (                                               \
160
138
SCOTCHFDGRAPHORDERCOMPUTE, scotchfdgraphordercompute, ( \
161
 
const SCOTCH_Dgraph * const grafptr,                    \
 
139
SCOTCH_Dgraph * const       grafptr,                    \
162
140
SCOTCH_Dordering * const    ordeptr,                    \
163
141
SCOTCH_Strat * const        stratptr,                   \
164
142
int * const                 revaptr),                   \
173
151
 
174
152
FORTRAN (                                                       \
175
153
SCOTCHFDGRAPHORDERCOMPUTELIST, scotchfdgraphordercomputelist, ( \
176
 
const SCOTCH_Dgraph * const grafptr,                            \
 
154
SCOTCH_Dgraph * const       grafptr,                            \
177
155
SCOTCH_Dordering * const    ordeptr,                            \
178
156
const SCOTCH_Num *          listptr,                            \
179
157
const SCOTCH_Num * const    listtab,                            \
183
161
{
184
162
  *revaptr = SCOTCH_dgraphOrderComputeList (grafptr, ordeptr, *listptr, listtab, stratptr);
185
163
}
 
164
 
 
165
/*
 
166
**
 
167
*/
 
168
 
 
169
FORTRAN (                                           \
 
170
SCOTCHFSTRATDGRAPHORDER, scotchfstratdgraphorder, ( \
 
171
SCOTCH_Strat * const        stratptr,               \
 
172
const char * const          string,                 \
 
173
int * const                 revaptr,                \
 
174
const int                   strnbr),                \
 
175
(stratptr, string, revaptr, strnbr))
 
176
{
 
177
  char * restrict     strtab;                     /* Pointer to null-terminated string */
 
178
 
 
179
  if ((strtab = (char *) memAlloc (strnbr + 1)) == NULL) { /* Allocate temporary space */
 
180
    errorPrint ("SCOTCHFSTRATDGRAPHORDER: out of memory (1)");
 
181
    *revaptr = 1;
 
182
  }
 
183
  memCpy (strtab, string, strnbr);                /* Copy string contents */
 
184
  strtab[strnbr] = '\0';                          /* Terminate string     */
 
185
 
 
186
  *revaptr = SCOTCH_stratDgraphOrder (stratptr, strtab); /* Call original routine */
 
187
 
 
188
  memFree (strtab);                               /* Prevent compiler warnings */
 
189
}
 
190
 
 
191
/*
 
192
**
 
193
*/
 
194
 
 
195
FORTRAN (                                                     \
 
196
SCOTCHFSTRATDGRAPHORDERBUILD, scotchfstratdgraphorderbuild, ( \
 
197
SCOTCH_Strat * const        stratptr,                         \
 
198
const SCOTCH_Num * const    flagval,                          \
 
199
const SCOTCH_Num * const    procnbr,                          \
 
200
const double * const        balrat,                           \
 
201
int * const                 revaptr),                         \
 
202
(stratptr, flagval, procnbr, balrat, revaptr))
 
203
{
 
204
  *revaptr = SCOTCH_stratDgraphOrderBuild (stratptr, *flagval, *procnbr, *balrat);
 
205
}