1
/* Copyright 2007 ENSEIRB, INRIA & CNRS
3
** This file is part of the Scotch software package for static mapping,
4
** graph partitioning and sparse matrix ordering.
6
** This software is governed by the CeCILL-C license under French law
7
** and abiding by the rules of distribution of free software. You can
8
** use, modify and/or redistribute the software under the terms of the
9
** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
10
** URL: "http://www.cecill.info".
12
** As a counterpart to the access to the source code and rights to copy,
13
** modify and redistribute granted by the license, users are provided
14
** only with a limited warranty and the software's author, the holder of
15
** the economic rights, and the successive licensors have only limited
18
** In this respect, the user's attention is drawn to the risks associated
19
** with loading, using, modifying and/or developing or reproducing the
20
** software by the user in light of its specific status of free software,
21
** that may mean that it is complicated to manipulate, and that also
22
** therefore means that it is reserved for developers and experienced
23
** professionals having in-depth computer knowledge. Users are therefore
24
** encouraged to load and test the software's suitability as regards
25
** their requirements in conditions enabling the security of their
26
** systems and/or data to be ensured and, more generally, to use and
27
** operate it in the same conditions as regards security.
29
** The fact that you are presently reading this means that you have had
30
** knowledge of the CeCILL-C license and that you accept its terms.
32
/**********************************************************/
34
/* NAME : dgraph_halo_fill.c */
36
/* AUTHOR : Francois PELLEGRINI */
38
/* FUNCTION : Part of a parallel static mapper. */
39
/* This module contains the halo update */
42
/* # Version 5.0 : from : 31 dec 2006 */
45
/**********************************************************/
47
/* This function fills the send array used by
48
** all of the halo routines.
50
** - void : in all cases.
56
const Dgraph * restrict const grafptr,
57
const byte * restrict const attrgsttab, /* Attribute array to diffuse */
58
int attrglbsiz, /* Type extent of attribute */
59
byte * restrict const attrsndtab, /* Array for packing data to send */
60
int * restrict const senddsptab, /* Temporary displacement array */
61
const int * restrict const sendcnttab) /* Count array */
64
const int * restrict procsidtab;
67
procsidtab = grafptr->procsidtab;
68
for (procsidnum = 0, vertlocnum = 0; /* vertlocnum starts from 0 because attrgsttab pointer is not based */
69
procsidnum < grafptr->procsidnbr; procsidnum ++) {
72
procsidval = procsidtab[procsidnum];
74
vertlocnum -= (Gnum) procsidval;
76
DGRAPHHALOFILLCOPY (attrsndtab + attrglbsiz * senddsptab[procsidval],
77
attrgsttab + attrglbsiz * vertlocnum, attrglbsiz);
78
senddsptab[procsidval] ++; /* Skip to next position in send buffer */