source: CIVL/examples/mpi-omp/AMG2013/utilities/exchange_data.h

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[2aa6644]1/*BHEADER**********************************************************************
2 * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
3 * Produced at the Lawrence Livermore National Laboratory.
4 * This file is part of HYPRE. See file COPYRIGHT for details.
5 *
6 * HYPRE is free software; you can redistribute it and/or modify it under the
7 * terms of the GNU Lesser General Public License (as published by the Free
8 * Software Foundation) version 2.1 dated February 1999.
9 *
10 * $Revision: 2.4 $
11 ***********************************************************************EHEADER*/
12
13#ifndef hypre_EXCHANGE_DATA_HEADER
14#define hypre_EXCHANGE_DATA_HEADER
15
16#define hypre_BinaryTreeParentId(tree) (tree->parent_id)
17#define hypre_BinaryTreeNumChild(tree) (tree->num_child)
18#define hypre_BinaryTreeChildIds(tree) (tree->child_id)
19#define hypre_BinaryTreeChildId(tree, i) (tree->child_id[i])
20
21
22typedef struct
23{
24 int parent_id;
25 int num_child;
26 int *child_id;
27} hypre_BinaryTree;
28
29
30
31/* In the fill_response() function the user needs to set the recv__buf
32 and the response_message_size. Memory of size send_response_storage has been
33 alllocated for the send_buf (in exchange_data) - if more is needed, then
34 realloc and adjust
35 the send_response_storage. The realloc amount should be storage+overhead.
36 If the response is an empty "confirmation" message, then set
37 response_message_size =0 (and do not modify the send_buf) */
38
39
40typedef struct
41{
42 int (*fill_response)(void* recv_buf, int contact_size,
43 int contact_proc, void* response_obj,
44 MPI_Comm comm, void** response_buf,
45 int* response_message_size);
46 int send_response_overhead; /*set by exchange data */
47 int send_response_storage; /*storage allocated for send_response_buf*/
48 void *data1; /*data fields user may want to access in fill_response */
49 void *data2;
50
51} hypre_DataExchangeResponse;
52
53
54int hypre_CreateBinaryTree(int, int, hypre_BinaryTree*);
55int hypre_DestroyBinaryTree(hypre_BinaryTree*);
56
57
58int hypre_DataExchangeList(int num_contacts,
59 int *contact_proc_list, void *contact_send_buf,
60 int *contact_send_buf_starts, int contact_obj_size,
61 int response_obj_size,
62 hypre_DataExchangeResponse *response_obj, int max_response_size,
63 int rnum, MPI_Comm comm, void **p_response_recv_buf,
64 int **p_response_recv_buf_starts);
65
66
67#endif /* end of header */
Note: See TracBrowser for help on using the repository browser.