vsip_scalar_f* vsip_blockrebind_f(vsip_block_f *p, vsip_scalar_f *d); vsip_scalar_i* vsip_blockrebind_i(vsip_block_i *p, vsip_scalar_i *d);
These functions rebind an existing block p to a new user data array d. The new data array must have the same size as the originally bound data array.
The block must be in the released state to be rebound. After rebinding, the block must be admitted before it can be used.
A pointer to the previously bound user data array is returned. If an error occurs, NULL is returned.
vsip_block_p *p: Pointer to the block to be rebound.
vsip_scalar_p *d: Pointer to the new user data array.
On success, a pointer to the previously bound user data array is returned.
On error, NULL is returned.
If an error occurs, the function returns NULL.
vsip_block_f *float_block; vsip_scalar_f *new_data; vsip_scalar_f *old_data; // Assuming float_block has been properly initialized and is in the released state old_data = vsip_blockrebind_f(float_block, new_data); if (old_data == NULL) { // Handle error } // Admit the block before using it int result = vsip_blockadmit_f(float_block, VSIP_TRUE); if (result != 0) { // Handle error } vsip_block_i *int_block; vsip_scalar_i *new_int_data; vsip_scalar_i *old_int_data; // Assuming int_block has been properly initialized and is in the released state old_int_data = vsip_blockrebind_i(int_block, new_int_data); if (old_int_data == NULL) { // Handle error } // Admit the block before using it result = vsip_blockadmit_i(int_block, VSIP_TRUE); if (result != 0) { // Handle error }