| 1 |
#pragma once |
| 2 |
#include "../internal/internal.h" |
| 3 |
#include "../refine_map/refine_map.h" |
| 4 |
#include "params.h" |
| 5 |
#include "structs.h" |
| 6 |
#include <stdio.h> |
| 7 |
|
| 8 |
#ifdef __cplusplus |
| 9 |
/* if C++, define the rest of this header file as extern C */ |
| 10 |
extern "C" { |
| 11 |
#endif |
| 12 |
|
| 13 |
/* assign/assign.c */ |
| 14 |
extern void assign(struct vtx_data **graph, double **yvecs, int nvtxs, int ndims, int cube_or_mesh, |
| 15 |
int nsets, double *wsqrt, int *sets, int *active, int mediantype, double *goal, |
| 16 |
int vwgt_max); |
| 17 |
|
| 18 |
/* assign/assign_out.c */ |
| 19 |
extern void assign_out(int nvtxs, int *sets, int nsets, char *outname); |
| 20 |
|
| 21 |
/* assign/mapper.c */ |
| 22 |
extern void mapper(struct vtx_data **graph, double **xvecs, int nvtxs, int *active, int *sets, |
| 23 |
int ndims, int cube_or_mesh, int nsets, int mediantype, double *goal, |
| 24 |
int vwgt_max); |
| 25 |
|
| 26 |
/* assign/median.c */ |
| 27 |
extern void median_assign(struct vtx_data **graph, double *vals, int nvtxs, double *goal, |
| 28 |
int using_vwgts, int *sets, double wlow, double whigh, double guess); |
| 29 |
extern void median(struct vtx_data **graph, double *vals, int nvtxs, int *active, double *goal, |
| 30 |
int using_vwgts, int *sets); |
| 31 |
|
| 32 |
/* assign/merge_assign.c */ |
| 33 |
extern void merge_assignments(int *assignment, int *subassign, int *subsets, int subnvtxs, |
| 34 |
int *loc2glob); |
| 35 |
|
| 36 |
/* assign/rec_median.c */ |
| 37 |
extern void rec_median_1(struct vtx_data **graph, double *vals, int nvtxs, int *active, |
| 38 |
int cube_or_mesh, int nsets, double *goal, int using_vwgts, int *assign, |
| 39 |
int top); |
| 40 |
extern void rec_median_k(struct vtx_data **graph, double **vals, int nvtxs, int *active, int ndims, |
| 41 |
int cube_or_mesh, double *goal, int using_vwgts, int *assign); |
| 42 |
|
| 43 |
/* assign/rotate.c */ |
| 44 |
extern void rotate2d(double **yvecs, int nmyvtxs, double theta); |
| 45 |
extern void rotate3d(double **yvecs, int nmyvtxs, double theta, double phi, double gamma2); |
| 46 |
|
| 47 |
/* assign/y2x.c */ |
| 48 |
extern void y2x(double **xvecs, int ndims, int nmyvtxs, double *wsqrt); |
| 49 |
extern void x2y(double **yvecs, int ndims, int nmyvtxs, double *wsqrt); |
| 50 |
|
| 51 |
/* bpmatch/checkbp.c */ |
| 52 |
extern void checkbp(struct vtx_data **graph, double **xvecs, int *sets, double *dists, int nvtxs, |
| 53 |
int ndims); |
| 54 |
|
| 55 |
/* bpmatch/genvals2d.c */ |
| 56 |
extern void genvals2d(double **xvecs, double *vals[4][MAXSETS], int nvtxs); |
| 57 |
|
| 58 |
/* bpmatch/genvals3d.c */ |
| 59 |
extern void genvals3d(double **xvecs, double *vals[8][MAXSETS], int nvtxs); |
| 60 |
|
| 61 |
/* bpmatch/inits2d.c */ |
| 62 |
extern int findindex(int *indices, double *vals, double target, int nvals); |
| 63 |
extern void inits2d(struct vtx_data **graph, double **xvecs, double *vals[4][MAXSETS], |
| 64 |
int *indices[4][MAXSETS], int nvtxs, double *dist, int startvtx[4][MAXSETS], |
| 65 |
double *size, int *sets); |
| 66 |
|
| 67 |
/* bpmatch/inits3d.c */ |
| 68 |
extern void inits3d(struct vtx_data **graph, double **xvecs, double *vals[8][MAXSETS], |
| 69 |
int *indices[8][MAXSETS], int nvtxs, double *dist, int startvtx[8][MAXSETS], |
| 70 |
double *size, int *sets); |
| 71 |
|
| 72 |
/* bpmatch/map2d.c */ |
| 73 |
extern void map2d(struct vtx_data **graph, double **xvecs, int nvtxs, int *sets, double *goal, |
| 74 |
int vwgt_max); |
| 75 |
|
| 76 |
/* bpmatch/map3d.c */ |
| 77 |
extern void map3d(struct vtx_data **graph, double **xvecs, int nvtxs, int *sets, double *goal, |
| 78 |
int vwgt_max); |
| 79 |
|
| 80 |
/* bpmatch/movevtxs.c */ |
| 81 |
extern void movevtxs(struct vtx_data **graph, int nvtxs, int nsets, double *dist, |
| 82 |
int *indices[][MAXSETS], double *vals[][MAXSETS], int startvtx[][MAXSETS], |
| 83 |
int *sets, double *size, double *goal, int vwgt_max); |
| 84 |
|
| 85 |
/* bpmatch/sorts2d.c */ |
| 86 |
extern void sorts2d(double *vals[4][MAXSETS], int *indices[4][MAXSETS], int nvtxs); |
| 87 |
|
| 88 |
/* bpmatch/sorts3d.c */ |
| 89 |
extern void sorts3d(double *vals[8][MAXSETS], int *indices[8][MAXSETS], int nvtxs); |
| 90 |
|
| 91 |
/* coarsen/coarsen.c */ |
| 92 |
extern void coarsen(struct vtx_data **graph, int nvtxs, int nedges, int using_vwgts, |
| 93 |
int using_ewgts, float *term_wgts[], int igeom, float **coords, double **yvecs, |
| 94 |
int ndims, int solver_flag, int vmax, double eigtol, int nstep, int step, |
| 95 |
int give_up); |
| 96 |
|
| 97 |
/* coarsen/coarsen1.c */ |
| 98 |
extern void coarsen1(struct vtx_data **graph, int nvtxs, int nedges, struct vtx_data ***pcgraph, |
| 99 |
int *pcnvtxs, int *pcnedges, int **pv2cv, int igeom, float **coords, |
| 100 |
float **ccoords, int using_ewgts); |
| 101 |
|
| 102 |
/* coarsen/countcedges.c */ |
| 103 |
extern void countcedges(struct vtx_data **graph, int nvtxs, int *start, int *seenflag, int *mflag, |
| 104 |
int *v2cv, int *pcnedges); |
| 105 |
|
| 106 |
/* coarsen/interpolate.c */ |
| 107 |
extern void ch_interpolate(double **vecs, double **cvecs, int ndims, struct vtx_data **graph, |
| 108 |
int nvtxs, int *v2cv, int using_ewgts); |
| 109 |
|
| 110 |
/* coarsen/makeccoords.c */ |
| 111 |
extern void makeccoords(struct vtx_data **graph, int cnvtxs, int *cv2v_ptrs, int *cv2v_vals, |
| 112 |
int igeom, float **coords, float **ccoords); |
| 113 |
|
| 114 |
/* coarsen/makecgraph.c */ |
| 115 |
extern void makecgraph(struct vtx_data **graph, int nvtxs, struct vtx_data ***pcgraph, int *pcnvtxs, |
| 116 |
int *pcnedges, int *mflag, int *v2cv, int nmerged, int using_ewgts, |
| 117 |
int igeom, float **coords, float **ccoords); |
| 118 |
|
| 119 |
/* coarsen/makecgraph2.c */ |
| 120 |
extern void makecgraph2(struct vtx_data **graph, int nvtxs, int nedges, struct vtx_data ***pcgraph, |
| 121 |
int *pcnvtxs, int *pcnedges, int *mflag, int *v2cv, int nmerged, |
| 122 |
int using_ewgts, int igeom, float **coords, float **ccoords); |
| 123 |
|
| 124 |
/* coarsen/makefgraph.c */ |
| 125 |
extern void makefgraph(struct vtx_data **graph, int nvtxs, int nedges, struct vtx_data ***pcgraph, |
| 126 |
int cnvtxs, int *pcnedges, int *v2cv, int using_ewgts, int igeom, |
| 127 |
float **coords, float **ccoords); |
| 128 |
|
| 129 |
/* coarsen/makev2cv.c */ |
| 130 |
extern void makev2cv(int *mflag, int nvtxs, int *v2cv); |
| 131 |
|
| 132 |
/* coarsen/maxmatch.c */ |
| 133 |
extern int maxmatch(struct vtx_data **graph, int nvtxs, int nedges, int *mflag, int using_ewgts, |
| 134 |
int igeom, float **coords); |
| 135 |
|
| 136 |
/* coarsen/maxmatch1.c */ |
| 137 |
extern int maxmatch1(struct vtx_data **graph, int nvtxs, int *mflag, int using_ewgts); |
| 138 |
|
| 139 |
/* coarsen/maxmatch2.c */ |
| 140 |
extern int maxmatch2(struct vtx_data **graph, int nvtxs, int *mflag, int using_ewgts); |
| 141 |
|
| 142 |
/* coarsen/maxmatch3.c */ |
| 143 |
extern int maxmatch3(struct vtx_data **graph, int nvtxs, int *mflag, int using_ewgts); |
| 144 |
|
| 145 |
/* coarsen/maxmatch4.c */ |
| 146 |
extern int maxmatch4(struct vtx_data **graph, int nvtxs, int nedges, int *mflag, int using_ewgts); |
| 147 |
|
| 148 |
/* coarsen/maxmatch5.c */ |
| 149 |
extern int maxmatch5(struct vtx_data **graph, int nvtxs, int *mflag, int igeom, float **coords); |
| 150 |
|
| 151 |
/* coarsen/maxmatch9.c */ |
| 152 |
extern int maxmatch9(struct vtx_data **graph, int nvtxs, int *mflag, int using_ewgts); |
| 153 |
|
| 154 |
/* connect/add_edges.c */ |
| 155 |
extern void add_edges(struct vtx_data **graph, struct edgeslist *new_edges, |
| 156 |
struct ilists **old_edges, struct flists **old_ewgts, int using_ewgts); |
| 157 |
|
| 158 |
/* connect/connect_enforce.c */ |
| 159 |
extern void connect_enforce(struct vtx_data **graph, int nvtxs, int using_ewgts, int *assignment, |
| 160 |
double *goal, int nsets_tot, int *total_move, int *max_move); |
| 161 |
|
| 162 |
/* connect/connected.c */ |
| 163 |
extern void make_connected(struct vtx_data **graph, int nvtxs, int *nedges, int *mark, int *vtxlist, |
| 164 |
struct connect_data **cdata, int using_ewgts); |
| 165 |
extern void make_unconnected(struct vtx_data **graph, int *nedges, struct connect_data **cdata, |
| 166 |
int using_ewgts); |
| 167 |
extern void print_connected(struct connect_data *cdata); |
| 168 |
extern void free_edgeslist(struct edgeslist *edge_list); |
| 169 |
|
| 170 |
/* connect/find_comps.c */ |
| 171 |
extern int find_comps(struct vtx_data **graph, int nvtxs, int *mark, int *vtxlist); |
| 172 |
extern int find_edges(struct vtx_data **graph, int nvtxs, int *mark, int *vtxlist, |
| 173 |
struct edgeslist **edges); |
| 174 |
|
| 175 |
/* connect/heap.c */ |
| 176 |
extern void heapify(struct heap *heap, int index, int nvals, int *map); |
| 177 |
extern void heap_build(struct heap *heap, int nvals, int *map); |
| 178 |
extern double heap_extract_max(struct heap *heap, int nvals, int *ptag, int *map); |
| 179 |
extern void heap_update_val(struct heap *heap, int index, double newval, int *map); |
| 180 |
|
| 181 |
/* eigen/Tevec.c */ |
| 182 |
extern double Tevec(double *alpha, double *beta, int j, double ritz, double *s); |
| 183 |
|
| 184 |
/* eigen/bidir.c */ |
| 185 |
extern double bidir(double *alpha, double *beta, int j, double ritz, double *s, double hurdle); |
| 186 |
|
| 187 |
/* eigen/bisect.c */ |
| 188 |
extern int bisect(double *alpha, double *beta, int j, double Anorm, double *workj, double *ritz, |
| 189 |
int nevals_left, int nevals_right, double tol, double *ritz_sav, int max_steps); |
| 190 |
|
| 191 |
/* eigen/checkeig.c */ |
| 192 |
extern double checkeig(double *err, struct vtx_data **A, double *y, int n, double lambda, |
| 193 |
double *vwsqrt, double *work); |
| 194 |
|
| 195 |
/* eigen/checkeig_ext.c */ |
| 196 |
extern double checkeig_ext(double *err, double *work, struct vtx_data **A, double *y, int n, |
| 197 |
double extval, double *vwsqrt, double *gvec, double eigtol, |
| 198 |
int warnings); |
| 199 |
|
| 200 |
/* eigen/checkorth.c */ |
| 201 |
extern void checkorth(double **mat, int n, int dim); |
| 202 |
extern void checkorth_float(float **mat, int n, int dim); |
| 203 |
|
| 204 |
/* eigen/cksturmcnt.c */ |
| 205 |
extern void cksturmcnt(double *vec, int beg, int end, double x1, double x2, int *x1ck, int *x2ck, |
| 206 |
int *numck); |
| 207 |
|
| 208 |
/* eigen/eigensolve.c */ |
| 209 |
extern void eigensolve(struct vtx_data **graph, int nvtxs, int nedges, double maxdeg, int vwgt_max, |
| 210 |
double *vwsqrt, int using_vwgts, int using_ewgts, float *term_wgts[], |
| 211 |
int igeom, float **coords, double **yvecs, double *evals, int architecture, |
| 212 |
int *assignment, double *goal, int solver_flag, int rqi_flag, int vmax, |
| 213 |
int ndims, int mediantype, double eigtol); |
| 214 |
|
| 215 |
/* eigen/get_extval.c */ |
| 216 |
extern void get_extval(double *alpha, double *beta, int j, double ritzval, double *s, double eigtol, |
| 217 |
double wnorm_g, double sigma, double *extval, double *v, double *work1, |
| 218 |
double *work2); |
| 219 |
|
| 220 |
/* eigen/get_ritzvals.c */ |
| 221 |
extern int get_ritzvals(double *alpha, double *beta, int j, double Anorm, double *workj, |
| 222 |
double *ritz, int d, int left_goodlim, int right_goodlim, double eigtol, |
| 223 |
double bis_safety); |
| 224 |
|
| 225 |
/* eigen/lanc_seconds.c */ |
| 226 |
extern double lanc_seconds(void); |
| 227 |
|
| 228 |
/* eigen/lanczos_FO.c */ |
| 229 |
extern void lanczos_FO(struct vtx_data **A, int n, int d, double **y, double *lambda, double *bound, |
| 230 |
double eigtol, double *vwsqrt, double maxdeg, int version); |
| 231 |
|
| 232 |
/* eigen/lanczos_SO.c */ |
| 233 |
extern void lanczos_SO(struct vtx_data **A, int n, int d, double **y, double *lambda, double *bound, |
| 234 |
double eigtol, double *vwsqrt, double maxdeg, int version, int cube_or_mesh, |
| 235 |
int nsets, int *assignment, int *active, int mediantype, double *goal, |
| 236 |
int vwgt_max); |
| 237 |
|
| 238 |
/* eigen/lanczos_SO_float.c */ |
| 239 |
extern void lanczos_SO_float(struct vtx_data **A, int n, int d, double **y, double *lambda, |
| 240 |
double *bound, double eigtol, double *vwsqrt, double maxdeg, |
| 241 |
int version, int cube_or_mesh, int nsets, int *assignment, int *active, |
| 242 |
int mediantype, double *goal, int vwgt_max); |
| 243 |
|
| 244 |
/* eigen/lanczos_ext.c */ |
| 245 |
extern int lanczos_ext(struct vtx_data **A, int n, int d, double **y, double eigtol, double *vwsqrt, |
| 246 |
double maxdeg, int version, double *gvec, double sigma); |
| 247 |
|
| 248 |
/* eigen/lanczos_ext_float.c */ |
| 249 |
extern int lanczos_ext_float(struct vtx_data **A, int n, int d, double **y, double eigtol, |
| 250 |
double *vwsqrt, double maxdeg, int version, double *gvec, |
| 251 |
double sigma); |
| 252 |
|
| 253 |
/* eigen/lanpause.c */ |
| 254 |
extern int lanpause(int j, int lastpause, int interval, double **q, int n, int *pausemode, |
| 255 |
int version, double beta); |
| 256 |
extern int lanpause_float(int j, int lastpause, int interval, float **q, int n, int *pausemode, |
| 257 |
int version, double beta); |
| 258 |
|
| 259 |
/* eigen/makeorthlnk.c */ |
| 260 |
extern struct orthlink *makeorthlnk(void); |
| 261 |
extern struct orthlink_float *makeorthlnk_float(void); |
| 262 |
|
| 263 |
/* eigen/mkeigvecs.c */ |
| 264 |
extern void mkeigvecs(struct scanlink *scanlist, double *lambda, double *bound, int *index, |
| 265 |
double *bj, int d, double *Sres_max, double *alpha, double *beta, int j, |
| 266 |
double *s, double **y, int n, double **q); |
| 267 |
|
| 268 |
/* eigen/mkscanlist.c */ |
| 269 |
extern struct scanlink *mkscanlist(int depth); |
| 270 |
|
| 271 |
/* eigen/orthog1.c */ |
| 272 |
extern void orthog1(double *x, int beg, int end); |
| 273 |
extern void orthog1_float(float *x, int beg, int end); |
| 274 |
|
| 275 |
/* eigen/orthogonalize.c */ |
| 276 |
extern void orthogonalize(double *vec, int n, struct orthlink *orthlist); |
| 277 |
|
| 278 |
/* eigen/orthogvec.c */ |
| 279 |
extern void orthogvec(double *vec1, int beg, int end, double *vec2); |
| 280 |
extern void orthogvec_float(float *vec1, int beg, int end, float *vec2); |
| 281 |
|
| 282 |
/* eigen/ql.c */ |
| 283 |
extern int ql(double d[], double e[], int n); |
| 284 |
|
| 285 |
/* eigen/rqi.c */ |
| 286 |
extern void rqi(struct vtx_data **A, double **yvecs, int index, int n, double *r1, double *r2, |
| 287 |
double *v, double *w, double *x, double *y, double *work, double tol, |
| 288 |
double initshift, double *evalest, double *vwsqrt, struct orthlink *orthlist, |
| 289 |
int cube_or_mesh, int nsets, int *assignment, int *active, int mediantype, |
| 290 |
double *goal, int vwgt_max, int ndims); |
| 291 |
|
| 292 |
/* eigen/rqi_ext.c */ |
| 293 |
extern void rqi_ext(void); |
| 294 |
|
| 295 |
/* eigen/scale_diag.c */ |
| 296 |
extern void scale_diag(double *vec, int beg, int end, double *diag); |
| 297 |
extern void scale_diag_float(float *vec, int beg, int end, float *diag); |
| 298 |
|
| 299 |
/* eigen/scanmax.c */ |
| 300 |
extern void scanmax(double *vec, int beg, int end, struct scanlink **scanlist); |
| 301 |
|
| 302 |
/* eigen/scanmin.c */ |
| 303 |
extern void scanmin(double *vec, int beg, int end, struct scanlink **scanlist); |
| 304 |
|
| 305 |
/* eigen/solistout.c */ |
| 306 |
extern void solistout(struct orthlink **solist, int ngood, int j); |
| 307 |
extern void solistout_float(struct orthlink_float **solist, int ngood, int j); |
| 308 |
|
| 309 |
/* eigen/sorthog.c */ |
| 310 |
extern void sorthog(double *vec, int n, struct orthlink **solist, int ngood); |
| 311 |
extern void sorthog_float(float *vec, int n, struct orthlink_float **solist, int ngood); |
| 312 |
|
| 313 |
/* eigen/splarax.c */ |
| 314 |
extern void splarax(double *result, struct vtx_data **mat, int n, double *vec, double *vwsqrt, |
| 315 |
double *work); |
| 316 |
extern void splarax_float(float *result, struct vtx_data **mat, int n, float *vec, float *vwsqrt, |
| 317 |
float *work); |
| 318 |
|
| 319 |
/* eigen/sturmcnt.c */ |
| 320 |
extern int sturmcnt(double *alpha, double *beta, int j, double mu, double *p); |
| 321 |
|
| 322 |
/* eigen/tri_solve.c */ |
| 323 |
extern void tri_solve(double *alpha, double *beta, int j, double lambda, double *v, double b, |
| 324 |
double *d, double *e); |
| 325 |
|
| 326 |
/* eigen/warnings.c */ |
| 327 |
void warnings(double *workn, struct vtx_data **A, double **y, int n, double *lambda, double *vwsqrt, |
| 328 |
double *Ares, double *bound, int *index, int d, int j, int maxj, double Sres_max, |
| 329 |
double eigtol, double *u, double Anorm, FILE *out_file); |
| 330 |
|
| 331 |
/* graph/check_graph.c */ |
| 332 |
extern int check_graph(struct vtx_data **graph, int nvtxs, int nedges); |
| 333 |
extern int is_an_edge(struct vtx_data *vertex, int v2, float *weight2); |
| 334 |
|
| 335 |
/* graph/free_graph.c */ |
| 336 |
extern void free_graph(struct vtx_data **graph); |
| 337 |
|
| 338 |
/* graph/graph_out.c */ |
| 339 |
extern void graph_out(struct vtx_data **graph, int nvtxs, int using_ewgts, char *tag, |
| 340 |
char *file_name); |
| 341 |
|
| 342 |
/* graph/mm_out.c */ |
| 343 |
extern void mm_out(struct vtx_data **graph, int nvtxs, int using_ewgts, char *tag, char *file_name); |
| 344 |
|
| 345 |
/* graph/reformat.c */ |
| 346 |
extern int reformat(int *start, int *adjacency, int nvtxs, int *pnedges, int *vwgts, float *ewgts, |
| 347 |
struct vtx_data ***pgraph); |
| 348 |
|
| 349 |
/* graph/subgraph.c */ |
| 350 |
extern void make_subgraph(struct vtx_data **graph, struct vtx_data **subgraph, int subnvtxs, |
| 351 |
int *psubnedges, int *assignment, int set, int *glob2loc, int *loc2glob, |
| 352 |
int *degree, int using_ewgts); |
| 353 |
extern void remake_graph(struct vtx_data **subgraph, int subnvtxs, int *loc2glob, int *degree, |
| 354 |
int using_ewgts); |
| 355 |
|
| 356 |
/* inertial/eigenvec2.c */ |
| 357 |
extern void evals2(double H[2][2], double *eval1, double *eval2); |
| 358 |
extern void eigenvec2(double A[2][2], double eval, double evec[2], double *res); |
| 359 |
|
| 360 |
/* inertial/eigenvec3.c */ |
| 361 |
extern void ch_evals3(double H[3][3], double *eval1, double *eval2, double *eval3); |
| 362 |
extern void kramer3(double A[3][3], double b[3], double x[3]); |
| 363 |
extern void ch_eigenvec3(double A[3][3], double eval, double evec[3], double *res); |
| 364 |
|
| 365 |
/* inertial/inertial.c */ |
| 366 |
extern void inertial(struct vtx_data **graph, int nvtxs, int cube_or_mesh, int nsets, int igeom, |
| 367 |
float **coords, int *sets, double *goal, int using_vwgts); |
| 368 |
|
| 369 |
/* inertial/inertial1d.c */ |
| 370 |
extern void inertial1d(struct vtx_data **graph, int nvtxs, int cube_or_mesh, int nsets, float *x, |
| 371 |
int *sets, double *goal, int using_vwgts); |
| 372 |
|
| 373 |
/* inertial/inertial2d.c */ |
| 374 |
extern void inertial2d(struct vtx_data **graph, int nvtxs, int cube_or_mesh, int nsets, float *x, |
| 375 |
float *y, int *sets, double *goal, int using_vwgts); |
| 376 |
|
| 377 |
/* inertial/inertial3d.c */ |
| 378 |
extern void inertial3d(struct vtx_data **graph, int nvtxs, int cube_or_mesh, int nsets, float *x, |
| 379 |
float *y, float *z, int *sets, double *goal, int using_vwgts); |
| 380 |
|
| 381 |
/* inertial/make_subgeom.c */ |
| 382 |
extern void make_subgeom(int igeom, float **coords, float **subcoords, int subnvtxs, int *loc2glob); |
| 383 |
|
| 384 |
/* input/check_input.c */ |
| 385 |
extern int check_input(struct vtx_data **graph, int nvtxs, int nedges, int igeom, float **coords, |
| 386 |
char *graphname, int *assignment, double *goal, int architecture, |
| 387 |
int ndims_tot, int mesh_dims[3], int global_method, int local_method, |
| 388 |
int rqi_flag, int *vmax, int ndims, double eigtol); |
| 389 |
|
| 390 |
/* input/input.c */ |
| 391 |
|
| 392 |
/* input/input_assign.c */ |
| 393 |
|
| 394 |
/* input/input_geom.c */ |
| 395 |
|
| 396 |
/* input/input_graph.c */ |
| 397 |
|
| 398 |
/* input/read_params.c */ |
| 399 |
extern void read_params(FILE *pfile); |
| 400 |
|
| 401 |
extern double read_val(FILE *, int *); |
| 402 |
extern int read_int(FILE *, int *); |
| 403 |
|
| 404 |
/* input/read_val.c */ |
| 405 |
|
| 406 |
/* input/reflect_input.c */ |
| 407 |
|
| 408 |
/* internal/check_internal.c */ |
| 409 |
extern void check_internal(struct vtx_data **graph, int nvtxs, struct bidint *int_list, |
| 410 |
struct bidint *set_list, struct bidint *vtx_elems, int *total_vwgt, |
| 411 |
int *assign, int nsets_tot); |
| 412 |
|
| 413 |
/* internal/force_internal.c */ |
| 414 |
extern void force_internal(struct vtx_data **graph, int nvtxs, int using_ewgts, int *assign, |
| 415 |
double *goal, int nsets_tot, int npasses_max); |
| 416 |
|
| 417 |
/* internal/improve_internal.c */ |
| 418 |
extern int improve_internal(struct vtx_data **graph, int nvtxs, int *assign, double *goal, |
| 419 |
struct bidint *int_list, struct bidint *set_list, |
| 420 |
struct bidint *vtx_elems, int set1, int *locked, int *nlocked, |
| 421 |
int using_ewgts, int vwgt_max, int *total_vwgt); |
| 422 |
|
| 423 |
/* klspiff/bilistops.c */ |
| 424 |
extern void add2bilist(struct bilist *lptr, struct bilist **list); |
| 425 |
extern void removebilist(struct bilist *lptr, struct bilist **list); |
| 426 |
extern void movebilist(struct bilist *lptr, struct bilist **oldlist, struct bilist **newlist); |
| 427 |
|
| 428 |
/* klspiff/buckets.c */ |
| 429 |
extern void bucketsorts(struct vtx_data **graph, int nvtxs, struct bilist ****buckets, |
| 430 |
struct bilist **listspace, int **dvals, int *sets, float *term_wgts[], |
| 431 |
int maxdval, int nsets, int parity, int (*hops)[MAXSETS], int *bspace, |
| 432 |
int list_length, int npass, int using_ewgts); |
| 433 |
|
| 434 |
/* klspiff/buckets1.c */ |
| 435 |
extern void bucketsort1(struct vtx_data **graph, int vtx, struct bilist ****buckets, |
| 436 |
struct bilist **listspace, int **dvals, int *sets, float *term_wgts[], |
| 437 |
int maxdval, int nsets, int (*hops)[MAXSETS], int using_ewgts); |
| 438 |
|
| 439 |
/* klspiff/buckets_bi.c */ |
| 440 |
extern void bucketsorts_bi(struct vtx_data **graph, int nvtxs, struct bilist ****buckets, |
| 441 |
struct bilist **listspace, int **dvals, int *sets, float *term_wgts[], |
| 442 |
int maxdval, int nsets, int parity, int (*hops)[MAXSETS], int *bspace, |
| 443 |
int list_length, int npass, int using_ewgts); |
| 444 |
|
| 445 |
/* klspiff/coarsen_kl.c */ |
| 446 |
extern void coarsen_kl(struct vtx_data **graph, int nvtxs, int nedges, int using_vwgts, |
| 447 |
int using_ewgts, float *term_wgts[], int igeom, float **coords, int vwgt_max, |
| 448 |
int *assignment, double *goal, int architecture, int (*hops)[MAXSETS], |
| 449 |
int solver_flag, int ndims, int nsets, int vmax, int mediantype, |
| 450 |
int mkconnected, double eigtol, int nstep, int step, int **pbndy_list, |
| 451 |
double *weights, int give_up); |
| 452 |
|
| 453 |
/* klspiff/compress_ewgts.c */ |
| 454 |
extern void compress_ewgts(struct vtx_data **graph, int nvtxs, int nedges, double ewgt_max, |
| 455 |
int using_ewgts); |
| 456 |
extern void restore_ewgts(struct vtx_data **graph, int nvtxs); |
| 457 |
|
| 458 |
/* klspiff/count_weights.c */ |
| 459 |
extern void count_weights(struct vtx_data **graph, int nvtxs, int *sets, int nsets, double *weights, |
| 460 |
int using_vwgts); |
| 461 |
|
| 462 |
/* klspiff/kl_init.c */ |
| 463 |
extern int kl_init(struct bilist *****bucket_ptrs, struct bilist ***listspace, int ***dvals, |
| 464 |
int ***tops, int nvtxs, int nsets, int maxchange); |
| 465 |
|
| 466 |
/* klspiff/kl_output.c */ |
| 467 |
extern void pbuckets(struct bilist ****buckets, struct bilist **listspace, int maxdeg, int nsets); |
| 468 |
extern void p1bucket(struct bilist **bucket, struct bilist *lptr, int maxdeg); |
| 469 |
|
| 470 |
/* klspiff/klspiff.c */ |
| 471 |
extern void klspiff(struct vtx_data **graph, int nvtxs, int *sets, int nsets, int (*hops)[MAXSETS], |
| 472 |
double *goal, float *term_wgts[], int max_dev, double maxdeg, int using_ewgts, |
| 473 |
int **bndy_list, double *weights); |
| 474 |
|
| 475 |
/* klspiff/make_bndy_list.c */ |
| 476 |
extern void make_bndy_list(struct vtx_data **graph, struct bilist *movelist, |
| 477 |
struct bilist ****buckets, struct bilist **listspace, int *sets, |
| 478 |
int nsets, int *bspace, int **tops, int **bndy_list); |
| 479 |
|
| 480 |
/* klspiff/make_kl_list.c */ |
| 481 |
extern int make_kl_list(struct vtx_data **graph, struct bilist *movelist, struct bilist ****buckets, |
| 482 |
struct bilist **listspace, int *sets, int nsets, int *bspace, int **dvals, |
| 483 |
int maxdval); |
| 484 |
|
| 485 |
/* klspiff/nway_kl.c */ |
| 486 |
extern int nway_kl(struct vtx_data **graph, int nvtxs, struct bilist ****buckets, |
| 487 |
struct bilist **listspace, int **tops, int **dvals, int *sets, int maxdval, |
| 488 |
int nsets, double *goal, float *term_wgts[], int (*hops)[MAXSETS], int max_dev, |
| 489 |
int using_ewgts, int **bndy_list, double *startweight); |
| 490 |
|
| 491 |
/* klvspiff/bpm_improve.c */ |
| 492 |
extern void bpm_improve(struct vtx_data **graph, int *sets, double *goal, int max_dev, |
| 493 |
int **bndy_list, double *weights, int using_vwgts); |
| 494 |
|
| 495 |
/* klvspiff/bucketsv.c */ |
| 496 |
extern void bucketsortsv(struct vtx_data **graph, int nvtxs, struct bilist **lbuckets, |
| 497 |
struct bilist **rbuckets, struct bilist *llistspace, |
| 498 |
struct bilist *rlistspace, int *ldvals, int *rdvals, int *sets, |
| 499 |
int maxdval, int parity, int *bspace, int list_length); |
| 500 |
|
| 501 |
/* klvspiff/clear_dvals.c */ |
| 502 |
extern void clear_dvals(struct vtx_data **graph, int nvtxs, int *ldvals, int *rdvals, int *bspace, |
| 503 |
int list_length); |
| 504 |
|
| 505 |
/* klvspiff/coarsen_klv.c */ |
| 506 |
extern void coarsen_klv(struct vtx_data **graph, int nvtxs, int nedges, int using_vwgts, |
| 507 |
int using_ewgts, float *term_wgts[], int igeom, float **coords, |
| 508 |
int vwgt_max, int *assignment, double *goal, int architecture, |
| 509 |
int (*hops)[MAXSETS], int solver_flag, int ndims, int nsets, int vmax, |
| 510 |
int mediantype, int mkconnected, double eigtol, int nstep, int step, |
| 511 |
int **pbndy_list, double *weights, int give_up); |
| 512 |
extern void print_sep_size(int *list, struct vtx_data **graph); |
| 513 |
|
| 514 |
/* klvspiff/countup_vtx_sep.c */ |
| 515 |
extern void countup_vtx_sep(struct vtx_data **graph, int nvtxs, int *sets); |
| 516 |
|
| 517 |
/* klvspiff/find_bndy.c */ |
| 518 |
extern int find_bndy(struct vtx_data **graph, int nvtxs, int *assignment, int new_val, |
| 519 |
int **pbndy_list); |
| 520 |
extern int find_side_bndy(struct vtx_data **graph, int nvtxs, int *assignment, int side, |
| 521 |
int new_val, int **pbndy_list); |
| 522 |
|
| 523 |
/* klvspiff/flatten.c */ |
| 524 |
extern int flatten(struct vtx_data **graph, int nvtxs, int nedges, struct vtx_data ***pcgraph, |
| 525 |
int *pcnvtxs, int *pcnedges, int **pv2cv, int using_ewgts, int igeom, |
| 526 |
float **coords, float **ccoords); |
| 527 |
extern void find_flat(struct vtx_data **graph, int nvtxs, int *pcnvtxs, int *v2cv); |
| 528 |
extern int SameStructure(int node1, int node2, struct vtx_data **graph, int *scatter); |
| 529 |
|
| 530 |
/* klvspiff/flow.c */ |
| 531 |
extern void wbpcover(int n_left, int n_right, int *pointers, int *indices, int *vweight, |
| 532 |
int *psep_size, int *psep_weight, int **psep_nodes); |
| 533 |
extern void confirm_cover(int n_left, int n_right, int *pointers, int *indices, int *flow, |
| 534 |
int *vweight, int *resid, int sep_size, int *sep_nodes); |
| 535 |
extern int count_flow(int n_left, int n_right, int *pointers, int *flow); |
| 536 |
extern void count_resid(int n_left, int n_right, int *resid, int *vweight, int *marked); |
| 537 |
extern void check_resid(int n_left, int n_right, int *vweight, int *resid, int *pointers, |
| 538 |
int *indices, int *flow); |
| 539 |
|
| 540 |
/* klvspiff/klv_init.c */ |
| 541 |
extern int klv_init(struct bilist ***lbucket_ptr, struct bilist ***rbucket_ptr, |
| 542 |
struct bilist **llistspace, struct bilist **rlistspace, int **ldvals, |
| 543 |
int **rdvals, int nvtxs, int maxchange); |
| 544 |
|
| 545 |
/* klvspiff/klvspiff.c */ |
| 546 |
extern void klvspiff(struct vtx_data **graph, int nvtxs, int *sets, double *goal, int max_dev, |
| 547 |
int **bndy_list, double *weights); |
| 548 |
|
| 549 |
/* klvspiff/make_bpgraph.c */ |
| 550 |
extern void make_bpgraph(struct vtx_data **graph, int *sets, int *bndy_list, int sep_size, |
| 551 |
int set_match, int **ppointers, int **pindices, int **pvweight, |
| 552 |
int **ploc2glob, int *pnleft, int *pnright, int using_vwgts); |
| 553 |
extern void check_bpgraph(int n_left, int n_right, int *pointers, int *indices); |
| 554 |
extern void print_bpgraph(int nleft, int nright, int *pointers, int *indices, int *vwgts); |
| 555 |
|
| 556 |
/* klvspiff/make_sep_list.c */ |
| 557 |
extern int make_sep_list(int *bspace, int list_length, int *sets); |
| 558 |
|
| 559 |
/* klvspiff/matching.c */ |
| 560 |
extern void bpcover(int n_left, int n_right, int *pointers, int *indices, int *sep_size, |
| 561 |
int *sep_nodes); |
| 562 |
extern void confirm_match(int n_left, int n_right, int *pointers, int *indices, int *matching, |
| 563 |
int sep_size, int *sep_nodes); |
| 564 |
extern int match_size(int *matching, int nleft); |
| 565 |
|
| 566 |
/* klvspiff/nway_klv.c */ |
| 567 |
extern int nway_klv(struct vtx_data **graph, int nvtxs, struct bilist **lbuckets, |
| 568 |
struct bilist **rbuckets, struct bilist *llistspace, struct bilist *rlistspace, |
| 569 |
int *ldvals, int *rdvals, int *sets, int maxdval, double *goal, int max_dev, |
| 570 |
int **bndy_list, double *weightsum); |
| 571 |
|
| 572 |
/* main/interface.c */ |
| 573 |
extern int INTER_FACE(int nvtxs, int *start, int *adjacency, int *vwgts, float *ewgts, float *x, |
| 574 |
float *y, float *z, char *outassignname, char *outfilename, int *assignment, |
| 575 |
int architecture, int ndims_tot, int mesh_dims[3], double *goal, |
| 576 |
int global_method, int local_method, int rqi_flag, int vmax, int ndims, |
| 577 |
double eigtol, long seed); |
| 578 |
|
| 579 |
/* main/main.c */ |
| 580 |
extern int main(void); |
| 581 |
|
| 582 |
/* main/user_params.c */ |
| 583 |
|
| 584 |
/* misc/count.c */ |
| 585 |
extern void count(struct vtx_data **graph, int nvtxs, int *sets, int nsets, int (*hops)[MAXSETS], |
| 586 |
int dump, int using_ewgts); |
| 587 |
|
| 588 |
/* misc/countup.c */ |
| 589 |
void countup(struct vtx_data **graph, /* graph data structure */ |
| 590 |
int nvtxs, /* number of vtxs in graph */ |
| 591 |
int *assignment, /* set number of each vtx (length nvtxs+1) */ |
| 592 |
int ndims, /* number of cuts at each level */ |
| 593 |
int architecture, /* what's the target parallel machine? */ |
| 594 |
int ndims_tot, /* total number of hypercube dimensions */ |
| 595 |
int mesh_dims[3], /* extent of mesh in each dimension */ |
| 596 |
int print_lev, /* level of output */ |
| 597 |
FILE *outfile, /* output file if not NULL */ |
| 598 |
int using_ewgts /* are edge weights being used? */ |
| 599 |
); |
| 600 |
|
| 601 |
/* misc/countup_cube.c */ |
| 602 |
void countup_cube(struct vtx_data **graph, /* graph data structure */ |
| 603 |
int nvtxs, /* number of vtxs in graph */ |
| 604 |
int *assignment, /* set number of each vtx (length nvtxs+1) */ |
| 605 |
int ndims, /* number of cuts at each level */ |
| 606 |
int ndims_tot, /* total number of divisions of graph */ |
| 607 |
int print_lev, /* level of output */ |
| 608 |
FILE *outfile, /* output file if not NULL */ |
| 609 |
int using_ewgts /* are edge weights being used? */ |
| 610 |
); |
| 611 |
|
| 612 |
/* misc/countup_mesh.c */ |
| 613 |
void countup_mesh(struct vtx_data **graph, /* graph data structure */ |
| 614 |
int nvtxs, /* number of vtxs in graph */ |
| 615 |
int *assignment, /* set number of each vtx (length nvtxs+1) */ |
| 616 |
int mesh_dims[3], /* extent of mesh in each dimension */ |
| 617 |
int print_lev, /* level of output */ |
| 618 |
FILE *outfile, /* output file if not NULL */ |
| 619 |
int using_ewgts /* are edge weights being used? */ |
| 620 |
); |
| 621 |
|
| 622 |
/* misc/define_subcubes.c */ |
| 623 |
extern int define_subcubes(int nsets_real, int ndims_tot, int ndims, struct set_info *set, |
| 624 |
struct set_info *set_info, int *subsets, int inert, int *pstriping, |
| 625 |
int hop_mtx_special[MAXSETS][MAXSETS]); |
| 626 |
|
| 627 |
/* misc/define_submeshes.c */ |
| 628 |
extern int define_submeshes(int nsets, int cube_or_mesh, int *mesh_dims, struct set_info *set, |
| 629 |
struct set_info *set_info, int *subsets, int inert, int *striping, |
| 630 |
int *dir, int hop_mtx_special[MAXSETS][MAXSETS]); |
| 631 |
|
| 632 |
/* misc/divide_procs.c */ |
| 633 |
extern int divide_procs(int architecture, int ndims, int ndims_tot, struct set_info *info_set, |
| 634 |
struct set_info *divide_set, int *subsets, int inert, int *pndims_real, |
| 635 |
int *pnsets_real, int *pstriping, int *cut_dirs, int *mesh_dims, |
| 636 |
int hops_special[][MAXSETS]); |
| 637 |
|
| 638 |
/* misc/find_maxdeg.c */ |
| 639 |
extern double find_maxdeg(struct vtx_data **graph, int nvtxs, int using_ewgts, float *pmax_ewgt); |
| 640 |
|
| 641 |
/* misc/make_maps.c */ |
| 642 |
extern int make_maps(int *setlists, int *list_ptrs, int set, int *glob2loc, int *loc2glob); |
| 643 |
extern void make_maps2(int *assignment, int nvtxs, int set, int *glob2loc, int *loc2glob); |
| 644 |
|
| 645 |
/* misc/make_setlists.c */ |
| 646 |
extern void make_setlists(int *setlists, int *list_ptrs, int nsets, int *subsets, int *subassign, |
| 647 |
int *loc2glob, int subnvtxs, int first); |
| 648 |
|
| 649 |
/* misc/make_subgoal.c */ |
| 650 |
extern void make_subgoal(double *goal, double *subgoal, int nsets, int cube_or_mesh, int nsets_tot, |
| 651 |
int mesh_dims[3], int set, double sub_vwgt_sum); |
| 652 |
|
| 653 |
/* misc/make_term_props.c */ |
| 654 |
extern void make_term_props(struct vtx_data **graph, int sub_nvtxs, int *loc2glob, int *assignment, |
| 655 |
int architecture, int ndims_tot, int ndims, struct set_info *set_info, |
| 656 |
int setnum, int nsets, int set_max, int *subsets, float *term_wgts[], |
| 657 |
int using_ewgts); |
| 658 |
|
| 659 |
/* misc/merge_goals.c */ |
| 660 |
extern void merge_goals(double *goal, double *merged_goal, struct set_info *set_info, int *subsets, |
| 661 |
int nsets, int ndims_tot, int cube_or_mesh, int mesh_dims[3], |
| 662 |
double vwgt_sum); |
| 663 |
|
| 664 |
/* misc/perturb.c */ |
| 665 |
extern void perturb_init(int n); |
| 666 |
extern void perturb_clear(void); |
| 667 |
extern void perturb(double *result, double *vec); |
| 668 |
extern void perturb_float(float *result, float *vec); |
| 669 |
|
| 670 |
/* misc/sequence.c */ |
| 671 |
extern void sequence(struct vtx_data **graph, int nvtxs, int nedges, int using_ewgts, |
| 672 |
double *vwsqrt, int solver_flag, int rqi_flag, int vmax, double eigtol); |
| 673 |
|
| 674 |
/* misc/simple_part.c */ |
| 675 |
extern void simple_part(struct vtx_data **graph, int nvtxs, int *sets, int nsets, int simple_type, |
| 676 |
double *goal); |
| 677 |
|
| 678 |
/* misc/time_kernels.c */ |
| 679 |
extern void time_kernels(struct vtx_data **A, int n, double *vwsqrt); |
| 680 |
|
| 681 |
/* misc/timing.c */ |
| 682 |
extern void clear_timing(void); |
| 683 |
extern void time_out(FILE *outfile); |
| 684 |
|
| 685 |
/* optimize/determinant.c */ |
| 686 |
extern double determinant(double M[3][3], int ndims); |
| 687 |
|
| 688 |
/* optimize/func2d.c */ |
| 689 |
extern double func2d(double coeffs[5], double theta); |
| 690 |
extern double grad2d(double coeffs[5], double theta); |
| 691 |
extern double hess2d(double coeffs[5]); |
| 692 |
|
| 693 |
/* optimize/func3d.c */ |
| 694 |
extern double func3d(double coeffs[15], double theta, double phi, double gamma2); |
| 695 |
extern void grad3d(double coeffs[15], double grad[3], double theta, double phi, double gamma2); |
| 696 |
extern void hess3d(double coeffs[15], double hess[3][3]); |
| 697 |
extern double constraint(double *coeffs2); |
| 698 |
extern void gradcon(double *coeffs2, double grad[3]); |
| 699 |
extern void hesscon(double *coeffs2, double hess[3][3]); |
| 700 |
|
| 701 |
/* optimize/opt2d.c */ |
| 702 |
extern double opt2d(struct vtx_data **graph, double **yvecs, int nvtxs, int nmyvtxs); |
| 703 |
|
| 704 |
/* optimize/opt3d.c */ |
| 705 |
extern void opt3d(struct vtx_data **graph, double **yvecs, int nvtxs, int nmyvtxs, double *vwsqrt, |
| 706 |
double *ptheta, double *pphi, double *pgamma, int using_vwgts); |
| 707 |
|
| 708 |
/* refine_map/compute_cube_edata.c */ |
| 709 |
extern double compute_cube_edata(struct refine_edata *edata, struct refine_vdata *vdata, |
| 710 |
int nsets_tot, struct vtx_data **comm_graph, int *node2vtx); |
| 711 |
|
| 712 |
/* refine_map/compute_cube_vdata.c */ |
| 713 |
extern void compute_cube_vdata(struct refine_vdata *vdata, struct vtx_data **comm_graph, int vtx, |
| 714 |
int mask, int *vtx2node); |
| 715 |
|
| 716 |
/* refine_map/compute_mesh_edata.c */ |
| 717 |
extern double compute_mesh_edata(struct refine_edata *edata, struct refine_vdata *vdata, |
| 718 |
int mesh_dims[3], struct vtx_data **comm_graph, int *node2vtx); |
| 719 |
|
| 720 |
/* refine_map/compute_mesh_vdata.c */ |
| 721 |
extern void compute_mesh_vdata(struct refine_vdata *vdata, struct vtx_data **comm_graph, int vtx, |
| 722 |
int *vtx2node, int mesh_dims[3], int dim); |
| 723 |
|
| 724 |
/* refine_map/find_edge_cube.c */ |
| 725 |
extern struct refine_edata *find_edge_cube(int node, int dim, struct refine_edata *edata, |
| 726 |
int nsets_tot); |
| 727 |
|
| 728 |
/* refine_map/find_edge_mesh.c */ |
| 729 |
extern struct refine_edata *find_edge_mesh(int vertex, int dim, struct refine_edata *edata, |
| 730 |
int *mesh_dims, int *vtx2node); |
| 731 |
|
| 732 |
/* refine_map/init_cube_edata.c */ |
| 733 |
extern void init_cube_edata(struct refine_edata *edata, int node1, int dim, int mask); |
| 734 |
|
| 735 |
/* refine_map/init_mesh_edata.c */ |
| 736 |
extern void init_mesh_edata(struct refine_edata *edata, int mesh_dims[3]); |
| 737 |
|
| 738 |
/* refine_map/make_comm_graph.c */ |
| 739 |
extern int make_comm_graph(struct vtx_data ***pcomm_graph, struct vtx_data **graph, int nvtxs, |
| 740 |
int using_ewgts, int *assign, int nsets_tot); |
| 741 |
|
| 742 |
/* refine_map/refine_cube.c */ |
| 743 |
extern int refine_cube(struct vtx_data **comm_graph, int ndims_tot, double maxdesire, int *vtx2node, |
| 744 |
int *node2vtx); |
| 745 |
|
| 746 |
/* refine_map/refine_map.c */ |
| 747 |
extern void refine_map(struct vtx_data **graph, int nvtxs, int using_ewgts, int *assign, |
| 748 |
int cube_or_mesh, int ndims_tot, int mesh_dims[3]); |
| 749 |
|
| 750 |
/* refine_map/refine_mesh.c */ |
| 751 |
extern int refine_mesh(struct vtx_data **comm_graph, int cube_or_mesh, int mesh_dims[3], |
| 752 |
double maxdesire, int *vtx2node, int *node2vtx); |
| 753 |
|
| 754 |
/* refine_map/update_cube_edata.c */ |
| 755 |
extern void update_cube_edata(int vertex, int dim, struct refine_edata *edata, |
| 756 |
struct refine_vdata *vdata, struct vtx_data **comm_graph, |
| 757 |
int *node2vtx, int *vtx2node, int nsets_tot, double *best_desire, |
| 758 |
int imax, struct refine_edata **desire_ptr); |
| 759 |
|
| 760 |
/* refine_map/update_cube_vdata.c */ |
| 761 |
extern void update_cube_vdata(int old_side, int mask, int neighbor_node, double ewgt, |
| 762 |
struct refine_vdata *vdata); |
| 763 |
|
| 764 |
/* refine_map/update_mesh_edata.c */ |
| 765 |
extern void update_mesh_edata(int vertex, int dim, struct refine_edata *edata, |
| 766 |
struct refine_vdata *vdata, struct vtx_data **comm_graph, |
| 767 |
int mesh_dims[3], int *node2vtx, int *vtx2node, double *best_desire, |
| 768 |
int imax, struct refine_edata **desire_ptr); |
| 769 |
|
| 770 |
/* refine_map/update_mesh_vdata.c */ |
| 771 |
extern void update_mesh_vdata(int old_loc, int new_loc, int dim, double ewgt, |
| 772 |
struct refine_vdata *vdata, int mesh_dims[3], int neighbor, |
| 773 |
int *vtx2node); |
| 774 |
|
| 775 |
/* refine_part/kl_refine.c */ |
| 776 |
extern int kl_refine(struct vtx_data **graph, struct vtx_data **subgraph, struct bilist *set_list, |
| 777 |
struct bilist *vtx_elems, int *new_assign, int set1, int set2, int *glob2loc, |
| 778 |
int *loc2glob, int *sub_assign, int *old_sub_assign, int *degrees, |
| 779 |
int using_ewgts, int (*hops)[MAXSETS], double *goal, int *sizes, |
| 780 |
float *term_wgts[], int architecture, int mesh_dims[3]); |
| 781 |
|
| 782 |
/* refine_part/make_maps_ref.c */ |
| 783 |
extern void make_maps_ref(struct vtx_data **graph, struct bilist *set_list, |
| 784 |
struct bilist *vtx_elems, int *assignment, int *sub_assign, int set1, |
| 785 |
int set2, int *glob2loc, int *loc2glob, int *psub_nvtxs, int *pvwgt_max, |
| 786 |
int *pvwgt_sum1, int *pvwgt_sum2); |
| 787 |
|
| 788 |
/* refine_part/make_terms_ref.c */ |
| 789 |
extern void make_terms_ref(struct vtx_data **graph, int using_ewgts, int subnvtxs, int *loc2glob, |
| 790 |
int set0, int set1, int *assignment, int architecture, int mesh_dims[3], |
| 791 |
float *term_wgts[]); |
| 792 |
|
| 793 |
/* refine_part/refine_part.c */ |
| 794 |
extern int refine_part(struct vtx_data **graph, int nvtxs, int using_ewgts, int *assign, |
| 795 |
int architecture, int ndims_tot, int mesh_dims[3], double *goal); |
| 796 |
|
| 797 |
/* submain/balance.c */ |
| 798 |
extern void balance(struct vtx_data **graph, int nvtxs, int nedges, int using_vwgts, |
| 799 |
int using_ewgts, double *vwsqrt, int igeom, float **coords, int *assignment, |
| 800 |
double *goal, int architecture, int ndims_tot, int *mesh_dims, |
| 801 |
int global_method, int local_method, int rqi_flag, int vmax, int ndims, |
| 802 |
double eigtol, int (*hops)[MAXSETS]); |
| 803 |
|
| 804 |
/* submain/divide.c */ |
| 805 |
extern void chaco_divide(struct vtx_data **graph, int nvtxs, int nedges, int using_vwgts, |
| 806 |
int using_ewgts, double *vwsqrt, int igeom, float **coords, |
| 807 |
int *assignment, double *goal, int architecture, float *term_wgts[], |
| 808 |
int global_method, int local_method, int rqi_flag, int vmax, int ndims, |
| 809 |
double eigtol, int (*hop_mtx)[MAXSETS], int nsets, int striping); |
| 810 |
|
| 811 |
/* submain/submain.c */ |
| 812 |
extern int submain(struct vtx_data **graph, int nvtxs, int nedges, int using_vwgts, int using_ewgts, |
| 813 |
int igeom, float **coords, char *outassignname, char *outfilename, |
| 814 |
int *assignment, double *goal, int architecture, int ndims_tot, int mesh_dims[3], |
| 815 |
int global_method, int local_method, int rqi_flag, int vmax, int ndims, |
| 816 |
double eigtol, long seed); |
| 817 |
|
| 818 |
/* symmlq/aprod.c */ |
| 819 |
extern int aprod(long *lnvtxs, double *x, double *y, double *dA, double *vwsqrt, double *work, |
| 820 |
double *dorthlist); |
| 821 |
|
| 822 |
/* symmlq/msolve.c */ |
| 823 |
extern int msolve(long int *nvtxs, double *x, double *y); |
| 824 |
|
| 825 |
/* symmlq/symmlq.c */ |
| 826 |
extern int symmlq(long int *n, double *b, double *r1, double *r2, double *v, double *w, double *x, |
| 827 |
double *y, double *work, long int *checka, long int *goodb, long int *precon, |
| 828 |
double *shift, long int *nout, long int *itnlim, double *rtol, long int *istop, |
| 829 |
long int *itn, double *anorm, double *acond, double *rnorm, double *ynorm, |
| 830 |
double *a, double *vwsqrt, double *orthlist, double *macheps, double *normxlim, |
| 831 |
long int *itnmin); |
| 832 |
|
| 833 |
/* symmlq/symmlqblas.c */ |
| 834 |
extern int chdaxpy(long int *n, double *da, double *dx, long int *incx, double *dy, long int *incy); |
| 835 |
extern int chdcopy(long int *n, double *dx, long int *incx, double *dy, long int *incy); |
| 836 |
extern double ch_ddot(long int *n, double *dx, long int *incx, double *dy, long int *incy); |
| 837 |
extern double chdnrm2(long int *n, double *dx, long int *incx); |
| 838 |
|
| 839 |
/* tinvit/tinvit.c */ |
| 840 |
extern int tinvit(long int *nm, long int *n, double *d, double *e, double *e2, long int *m, |
| 841 |
double *w, long int *ind, double *z, long int *ierr, double *rv1, double *rv2, |
| 842 |
double *rv3, double *rv4, double *rv6); |
| 843 |
|
| 844 |
/* util/affirm.c */ |
| 845 |
extern int affirm(char *prompt); |
| 846 |
|
| 847 |
/* util/array_alloc_2D.c */ |
| 848 |
extern void *array_alloc_2D_ret(size_t dim1, size_t dim2, size_t size); |
| 849 |
|
| 850 |
/* util/bail.c */ |
| 851 |
extern void bail(char *msg, int status); |
| 852 |
|
| 853 |
/* util/bit_reverse.c */ |
| 854 |
extern int bit_reverse(int val, int nbits); |
| 855 |
|
| 856 |
/* util/checkpnt.c */ |
| 857 |
extern void checkpnt(char *tag); |
| 858 |
|
| 859 |
/* util/cpvec.c */ |
| 860 |
extern void cpvec(double *copy, int beg, int end, double *vec); |
| 861 |
extern void float_to_double(double *copy, int beg, int end, float *vec); |
| 862 |
extern void double_to_float(float *copy, int beg, int end, double *vec); |
| 863 |
|
| 864 |
/* util/dot.c */ |
| 865 |
extern double dot(double *vec1, int beg, int end, double *vec2); |
| 866 |
extern double dot_float(float *vec1, int beg, int end, float *vec2); |
| 867 |
|
| 868 |
/* util/doubleout.c */ |
| 869 |
extern void doubleout(double number, int mode); |
| 870 |
extern void doubleout_file(FILE *outfile, double number, int mode); |
| 871 |
|
| 872 |
/* util/gray.c */ |
| 873 |
extern int gray(int i); |
| 874 |
|
| 875 |
/* util/input_int.c */ |
| 876 |
extern int input_int(void); |
| 877 |
|
| 878 |
/* util/machine_params.c */ |
| 879 |
extern void machine_params(double *double_epsilon, double *double_max); |
| 880 |
|
| 881 |
/* util/makevwsqrt.c */ |
| 882 |
extern void makevwsqrt(double *vwsqrt, struct vtx_data **graph, int nvtxs); |
| 883 |
extern void make_subvector(double *vec, double *subvec, int subnvtxs, int *loc2glob); |
| 884 |
|
| 885 |
/* util/mergesort.c */ |
| 886 |
extern void ch_mergesort(double *vals, int nvals, int *indices, int *space); |
| 887 |
|
| 888 |
/* util/mkvec.c */ |
| 889 |
extern double *mkvec(int nl, int nh); |
| 890 |
extern double *mkvec_ret(int nl, int nh); |
| 891 |
extern void frvec(double *v, int nl); |
| 892 |
extern float *mkvec_float(int nl, int nh); |
| 893 |
extern float *mkvec_ret_float(int nl, int nh); |
| 894 |
extern void frvec_float(float *v, int nl); |
| 895 |
|
| 896 |
/* util/norm.c */ |
| 897 |
extern double ch_norm(double *vec, int beg, int end); |
| 898 |
extern double norm_float(float *vec, int beg, int end); |
| 899 |
|
| 900 |
/* util/normalize.c */ |
| 901 |
extern double ch_normalize(double *vec, int beg, int end); |
| 902 |
extern double sign_normalize(double *vec, int beg, int end, int k); |
| 903 |
extern double normalize_float(float *vec, int beg, int end); |
| 904 |
|
| 905 |
/* util/random.c */ |
| 906 |
extern long init_rand_port(long seed); |
| 907 |
extern long get_init_rand_port(void); |
| 908 |
extern long genr_rand_port(long init_rand); |
| 909 |
extern long rand_port(void); |
| 910 |
extern double rand_rect_port(void); |
| 911 |
extern int main(void); |
| 912 |
|
| 913 |
/* util/randomize.c */ |
| 914 |
extern void randomize(int *array, int n); |
| 915 |
extern double drandom(void); |
| 916 |
extern void setrandom(long int seed); |
| 917 |
|
| 918 |
/* util/scadd.c */ |
| 919 |
extern void scadd(double *vec1, int beg, int end, double fac, double *vec2); |
| 920 |
extern void scadd_float(float *vec1, int beg, int end, float fac, float *vec2); |
| 921 |
extern void scadd_mixed(double *vec1, int beg, int end, double fac, float *vec2); |
| 922 |
|
| 923 |
/* util/seconds.c */ |
| 924 |
extern double seconds(void); |
| 925 |
|
| 926 |
/* util/setvec.c */ |
| 927 |
extern void setvec(double *vec, int beg, int end, double setval); |
| 928 |
extern void setvec_float(float *vec, int beg, int end, float setval); |
| 929 |
|
| 930 |
/* util/shell_sort.c */ |
| 931 |
extern void sort_double(int count, double ra[]); |
| 932 |
extern void shell_sort(int n, double *arr); |
| 933 |
|
| 934 |
/* util/smalloc.c */ |
| 935 |
extern void *smalloc(size_t n); |
| 936 |
extern void *smalloc_ret(size_t n); |
| 937 |
extern void *srealloc(void *ptr, size_t n); |
| 938 |
extern void *srealloc_ret(void *ptr, size_t n); |
| 939 |
extern void sfree(void *ptr); |
| 940 |
extern void smalloc_stats(void); |
| 941 |
extern int smalloc_num(void); |
| 942 |
|
| 943 |
/* util/strout.c */ |
| 944 |
extern void strout(char *msg); |
| 945 |
|
| 946 |
/* util/tri_prod.c */ |
| 947 |
extern double tri_prod(double *v1, double *v2, double *v3, double *wsqrt, int n); |
| 948 |
|
| 949 |
/* util/true_or_false.c */ |
| 950 |
extern char *true_or_false(int flag); |
| 951 |
|
| 952 |
/* util/update.c */ |
| 953 |
extern void update(double *vec1, int beg, int end, double *vec2, double fac, double *vec3); |
| 954 |
extern void update_float(float *vec1, int beg, int end, float *vec2, float fac, float *vec3); |
| 955 |
|
| 956 |
/* util/vecout.c */ |
| 957 |
extern void vecout(double *vec, int beg, int end, char *tag, char *file_name); |
| 958 |
extern void vecnorm(double *vec, int beg, int end); |
| 959 |
|
| 960 |
/* util/vecran.c */ |
| 961 |
extern void vecran(double *vec, int beg, int end); |
| 962 |
extern void vecran_float(float *vec, int beg, int end); |
| 963 |
|
| 964 |
/* util/vecscale.c */ |
| 965 |
extern void vecscale(double *vec1, int beg, int end, double alpha, double *vec2); |
| 966 |
extern void vecscale_float(float *vec1, int beg, int end, float alpha, float *vec2); |
| 967 |
|
| 968 |
#ifdef __cplusplus |
| 969 |
} /* closing bracket for extern "C" */ |
| 970 |
#endif |