MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / mcopyunblock_complex

Method mcopyunblock_complex

src/ialglib.cpp:663–704  ·  view source on GitHub ↗

This subroutine copies matrix from aligned contigous storage to non-aligned non-contigous storage A: * 2*alglib_c_block*alglib_c_block doubles (only MxN submatrix is used) * aligned * stride is alglib_c_block * pointer to double is passed * may be transformed during copying (as prescribed by op) B: * MxN * non-aligned * non-contigous * pointer to ap::complex is passed Transformation types: * 0

Source from the content-addressed store, hash-verified

661* 3 - conjugate, but no transposition
662********************************************************************/
663void ialglib::mcopyunblock_complex(int m, int n, const double *a, int op, ap::complex* b, int stride)
664{
665 int i, j;
666 const double *psrc;
667 ap::complex *pdst;
668 if( op==0 )
669 {
670 for(i=0,psrc=a; i<m; i++,a+=alglib_twice_c_block,b+=stride,psrc=a)
671 for(j=0,pdst=b; j<n; j++,pdst++,psrc+=2)
672 {
673 pdst->x = psrc[0];
674 pdst->y = psrc[1];
675 }
676 }
677 if( op==1 )
678 {
679 for(i=0,psrc=a; i<m; i++,a+=2,b+=stride,psrc=a)
680 for(j=0,pdst=b; j<n; j++,pdst++,psrc+=alglib_twice_c_block)
681 {
682 pdst->x = psrc[0];
683 pdst->y = psrc[1];
684 }
685 }
686 if( op==2 )
687 {
688 for(i=0,psrc=a; i<m; i++,a+=2,b+=stride,psrc=a)
689 for(j=0,pdst=b; j<n; j++,pdst++,psrc+=alglib_twice_c_block)
690 {
691 pdst->x = psrc[0];
692 pdst->y = -psrc[1];
693 }
694 }
695 if( op==3 )
696 {
697 for(i=0,psrc=a; i<m; i++,a+=alglib_twice_c_block,b+=stride,psrc=a)
698 for(j=0,pdst=b; j<n; j++,pdst++,psrc+=2)
699 {
700 pdst->x = psrc[0];
701 pdst->y = -psrc[1];
702 }
703 }
704}
705
706
707/********************************************************************

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected