#include "autopack.h" void AP_send(void *buf)
Send a message previously allocated with AP_alloc(). After sending the message, the user may no longer access buf.
Parameter values packed, nwait, and nwait_proc (see AP_setparam()) will affect when the send actually takes place. If packing is enabled, the message will not be sent until a full package has been accumulated or the user calls AP_flush(). The send may be also be deferred depending on the current number of sends posted to MPI, and the value of nwait_proc and nwait (see AP_setparam()).
In order for the library to free memory associated with the sends, and to process deferred messages, the user should call AP_check_sends() periodically until the return value indicates no messages are deferred. Calls to AP_recv() will also expedite deferred messages.
At present, all messages are sent using type MPI_BYTE.