Mercury
|
#include "mercury_types.h"
Go to the source code of this file.
Functions | |
HG_EXPORT hg_return_t | HG_Bulk_init (na_class_t *na_class) |
Initialize the Mercury bulk layer. More... | |
HG_EXPORT hg_return_t | HG_Bulk_finalize (void) |
Finalize the Mercury bulk layer. More... | |
HG_EXPORT hg_return_t | HG_Bulk_initialized (hg_bool_t *flag, na_class_t **na_class) |
Indicate whether HG_Bulk_init has been called and return associated network class. More... | |
HG_EXPORT hg_return_t | HG_Bulk_handle_create (size_t count, void **buf_ptrs, const size_t *buf_sizes, unsigned long flags, hg_bulk_t *handle) |
Create abstract bulk handle from specified memory segments. More... | |
HG_EXPORT hg_return_t | HG_Bulk_handle_free (hg_bulk_t handle) |
Free bulk handle. More... | |
HG_EXPORT hg_return_t | HG_Bulk_handle_access (hg_bulk_t handle, size_t offset, size_t size, unsigned long flags, unsigned int max_count, void **buf_ptrs, size_t *buf_sizes, unsigned int *actual_count) |
Access bulk handle to retrieve memory segments abstracted by handle. More... | |
HG_EXPORT size_t | HG_Bulk_handle_get_size (hg_bulk_t handle) |
Get total size of data abstracted by bulk handle. More... | |
HG_EXPORT size_t | HG_Bulk_handle_get_segment_count (hg_bulk_t handle) |
Get total number of segments abstracted by bulk handle. More... | |
HG_EXPORT size_t | HG_Bulk_handle_get_serialize_size (hg_bulk_t handle) |
Get size required to serialize bulk handle. More... | |
HG_EXPORT hg_return_t | HG_Bulk_handle_serialize (void *buf, size_t buf_size, hg_bulk_t handle) |
Serialize bulk handle into a buffer. More... | |
HG_EXPORT hg_return_t | HG_Bulk_handle_deserialize (hg_bulk_t *handle, const void *buf, size_t buf_size) |
Deserialize bulk handle from a buffer. More... | |
HG_EXPORT hg_return_t | HG_Bulk_transfer (hg_bulk_op_t op, na_addr_t origin_addr, hg_bulk_t origin_handle, size_t origin_offset, hg_bulk_t local_handle, size_t local_offset, size_t size, hg_bulk_request_t *request) |
Transfer data to/from origin using abstract bulk handles. More... | |
HG_EXPORT hg_return_t | HG_Bulk_wait (hg_bulk_request_t request, unsigned int timeout, hg_status_t *status) |
Wait for a bulk operation request to complete. More... | |
HG_EXPORT hg_return_t HG_Bulk_init | ( | na_class_t * | na_class | ) |
Initialize the Mercury bulk layer.
The NA class can be different from the one used for the RPC interface.
na_class | [IN] pointer to network class |
HG_EXPORT hg_return_t HG_Bulk_finalize | ( | void | ) |
Finalize the Mercury bulk layer.
HG_EXPORT hg_return_t HG_Bulk_initialized | ( | hg_bool_t * | flag, |
na_class_t ** | na_class | ||
) |
Indicate whether HG_Bulk_init has been called and return associated network class.
flag | [OUT] pointer to boolean |
na_class | [OUT] pointer to returned network class pointer |
HG_EXPORT hg_return_t HG_Bulk_handle_create | ( | size_t | count, |
void ** | buf_ptrs, | ||
const size_t * | buf_sizes, | ||
unsigned long | flags, | ||
hg_bulk_t * | handle | ||
) |
Create abstract bulk handle from specified memory segments.
Note. If NULL is passed to buf_ptrs, i.e., HG_Bulk_handle_create(count, NULL, buf_sizes, flags, &handle) memory for the missing buf_ptrs array will be internally allocated. Memory allocated is then freed when HG_Bulk_handle_free is called.
count | [IN] number of segments |
buf_ptrs | [IN] array of pointers |
buf_sizes | [IN] array of sizes |
flags | [IN] permission flag:
|
handle | [OUT] pointer to returned abstract bulk handle |
HG_EXPORT hg_return_t HG_Bulk_handle_free | ( | hg_bulk_t | handle | ) |
Free bulk handle.
handle | [IN/OUT] abstract bulk handle |
HG_EXPORT hg_return_t HG_Bulk_handle_access | ( | hg_bulk_t | handle, |
size_t | offset, | ||
size_t | size, | ||
unsigned long | flags, | ||
unsigned int | max_count, | ||
void ** | buf_ptrs, | ||
size_t * | buf_sizes, | ||
unsigned int * | actual_count | ||
) |
Access bulk handle to retrieve memory segments abstracted by handle.
When using mercury in coresident mode (i.e., when addr passed is self addr), it is possible to avoid copy of bulk data by accessing pointers from an existing bulk handle directly.
handle | [IN] abstract bulk handle |
offset | [IN] bulk offset |
size | [IN] bulk size |
flags | [IN] permission flag:
|
max_count | [IN] maximum number of segments to be returned |
buf_ptrs | [IN/OUT] array of buffer pointers |
buf_sizes | [IN/OUT] array of buffer sizes |
actual_count | [OUT] actual number of segments returned |
HG_EXPORT size_t HG_Bulk_handle_get_size | ( | hg_bulk_t | handle | ) |
Get total size of data abstracted by bulk handle.
handle | [IN] abstract bulk handle |
HG_EXPORT size_t HG_Bulk_handle_get_segment_count | ( | hg_bulk_t | handle | ) |
Get total number of segments abstracted by bulk handle.
handle | [IN] abstract bulk handle |
HG_EXPORT size_t HG_Bulk_handle_get_serialize_size | ( | hg_bulk_t | handle | ) |
Get size required to serialize bulk handle.
handle | [IN] abstract bulk handle |
HG_EXPORT hg_return_t HG_Bulk_handle_serialize | ( | void * | buf, |
size_t | buf_size, | ||
hg_bulk_t | handle | ||
) |
Serialize bulk handle into a buffer.
buf | [IN/OUT] pointer to buffer |
buf_size | [IN] buffer size |
handle | [IN] abstract bulk handle |
HG_EXPORT hg_return_t HG_Bulk_handle_deserialize | ( | hg_bulk_t * | handle, |
const void * | buf, | ||
size_t | buf_size | ||
) |
Deserialize bulk handle from a buffer.
handle | [OUT] abstract bulk handle |
buf | [IN] pointer to buffer |
buf_size | [IN] buffer size |
HG_EXPORT hg_return_t HG_Bulk_transfer | ( | hg_bulk_op_t | op, |
na_addr_t | origin_addr, | ||
hg_bulk_t | origin_handle, | ||
size_t | origin_offset, | ||
hg_bulk_t | local_handle, | ||
size_t | local_offset, | ||
size_t | size, | ||
hg_bulk_request_t * | request | ||
) |
Transfer data to/from origin using abstract bulk handles.
op | [IN] transfer operation:
|
origin_addr | [IN] abstract NA address of origin |
origin_handle | [IN] abstract bulk handle |
origin_offset | [IN] offset |
local_handle | [IN] abstract bulk handle |
local_offset | [IN] offset |
size | [IN] size of data to be transferred |
request | [OUT] pointer to returned bulk request |
HG_EXPORT hg_return_t HG_Bulk_wait | ( | hg_bulk_request_t | request, |
unsigned int | timeout, | ||
hg_status_t * | status | ||
) |
Wait for a bulk operation request to complete.
request | [IN] bulk request |
timeout | [IN] timeout (in milliseconds) |
status | [OUT] pointer to returned status |