.PVM.initsend {rpvm}R Documentation

Initialize send buffer

Description

Clears default send buffer and specifies message sending.

Usage

.PVM.initsend (encoding = c("Default", "Raw", "InPlace")
.PVM.encoding

Arguments

encoding a character string specifying the next message's encoding scheme. Must be one of "Default" (default), "Raw" or "InPlace".

Details

This function clears the send buffer and prepares it for packing a new message.

Possible encoding themes are "Default" (default), "Raw" or "InPlace". If the user knows that the next message will be sent only to a machine that understands the native format, he can use "Raw" to save some encoding costs.

"InPlace" encoding specifies that data be left in place during packing. The message buffer contains only the size and pointers to the items be send. When .PVM.send is called, the items are copied directly out of the user's memory. This option decreases the number of times a message is copied, at the expense of requiring that the user not modify the items between the time they are packed and the time they are sent.

.PVM.encoding is a mapping of the strings to integers (constants defined by PVM).

Value

Returns message buffer id. -1 if there was an error.

Author(s)

Na (Michael) Li nali@umn.edu and A.J. Rossini rossini@u.washington.edu

References

PVM documentation

See Also

.PVM.mkbuf

Examples

a <- 1:10
## Not run: bufid <- .PVM.initsend ("InPlace")
## Not run: .PVM.pkintvec (a)
## Not run: .PVM.send (tid, msgtag)

[Package rpvm version 0.6-2 Index]