IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 26, 2009, 8:40:07 PM (17 years ago)
Author:
eugene
Message:

incorporating changes from 16bit mask upgrades (eam_branch_20081230)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psMinimizePowell.c

    r11668 r21183  
    1111 *  NOTE: XXX: The SDR is silent about data types.  F32 is implemented here.
    1212 *
    13  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-02-06 21:36:09 $
     13 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2009-01-27 06:39:38 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4343#define PS_VECTOR_ADD_MULTIPLE(BASE, BASEMASK, LINE, OUT, MUL) \
    4444for (psS32 i=0;i<BASE->n;i++) { \
    45     if (BASEMASK->data.U8[i] == 0) { \
     45    if (BASEMASK->data.PS_TYPE_VECTOR_MASK_DATA[i] == 0) { \
    4646        OUT->data.F32[i] = BASE->data.F32[i] + (MUL * LINE->data.F32[i]); \
    4747    } else { \
     
    6262BOOL_VAR = true; \
    6363for (psS32 i=0;i<IN->n;i++) { \
    64     if ((INMASK->data.U8[i] == 0) && (fabs(IN->data.F32[i]) >= FLT_EPSILON)) { \
     64    if ((INMASK->data.PS_TYPE_VECTOR_MASK_DATA[i] == 0) && (fabs(IN->data.F32[i]) >= FLT_EPSILON)) { \
    6565        BOOL_VAR = false; \
    6666        break; \
     
    359359    PS_ASSERT_VECTOR_NON_NULL(paramMask, NAN);
    360360    PS_ASSERT_VECTOR_NON_EMPTY(paramMask, NAN);
    361     PS_ASSERT_VECTOR_TYPE(paramMask, PS_TYPE_U8, NAN);
     361    PS_ASSERT_VECTOR_TYPE(paramMask, PS_TYPE_VECTOR_MASK, NAN);
    362362    PS_ASSERT_PTR_NON_NULL(coords, NAN);
    363363    PS_ASSERT_PTR_NON_NULL(func, NAN);
     
    388388        for (i=0;i<params->n;i++) {
    389389            psTrace("psLib.math", 6, "(params, paramMask, line)[%d] is (%f %d %f)\n", i,
    390                     params->data.F32[i], paramMask->data.U8[i], line->data.F32[i]);
     390                    params->data.F32[i], paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i], line->data.F32[i]);
    391391        }
    392392    }
     
    527527
    528528    if (paramMask == NULL) {
    529         myParamMask = psVectorAlloc(params->n, PS_TYPE_U8);
     529        myParamMask = psVectorAlloc(params->n, PS_TYPE_VECTOR_MASK);
    530530        psVectorInit(myParamMask, 0);
    531531    } else {
     
    572572        biggestIter = 0;
    573573        for (i=0;i<numDims;i++) {
    574             if (myParamMask->data.U8[i] == 0) {
     574            if (myParamMask->data.PS_TYPE_VECTOR_MASK_DATA[i] == 0) {
    575575                P_PSMINIMIZATION_SET_MAXITER((&dummyMin),PS_MINIMIZE_POWELL_LINEMIN_MAX_ITERATIONS);
    576576                *(float*)&dummyMin.tol = PS_MINIMIZE_POWELL_LINEMIN_ERROR_TOLERANCE;
     
    603603        // 4: Set the vector u = Q - P
    604604        for (i=0;i<numDims;i++) {
    605             if (myParamMask->data.U8[i] == 0) {
     605            if (myParamMask->data.PS_TYPE_VECTOR_MASK_DATA[i] == 0) {
    606606                u->data.F32[i] = Q->data.F32[i] - params->data.F32[i];
    607607                u->n++;
     
    649649
    650650        for (i=0;i<numDims;i++) {
    651             if (myParamMask->data.U8[i] == 0) {
     651            if (myParamMask->data.PS_TYPE_VECTOR_MASK_DATA[i] == 0) {
    652652                pQP->data.F32[i] = (2 * Q->data.F32[i]) - params->data.F32[i];
    653653            } else {
     
    663663        if (term1 < term2) {
    664664            for (i=0;i<numDims;i++) {
    665                 if (myParamMask->data.U8[i] == 0) {
     665                if (myParamMask->data.PS_TYPE_VECTOR_MASK_DATA[i] == 0) {
    666666                    ((psVector *) v->data[biggestIter])->data.F32[i] = u->data.F32[i];
    667667                }
     
    671671        // 7: Set P to Q
    672672        for (i=0;i<numDims;i++) {
    673             if (myParamMask->data.U8[i] == 0) {
     673            if (myParamMask->data.PS_TYPE_VECTOR_MASK_DATA[i] == 0) {
    674674                params->data.F32[i] = Q->data.F32[i];
    675675            }
Note: See TracChangeset for help on using the changeset viewer.