typedef struct _vsip_vattr_f { vsip_offset offset; vsip_stride stride; vsip_length length; vsip_block_f *block; } vsip_vattr_f; /* same for other datatypes with the respective vsip_dblock_p */ vsip_vview_f* vsip_vputattrib_f(vsip_vview_f* v, const vsip_vattr_f *a); vsip_vview_i* vsip_vputattrib_i(vsip_vview_i* v, const vsip_vattr_i *a); vsip_vview_bl* vsip_vputattrib_bl(vsip_vview_bl* v, const vsip_vattr_bl *a); vsip_vview_vi* vsip_vputattrib_vi(vsip_vview_vi* v, const vsip_vattr_vi *a); vsip_vview_mi* vsip_vputattrib_mi(vsip_vview_mi* v, const vsip_vattr_mi *a); vsip_cvview_f* vsip_cvputattrib_f(vsip_cvview_f* v, const vsip_cvattr_f *a);
This function sets the attributes of the vector view v to the values specified in the structure pointed to by a.
vsip_dvview_p* v: Pointer to the vector view.
const vsip_dvattr_p *a: Pointer to a structure containing the new attributes.
On success, a pointer to the modified vector view is returned.
On error, NULL is returned.
vsip_vview_f *vector_view; vsip_vattr_f new_attributes; // Assuming vector_view has been properly initialized and new_attributes is set vector_view = vsip_vputattrib_f(vector_view, &new_attributes); if (vector_view == NULL) { // Handle error }