Adelsbach/VSIPL
Core Programming Reference Guide
DD-00016-015
Core

This manual is preliminary and incomplete.
While our Core implementation implements all functions given in the standard we are still working on completing this documentation.

Please refer to the VSIPL standard for a complete function reference of the Core profile until we have completed work on this documentation.

1.4.3 vsip_dmcloneview_p - Clone a Matrix View

vsip_mview_f* vsip_mcloneview_f(const vsip_mview_f* matrix); 
vsip_cmview_f* vsip_cmcloneview_f(const vsip_cmview_f* matrix);
Description

This function creates a new matrix view that shares the same data block as the input matrix view but has its own independent view parameters. The cloned view references the same underlying data but maintains its own metadata (dimensions, strides, offset).

This is useful when you need multiple independent views of the same data, or when you want to create a view with different parameters (like different submatrix boundaries) while sharing the same data storage.

Parameters
Return Value
Example

vsip_mview_f *original_matrix; 
vsip_mview_f *cloned_matrix; 
 
// Clone the matrix view 
cloned_matrix = vsip_mcloneview_f(original_matrix); 
 
if (cloned_matrix == NULL) { 
    // Handle error 
}
Notes