Set the destination form of a field

saf_target_field is a function defined in field.c.

Synopsis:

int saf_target_field(SAF_FieldTarget *target, SAF_Unit *targ_units, SAF_Cat *targ_storage_decomp, SAF_Cat *targ_coeff_assoc, int targ_assoc_ratio, SAF_Cat *targ_eval_coll, SAF_Eval *targ_func, hid_t targ_data_type, SAF_Interleave comp_intlv, int *comp_order)

Formal Arguments:

  • target: [OUT] The target information that will be initialized by this call.
  • targ_units: The new units. This parameter is ignored at this time.
  • targ_storage_decomp: The new storage decomposition.
  • targ_coeff_assoc: This parameter is ignored at this time.
  • targ_assoc_ratio: This parameter is ignored at this time.
  • targ_eval_coll: This parameter is ignored at this time.
  • targ_func: This parameter is ignored at this time.
  • targ_data_type: The new destination data type. When the saf_write_field function is called the datatype of the dataset produced is determined by this parameter. When the saf_read_field function is called, the datatype of the values placed in the caller’s memory is determined by this parameter. If a value of H5I_INVALID_HID is passed for this parameter then datatype targeting is turned off and the default mechanism for determining the destination datatype is used.
  • comp_intlv: The particular fashion in which components are interleaved. Currently there are really only two: SAF__INTERLEAVE_VECTOR and SAF__INTERLEAVE_COMPONENT. These represent the XYZXYZ…``XYZ`` and the XXX…``XYYY``…``YZZZ``…``Z`` cases. Note that interleave really only deals with a single blob of storage. In the case of a composite field whose coefficients are stored independently on the component fields then interleave really has no meaning (use SAF__INTERLEAVE_INDEPENDENT). Interleave only has meaning on fields with storage. In the case of a scalar field interleave is also meaningless, both cases degenerate to the same layout: XXX…``X`` (use SAF__INTERLEAVE_NONE). This parameter is ignored at this time.
  • comp_order: Only relevant for fields with component fields. This value indicates the order of the field IDs in the COMP_FLDS relative to the registered order. Pass NULL if the permutation is the identity. This parameter is ignored at this time.

Description: Setup targeting information for a field during read or write. Please see the introductory note in the Field’s chapter for some information on field targeting.

Preconditions:

  • STORAGE_DECOMP must be either NOT_SET, SELF_DECOMP or a valid cat handle. (low-cost)
  • target must be non-null. (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.

See Also: