Get datatype and size for a subset relation

saf_get_count_and_type_for_subset_relation is a function defined in rel.c.

Synopsis:

int saf_get_count_and_type_for_subset_relation(SAF_ParMode pmode, SAF_Rel *rel, SAF_RelTarget *target, size_t *abuf_sz, hid_t *abuf_type, size_t *bbuf_sz, hid_t *bbuf_type)

Formal Arguments:

  • pmode: The parallel mode.
  • rel: The relation handle.
  • target: Optional relation targeting information.
  • abuf_sz: [OUT] The number of items that would be placed in the A-buffer by a call to the saf_read_subset_relation function. The caller may pass value of NULL for this parameter if this value is not desired.
  • abuf_type: [OUT] The type of the items that would be placed in the A-buffer by a call to the saf_read_subset_relation function. The caller may pass value of NULL for this parameter if this value is not desired.
  • bbuf_sz: [OUT] The number of items that would be placed in the B-buffer by a call to the saf_read_subset_relation function. The caller may pass value of NULL for this parameter if this value is not desired.
  • bbuf_type: [OUT] The type of the items that would be placed in the B-buffer by a call to the saf_read_subset_relation function. The caller may pass value of NULL for this parameter if this value is not desired.

Description: This function is used to retrieve the number and type of A-buffer and B-buffer data items that would be retrieved by a call to the saf_read_subset_relation function. This function may be used by the caller to determine the sizes of the buffers needed when pre-allocation is desired or to determine how to traverse the buffer(s) returned by the saf_read_subset_relation function.

Preconditions:

  • pmode must be valid. (low-cost)
  • rel must be a valid relation handle for all participating processes. (low-cost)

Return Value: The constant SAF__SUCCESS is returned when this function is successful. Otherwise this function either returns an error number or throws an exception, depending on the value of the library’s error handling property.

Issues: Relation targeting is not yet implemented.

See Also: