Esempio n. 1
0
static void MPIPackFun(c4snet_data_t *data, mpi_buf_t *buf)
{
  int vtype = data->vtype,
      type = data->type;

  MPIPack(buf, &vtype, MPI_INT, 1);
  MPIPack(buf, &data->size, MPI_INT, 1);
  MPIPack(buf, &type, MPI_INT, 1);

  if (data->vtype == VTYPE_array) {
    MPIPack(buf, data->data.ptr, TypeToMPIType(data->type), data->size);
  } else {
    MPIPack(buf, &data->data, TypeToMPIType(data->type), 1);
  }
}
Esempio n. 2
0
void SNetDistribPack(void *src, ...)
{
  va_list args;
  mpi_buf_t *buf;
  MPI_Datatype type;
  int count;

  va_start(args, src);
  buf = va_arg(args, mpi_buf_t *);
  type = va_arg(args, MPI_Datatype);
  count = va_arg(args, int);
  va_end(args);

  MPIPack(buf, src, type, count);
}
Esempio n. 3
0
inline static void PackByte(void *buf, int count, char *src)
{ MPIPack(buf, src, MPI_BYTE, count); }
Esempio n. 4
0
inline static void PackInt(void *buf, int count, int *src)
{ MPIPack(buf, src, MPI_INT, count); }
Esempio n. 5
0
void SNetPackVoid(void *buf, int count, void **src)
{ MPIPack(buf, src, MPI_VOID_POINTER, count); }
Esempio n. 6
0
void SNetPackLong(void *buf, int count, long *src)
{ MPIPack(buf, src, MPI_LONG, count); }
Esempio n. 7
0
void SNetPackByte(void *buf, int count, char *src)
{ MPIPack(buf, src, MPI_BYTE, count); }
Esempio n. 8
0
void SNetPackInt(void *buf, int count, int *src)
{ MPIPack(buf, src, MPI_INT, count); }