As may be apparent, many packs are followed almost immediately by sends, while corresponding receives are followed closely by unpacks. Not only is this notationally somewhat tedious, but it also limits the optimizations that can be done by Zipcode. To create a more flexible system, Zipcode provides the capability to do both the pack and communications in a single call. For instance,
g3_pack_send(ZIP_MAILER *g3mailer, int d1, d2, d3, Zip_Invoice *invoice)takes care of creating the letter, packing the invoice, and sending it to grid location specified by {d1,d2,d3}. Whenever possible, use pack_send-style routines, as they will generally be more run time optimizable than pack calls followed by send calls.
Packed versions of collective operations are also provided. Here is the specific syntax for the G2, two-dimensional-grid pack combine:
int g2_pack_combine(ZIP_MAILER *g2mlr, Zip_Invoice *invoice, void (*func()) )