Commit 5cdc0867 authored by thomas dettbarn's avatar thomas dettbarn
Browse files

singularvectors look good

parent b638c912
Loading
Loading
Loading
Loading
+14 −16
Original line number Diff line number Diff line
@@ -1214,21 +1214,19 @@ static void biDiagonalReductionRight_64(
		printf("%016llX\x1b[0m\n",singularVectors_Left_64[currChannel][idx]);


            tmpe=add(singularVectors_e,8);
            tmp=W_extract_l(W_shr(singularVectors_Left_64[currChannel][currChannel],tmpe));
            tmpe=add(singularVectors_e,2);
            for ( iCh=currChannel+1; iCh<nChannelsC; iCh++)
            {
                Word32 tmp2;
                Word32 tmp3;
    
       		printf("norm: \x1b[1;33m"); 
                tmp2=W_extract_l(W_shr(singularVectors_Left_64[currChannel][iCh],tmpe));
                norm_64=W_mult0_32_32(tmp,tmp2);
                for (jCh=currChannel+1;jCh<nChannelsL; jCh++)
                tmp2=W_extract_l(W_shr(singularVectors_Left_64[iCh][currChannel],tmpe));
		norm_64=0;
		move64();
		printf("norm%d,%d: \x1b[1;33m",currChannel,iCh);
                for (jCh=idx;jCh<nChannelsC; jCh++)
                {
			printf("%016llx ",norm_64);
                    tmp2=W_extract_l(W_shr(singularVectors_Left_64[currChannel][jCh],tmpe));
                    tmp3=W_extract_l(W_shr(singularVectors_Left_64[iCh][jCh],tmpe));
                    tmp2=W_extract_l(W_shr(singularVectors_Left_64[iCh][jCh],tmpe));
                    tmp3=W_extract_l(W_shr(singularVectors_Left_64[currChannel][jCh],tmpe));
                    norm_64=W_add(norm_64, W_mult0_32_32(tmp2,tmp3));
		}
		printf("%016llx\x1b[0m\n",norm_64);
@@ -1238,10 +1236,10 @@ static void biDiagonalReductionRight_64(
                f_e=add(invVal_e, sub(norm_x_e, r_e ));
		printf("F: \x1b[1;33mnorm:%016llX --> %08X<%2X   %08X<%2X\x1b[0m\n",norm_64,norm_x,norm_x_e,f,f_e);
    
                for (jCh=idx;jCh<nChannelsL; jCh++)
                for (jCh=idx;jCh<nChannelsC; jCh++)
                {
                    tmp2=W_extract_l(W_shr(singularVectors_Left_64[jCh][currChannel],tmpe));
                    singularVectors_Left_64[jCh][iCh]=W_add(singularVectors_Left_64[jCh][iCh],W_mult0_32_32(f,tmp2));	// exponent +1
                    tmp2=W_extract_l(W_shr(singularVectors_Left_64[currChannel][jCh],tmpe));
                    singularVectors_Left_64[iCh][jCh]=W_add(singularVectors_Left_64[iCh][jCh],W_mult0_32_32(f,tmp2));	// exponent +1
                }
            }
            invVal_e = 0;
@@ -1646,12 +1644,12 @@ static void biDiagonalReductionRight_fx(
                move32();
                norm_x_e = 0;
                move16();
		printf("norm: ");
		printf("norm%d,%d: ",currChannel,iCh);
                FOR( jCh = idx; jCh < nChannelsC; jCh++ ) /* nChannelsC */
                {
                    norm_x = BASOP_Util_Add_Mant32Exp( norm_x, norm_x_e, Mpy_32_32( singularVectors[iCh][jCh], singularVectors[currChannel][jCh] ), add( singularVectors2_e[iCh][jCh], singularVectors2_e[currChannel][jCh] ), &norm_x_e ); /* exp(norm_x_e) */
			printf("%08X<%02X  ",norm_x,norm_x_e);
                }
		printf("%08X<%02X  ",norm_x,norm_x_e);
		printf("\n");
		printf("F: norm %08X<%2X  ",norm_x,norm_x_e);
                norm_x = BASOP_Util_Divide3232_Scale_newton( norm_x, r, &invVal_e );