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.12 vsip_mimagview_p - Create an Imaginary Part Matrix View

vsip_mview_f* vsip_mimagview_f(const vsip_cmview_f* cmatrix);
Description

This function creates a real matrix view that represents the imaginary parts of a complex matrix. The resulting matrix view shares the same underlying data block as the complex matrix but provides access to only the imaginary components of each complex element.

For a complex matrix A with elements aij= xij+ iyij, the imaginary view matrix B will have elements bij=yij.

Parameters
Return Value
Example

vsip_cmview_f *complex_matrix; 
vsip_mview_f *imag_matrix; 
vsip_length i, j; 
 
// Create a 3x3 complex matrix 
complex_matrix = vsip_cmcreate_f(3, 3, VSIP_ROW, VSIP_MEM_NONE); 
 
// Fill with complex values 
for (i = 0; i < 3; i++) { 
    for (j = 0; j < 3; j++) { 
        vsip_cmput_f(complex_matrix, i, j, 
                    VSIP_CMPLX_F(i*3+j+1, (i*3+j+1)*0.1f)); 
    } 
} 
 
// Create an imaginary view of the complex matrix 
imag_matrix = vsip_mimagview_f(complex_matrix); 
 
if (imag_matrix == NULL) { 
    // Handle error 
}
Notes