Exemplo n.º 1
0
/* only the coordinates part is transmitted */
void pt_visit_fw_pack (gpointer pt, VsgPackedMsg *pm,
                       gpointer user_data)
{
  vsg_packed_msg_send_append (pm, &((Pt *) pt)->vector, 1,
                              VSG_MPI_TYPE_VECTOR2D);
  vsg_packed_msg_send_append (pm, &((Pt *) pt)->weight, 1, MPI_INT);
}
Exemplo n.º 2
0
/* migration pack/unpack functions */
void pt_migrate_pack (Pt *pt, VsgPackedMsg *pm,
                      gpointer user_data)
{
  vsg_packed_msg_send_append (pm, &pt->vector, 1, VSG_MPI_TYPE_VECTOR2D);
  vsg_packed_msg_send_append (pm, &pt->weight, 1, MPI_INT);
  vsg_packed_msg_send_append (pm, &pt->count, 1, MPI_LONG);
}
/* migration pack/unpack functions */
void point_accum_migrate_pack (PointAccum *pt, VsgPackedMsg *pm,
                               gpointer user_data)
{
  vsg_packed_msg_send_append (pm, &pt->vector, 1, VSG_MPI_TYPE_VECTOR3D);
  vsg_packed_msg_send_append (pm, &pt->density, 1, MPI_DOUBLE);
  vsg_packed_msg_send_append (pm, &pt->field, 1, VSG_MPI_TYPE_VECTOR3D);
  vsg_packed_msg_send_append (pm, &pt->id, 1, MPI_INT);
}
Exemplo n.º 4
0
static void rg_migrate_pack (Sphere *rg, VsgPackedMsg *pm,
                             gpointer user_data)
{
/*   g_printerr ("%d: pack sphere {c=", rk); */
/*   vsg_vector3d_write (&rg->center, stderr); */
/*   g_printerr (" r=%lf}\n", rg->radius); */

  vsg_packed_msg_send_append (pm, &rg->center, 1, VSG_MPI_TYPE_VECTOR3D);
  vsg_packed_msg_send_append (pm, &rg->radius, 1, MPI_DOUBLE);
}
Exemplo n.º 5
0
/* only the coordinates part is transmitted */
void nc_visit_fw_pack (NodeCounter *nc, VsgPackedMsg *pm,
                       gpointer user_data)
{
  vsg_packed_msg_send_append (pm, &nc->in_count, 1, MPI_LONG);

  if (nc_padding != 0)
    vsg_packed_msg_send_append (pm, _nc_padding_buffer, nc_padding, MPI_CHAR);

  _fw_count ++;
}
Exemplo n.º 6
0
/* only the count part is transmitted */
void nc_visit_bw_pack (NodeCounter *nc, VsgPackedMsg *pm,
                       gpointer user_data)

{
/*   g_printerr ("%d : pack out %d\n", rk, nc->out_count); */
  vsg_packed_msg_send_append (pm, &nc->out_count, 1, MPI_LONG);

  if (nc_padding != 0)
    vsg_packed_msg_send_append (pm, _nc_padding_buffer, nc_padding, MPI_CHAR);

  _bw_count ++;
}
/* only the coordinates part is transmitted */
void point_accum_visit_fw_pack (PointAccum *pt, VsgPackedMsg *pm,
                                gpointer user_data)
{
/*   g_printerr ("%d : fw pack d=%e v=", */
/*               rk, */
/*               pt->density); */
/*   vsg_vector3d_write (&pt->vector, stderr); */
/*   g_printerr ("\n"); */

  vsg_packed_msg_send_append (pm, &pt->vector, 1, VSG_MPI_TYPE_VECTOR3D);
  vsg_packed_msg_send_append (pm, &pt->density, 1, MPI_DOUBLE);
}
Exemplo n.º 8
0
static void pt_migrate_pack (VsgVector3d *pt, VsgPackedMsg *pm,
                             gpointer user_data)
{
/*   g_printerr ("%d: pack ", rk); */
/*   vsg_vector3d_write (pt, stderr); */
/*   g_printerr ("\n"); */
  vsg_packed_msg_send_append (pm, pt, 1, VSG_MPI_TYPE_VECTOR3D);
}
Exemplo n.º 9
0
/* only the count part is transmitted */
void nc_visit_bw_pack (gpointer nc, VsgPackedMsg *pm,
                       gpointer user_data)

{
/*   g_printerr ("%d : pack out %d\n", rk, nc->out_count); */
  vsg_packed_msg_send_append (pm, &((NodeCounter *) nc)->out_count, 1,
                              MPI_LONG);
}
Exemplo n.º 10
0
/* only the accum part is transmitted */
void point_accum_visit_bw_pack (PointAccum *pt, VsgPackedMsg *pm,
                                gpointer user_data)
{
  /* g_printerr ("%d : bw pack %lu\n",rk, pt->id); */

  vsg_packed_msg_send_append (pm, &pt->field, 1, VSG_MPI_TYPE_VECTOR3D);

}
Exemplo n.º 11
0
/* only the accum part is transmitted */
void point_accum_visit_bw_pack (PointAccum *pt, VsgPackedMsg *pm,
                                gpointer user_data)
{
  vsg_packed_msg_send_append (pm, &pt->accum, 1, ARAN_MPI_TYPE_GCOMPLEX128);

/*   g_printerr ("%d : bw pack accum=(%e,%e)\n", */
/*               rk, */
/*               creal (pt->accum), cimag (pt->accum)); */
}
/* only the accum part is transmitted */
void point_accum_visit_bw_pack (PointAccum *pt, VsgPackedMsg *pm,
                                gpointer user_data)
{
/*   g_printerr ("%d : bw pack v=",rk); */
/*   vsg_vector3d_write (&pt->field, stderr); */
/*   g_printerr ("\n"); */
/*   fflush (stderr); */

  vsg_packed_msg_send_append (pm, &pt->field, 1, VSG_MPI_TYPE_VECTOR3D);

}
Exemplo n.º 13
0
/* migration pack/unpack functions */
void nc_migrate_pack (NodeCounter *nc, VsgPackedMsg *pm,
                      gpointer user_data)
{
  vsg_packed_msg_send_append (pm, nc, 2, MPI_LONG);
}
Exemplo n.º 14
0
/* only the count part is transmitted */
void pt_visit_bw_pack (Pt *pt, VsgPackedMsg *pm,
                       gpointer user_data)
{
  vsg_packed_msg_send_append (pm, &pt->count, 1, MPI_LONG);
}
Exemplo n.º 15
0
/* only the coordinates part is transmitted */
void nc_visit_fw_pack (gpointer nc, VsgPackedMsg *pm,
                       gpointer user_data)
{
  vsg_packed_msg_send_append (pm, &((NodeCounter *) nc)->in_count, 1, MPI_LONG);
}