Commit 23dc9ec2 authored by thomas dettbarn's avatar thomas dettbarn
Browse files

moved local variables from biDiagonalReductionLeft() to...

moved local variables from biDiagonalReductionLeft() to biDiagonalReductionRight() for clarification.
parent 10a37698
Loading
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@

static float GivensRotation( const float x, const float z );
#ifdef NONBE_SVD_OPTIMIZATION
static void biDiagonalReductionLeft( float singularVectors[][MAX_OUTPUT_CHANNELS], float singularValues[MAX_OUTPUT_CHANNELS], float secDiag[MAX_OUTPUT_CHANNELS], const int16_t nChannelsL, const int16_t nChannelsC, const int16_t currChannel, float g );
static void biDiagonalReductionLeft( float singularVectors[][MAX_OUTPUT_CHANNELS], float singularValues[MAX_OUTPUT_CHANNELS], const int16_t nChannelsL, const int16_t nChannelsC, const int16_t currChannel );
static void biDiagonalReductionRight( float singularVectors[][MAX_OUTPUT_CHANNELS], float secDiag[MAX_OUTPUT_CHANNELS], const int16_t nChannelsL, const int16_t nChannelsC, const int16_t currChannel, float *g );
#else
static void biDiagonalReductionLeft( float singularVectors[][MAX_OUTPUT_CHANNELS], float singularValues[MAX_OUTPUT_CHANNELS], float secDiag[MAX_OUTPUT_CHANNELS], const int16_t nChannelsL, const int16_t nChannelsC, const int16_t currChannel, float *sig_x, float *g );
@@ -500,7 +500,7 @@ static void HouseholderReduction(
    for ( nCh = 0; nCh < nChannelsC; nCh++ ) /* nChannelsC */
    {
#ifdef NONBE_SVD_OPTIMIZATION
        biDiagonalReductionLeft( singularVectors_Left, singularValues, secDiag, nChannelsL, nChannelsC, nCh, g );
        biDiagonalReductionLeft( singularVectors_Left, singularValues, nChannelsL, nChannelsC, nCh );
        biDiagonalReductionRight( singularVectors_Left, secDiag, nChannelsL, nChannelsC, nCh, &g );
#else
        biDiagonalReductionLeft( singularVectors_Left, singularValues, secDiag, nChannelsL, nChannelsC, nCh, &sig_x, &g );
@@ -528,16 +528,12 @@ static void HouseholderReduction(
static void biDiagonalReductionLeft(
    float singularVectors[][MAX_OUTPUT_CHANNELS],
    float singularValues[MAX_OUTPUT_CHANNELS],
    float secDiag[MAX_OUTPUT_CHANNELS],
    const int16_t nChannelsL,
    const int16_t nChannelsC,
    const int16_t currChannel,
    float g )
    const int16_t currChannel )
{
    int16_t iCh, jCh;
    float norm_x, f, r;

    secDiag[currChannel] = g;
    float norm_x, f, r, g;

    /* Setting values to 0 */
    g = 0.0f;
@@ -673,6 +669,8 @@ static void biDiagonalReductionRight(
    float norm_x, r;
    float abs_x;

    secDiag[currChannel] = *g;

    /* Setting values to 0 */
    ( *g ) = 0.0f;