Exemplo n.º 1
0
static c4snet_data_t *MPIUnpackFun(void *buf)
{
  void *tmp;
  c4snet_data_t *result;
  int vtype, type, count;

  MPIUnpack(buf, &vtype, MPI_INT, 1);
  MPIUnpack(buf, &count, MPI_INT, 1);
  MPIUnpack(buf, &type, MPI_INT, 1);

  if (vtype == VTYPE_array) {
    result = C4SNetAlloc(type, count, &tmp);
    MPIUnpack(buf, tmp, TypeToMPIType(type), count);
  } else {
    result = C4SNetAlloc(type, 1, &tmp);
    MPIUnpack(buf, tmp, TypeToMPIType(type), 1);
  }

  return result;
}
Exemplo n.º 2
0
void SNetDistribUnpack(void *dst, ...)
{
  va_list args;
  mpi_buf_t *buf;
  MPI_Datatype type;
  int count;

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

  MPIUnpack(buf, dst, type, count);
}
Exemplo n.º 3
0
inline static void UnpackByte(void *buf, int count, char *dst)
{ MPIUnpack(buf, dst, MPI_BYTE, count); }
Exemplo n.º 4
0
inline static void UnpackInt(void *buf, int count, int *dst)
{ MPIUnpack(buf, dst, MPI_INT, count); }
Exemplo n.º 5
0
void SNetUnpackVoid(void *buf, int count, void **dst)
{ MPIUnpack(buf, dst, MPI_VOID_POINTER, count); }
Exemplo n.º 6
0
void SNetUnpackLong(void *buf, int count, long *dst)
{ MPIUnpack(buf, dst, MPI_LONG, count); }
Exemplo n.º 7
0
void SNetUnpackByte(void *buf, int count, char *dst)
{ MPIUnpack(buf, dst, MPI_BYTE, count); }
Exemplo n.º 8
0
void SNetUnpackInt(void *buf, int count, int *dst)
{ MPIUnpack(buf, dst, MPI_INT, count); }