ToolsMAM.h 735 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef ToolsMAM

#define ToolsMAM 1

#include "SparseProduct.h"
#include <mpi.h>
#include "../malleability/MAM.h"

typedef struct {
  int n, initiated;
  SparseMatrix other_subm;
  int *recv_vlen;
  int *array_vptr, *array_vlen, *array_vpos;
  double *array_vval;
  MPI_Comm comm;
  MPI_Request reqs[2];
} user_redist_t;

static const user_redist_t empty_user_data = {
  .n = 0,
  .initiated = 0,
  .recv_vlen  = NULL,
  .array_vptr = NULL,
  .array_vlen = NULL,
  .array_vpos = NULL,
  .array_vval = NULL,
  .comm = MPI_COMM_NULL,
};

extern void targets_distribution(mam_user_reconf_t user_reconf, user_redist_t *user_data);
//extern void targets_distribution_synch(mam_user_reconf_t user_reconf, user_redist_t *user_data);

#endif