IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23486


Ignore:
Timestamp:
Mar 23, 2009, 9:25:43 AM (17 years ago)
Author:
Paul Price
Message:

Functions declared as 'type function()' caused errors with the Intel compiler ('error #310: old-style parameter list (anachronism)'), which wants 'type function()'.

Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStats/src/ppStats.h

    r23163 r23486  
    149149
    150150// used by ppStatsFromMetadata:
    151 psDataType psDataTypeFromString (char *typename);
    152 ppStatsEntry *ppStatsEntryAlloc ();
     151psDataType psDataTypeFromString(char *typename);
     152ppStatsEntry *ppStatsEntryAlloc(void);
    153153
    154154psArray *ppStatsFromMetadataEntries (psMetadata *recipe);
  • trunk/psLib/src/imageops/psImageBinning.c

    r21107 r23486  
    3131}
    3232
    33 psImageBinning *psImageBinningAlloc() {
     33psImageBinning *psImageBinningAlloc(void) {
    3434    psImageBinning *binning = (psImageBinning*)psAlloc(sizeof(psImageBinning));
    3535    psMemSetDeallocator(binning, (psFreeFunc)psImageBinningFree);
  • trunk/psLib/src/imageops/psImageBinning.h

    r21107 r23486  
    4242
    4343
    44 psImageBinning *psImageBinningAlloc() PS_ATTR_MALLOC;
     44psImageBinning *psImageBinningAlloc(void) PS_ATTR_MALLOC;
    4545bool psMemCheckBinning(psPtr ptr);
    4646
  • trunk/psLib/src/jpeg/psImageJpeg.c

    r22681 r23486  
    3535}
    3636
    37 psImageJpegColormap *psImageJpegColormapAlloc ()
     37psImageJpegColormap *psImageJpegColormapAlloc(void)
    3838{
    3939    psImageJpegColormap *map = psAlloc(sizeof(psImageJpegColormap));
  • trunk/psLib/src/jpeg/psImageJpeg.h

    r14452 r23486  
    11/* @file  psImageJpeg.h
    22 * @brief functions to generate JPEG images from psImage
    3  * 
     3 *
    44 * @author EAM
    55 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     
    2828
    2929// allocate a colormap (does not define the map values)
    30 psImageJpegColormap *psImageJpegColormapAlloc() PS_ATTR_MALLOC;
     30psImageJpegColormap *psImageJpegColormapAlloc(void) PS_ATTR_MALLOC;
    3131
    3232// set the colormap values using the supplied name
  • trunk/psLib/src/math/psMinimizeLMM.c

    r21183 r23486  
    9595    // check for non-finite entries in result
    9696    for (int i = 0; i < Beta->n; i++) {
    97         if (!isfinite(Beta->data.F32[i])) {
    98             // psError(PS_ERR_BAD_PARAMETER_VALUE, 3, "Fit value diverges: vector[%d] is %.2f\n", i, Beta->data.F32[i]);
    99             return false;
    100         }
     97        if (!isfinite(Beta->data.F32[i])) {
     98            // psError(PS_ERR_BAD_PARAMETER_VALUE, 3, "Fit value diverges: vector[%d] is %.2f\n", i, Beta->data.F32[i]);
     99            return false;
     100        }
    101101    }
    102102
     
    104104    // (we must do this before truncating Beta below)
    105105    if (dLinear) {
    106         *dLinear = psMinLM_dLinear(Beta, beta, lambda);
    107     }
    108 
    109     // full-length Beta for checkLimits functions 
     106        *dLinear = psMinLM_dLinear(Beta, beta, lambda);
     107    }
     108
     109    // full-length Beta for checkLimits functions
    110110    psVector *tmpBeta = psVectorAlloc(params->n, PS_TYPE_F32);
    111111    psVectorInit (tmpBeta, 0.0);
     
    113113    // set tmpBeta values which are not masked
    114114    for (int j = 0, n = 0; j < params->n; j++) {
    115         if (paramMask && (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[j])) continue;
    116         tmpBeta->data.F32[j] = Beta->data.F32[n];
    117         n++;
     115        if (paramMask && (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[j])) continue;
     116        tmpBeta->data.F32[j] = Beta->data.F32[n];
     117        n++;
    118118    }
    119119
     
    127127        if (checkLimits) {
    128128            checkLimits (PS_MINIMIZE_BETA_LIMIT, j, Params->data.F32, tmpBeta->data.F32);
    129         }
     129        }
    130130
    131131        Params->data.F32[j] = params->data.F32[j] - tmpBeta->data.F32[j];
     
    135135            checkLimits (PS_MINIMIZE_PARAM_MIN,  j, Params->data.F32, tmpBeta->data.F32);
    136136            checkLimits (PS_MINIMIZE_PARAM_MAX,  j, Params->data.F32, tmpBeta->data.F32);
    137         }
     137        }
    138138    }
    139139
    140140    // apply tmpBeta after limits have been checked
    141141    for (int j = 0, n = 0; j < params->n; j++) {
    142         if (paramMask && (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[j])) continue;
    143         Beta->data.F32[n] = tmpBeta->data.F32[j];
    144         n++;
     142        if (paramMask && (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[j])) continue;
     143        Beta->data.F32[n] = tmpBeta->data.F32[j];
     144        n++;
    145145    }
    146146
     
    169169    // if none are available, return false
    170170    if (!psMinLM_AllocAB (&Alpha, &Beta, params, paramMask)) {
    171         return false;
     171        return false;
    172172    }
    173173
     
    241241    // beta only counts unmasked parameters
    242242    for (int i = 0; i < beta->n; i++) {
    243         dh = lambda*B[i] + b[i];
    244         sh = 0.5*B[i]*dh;
    245         Sh += sh;
     243        dh = lambda*B[i] + b[i];
     244        sh = 0.5*B[i]*dh;
     245        Sh += sh;
    246246        dLinear += lambda*PS_SQR(B[i]) + B[i]*b[i];
    247247    }
     
    295295        assert (!isnan(chisq));
    296296
    297         // we track alpha,beta and params,deriv separately
     297        // we track alpha,beta and params,deriv separately
    298298        for (int j = 0, J = 0; j < params->n; j++) {
    299299            if (paramMask && (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[j])) continue;
     
    304304                if (paramMask && (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[k])) continue;
    305305                alpha->data.F32[J][K] += weight * deriv->data.F32[k];
    306                 K++;
     306                K++;
    307307            }
    308308            beta->data.F32[J] += weight * delta;
    309             J++;
     309            J++;
    310310        }
    311311    }
     
    328328between that function at the specified coords and the specified value at those
    329329coords.
    330  
     330
    331331This requires F32 input data; all internal calls use F32.
    332332XXX Make an F64 version?
     
    386386    // Alpha & Beta only contain elements to represent the unmasked parameters
    387387    if (!psMinLM_AllocAB (&Alpha, &Beta, params, paramMask)) {
    388         psAbort ("programming error: no unmasked parameters to be fit\n");
    389     }
    390    
     388        psAbort ("programming error: no unmasked parameters to be fit\n");
     389    }
     390
    391391    psImage *alpha   = psImageAlloc(Alpha->numCols, Alpha->numRows, PS_TYPE_F32);
    392392    psVector *beta   = psVectorAlloc(Beta->n, PS_TYPE_F32);
     
    490490            psTrace ("psLib.math", 5, "failure to calculate covariance matrix\n");
    491491        }
    492         // set covar values which are not masked
    493         psImageInit (covar, 0.0);
    494         for (int j = 0, J = 0; j < params->n; j++) {
    495             if (paramMask && (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[j])) {
    496                 covar->data.F32[j][j] = 1.0;
    497                 continue;
    498             }
    499             for (int k = 0, K = 0; k < params->n; k++) {
    500                 if (paramMask && (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[k])) continue;
    501                 covar->data.F32[j][k] = Alpha->data.F32[J][K];
    502                 K++;
    503             }
    504             J++;
    505         }
     492        // set covar values which are not masked
     493        psImageInit (covar, 0.0);
     494        for (int j = 0, J = 0; j < params->n; j++) {
     495            if (paramMask && (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[j])) {
     496                covar->data.F32[j][j] = 1.0;
     497                continue;
     498            }
     499            for (int k = 0, K = 0; k < params->n; k++) {
     500                if (paramMask && (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[k])) continue;
     501                covar->data.F32[j][k] = Alpha->data.F32[J][K];
     502                K++;
     503            }
     504            J++;
     505        }
    506506    }
    507507
     
    533533    // count unmasked parameters
    534534    if (paramMask) {
    535         nParams = 0;
    536         for (int i = 0; i < paramMask->n; i++) {
    537             if (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) continue;
    538             nParams ++;
    539         }
    540     }
    541 
    542     if (nParams == 0) { 
    543         return false;
     535        nParams = 0;
     536        for (int i = 0; i < paramMask->n; i++) {
     537            if (paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) continue;
     538            nParams ++;
     539        }
     540    }
     541
     542    if (nParams == 0) {
     543        return false;
    544544    }
    545545
     
    585585}
    586586
    587 psMinConstraint* psMinConstraintAlloc()
     587psMinConstraint* psMinConstraintAlloc(void)
    588588{
    589589    psMinConstraint *tmp = psAlloc(sizeof(psMinConstraint));
  • trunk/psLib/src/math/psMinimizeLMM.h

    r15046 r23486  
    9494psMinConstraint;
    9595
    96 psMinConstraint *psMinConstraintAlloc() PS_ATTR_MALLOC;
     96psMinConstraint *psMinConstraintAlloc(void) PS_ATTR_MALLOC;
    9797
    9898/** Allocates a psMinimization structure.
     
    174174    psF32 lambda);
    175175
    176 // allocate alpha and beta for unmasked parameters only 
     176// allocate alpha and beta for unmasked parameters only
    177177bool psMinLM_AllocAB (psImage **Alpha, psVector **Beta, const psVector *params, const psVector *paramMask);
    178178
  • trunk/psLib/src/math/psSpline.c

    r12434 r23486  
    103103tabulated function at n points, this routine calculates the second
    104104derivatives of the interpolating cubic splines at those n points.
    105  
     105
    106106The first and second derivatives at the endpoints were previously undefined in
    107107the SDR.  From bugzilla #???, they are required to be 0.0, implementing natural
    108108splines.
    109  
     109
    110110Endpoints are defined by
    111111    PS_LEFT_SPLINE_DERIV
    112112    PS_RIGHT_SPLINE_DERIV
    113  
     113
    114114This routine assumes that vectors x and y are of the appropriate types/sizes
    115115(F32).
    116  
     116
    117117XXX: use recycled vectors for internal data.
    118118XXX: do an F64 version?
     
    177177}
    178178
    179 psSpline1D *psSpline1DAlloc()
     179psSpline1D *psSpline1DAlloc(void)
    180180{
    181181    psSpline1D *tmpSpline = (psSpline1D *) psAlloc(sizeof(psSpline1D));
     
    192192psVectorFitSpline1D(): given a set of x/y vectors, this routine generates the
    193193linear or cublic splines which satisfy those data points.
    194  
     194
    195195The formula for calculating the spline polynomials is derived from Numerical
    196196Recipes in C.  The basic idea is that the polynomial is
     
    206206into a polynomial in terms of x, and then saving the coefficients of the
    207207powers of x in the spline polynomials.  This gets pretty complicated.
    208  
     208
    209209XXX: What types must be supported?
    210210 *****************************************************************************/
     
    354354(vectorBinDisectF32()).  Then it evaluates the spline at that x location
    355355by a call to the 1D polynomial functions.
    356  
     356
    357357XXX: The spline eval functions require input and output to be F32.  however
    358358     the spline fit functions require F32 and F64.
    359  
     359
    360360XXX: This only works if spline->knots if psF32.  Must we add support for psU32 and
    361361psF64?
  • trunk/psLib/src/math/psSpline.h

    r14452 r23486  
    4646 *  @return psSpline1D*    new 1-D spline struct
    4747 */
    48 psSpline1D *psSpline1DAlloc() PS_ATTR_MALLOC;
     48psSpline1D *psSpline1DAlloc(void) PS_ATTR_MALLOC;
    4949
    5050/** Evaluates 1-D spline polynomials at a specific coordinate.
  • trunk/psLib/src/sys/psError.c

    r19034 r23486  
    146146
    147147psErrorCode p_psErrorV(const char* filename,
    148                        unsigned int lineno,
    149                        const char* func,
    150                        psErrorCode code,
    151                        bool new,
    152                        const char* format,
    153                        va_list ap)
     148                       unsigned int lineno,
     149                       const char* func,
     150                       psErrorCode code,
     151                       bool new,
     152                       const char* format,
     153                       va_list ap)
    154154{
    155155  char errMsg[MAX_STRING_LENGTH];
     
    245245}
    246246
    247 long psErrorGetStackSize()
     247long psErrorGetStackSize(void)
    248248{
    249249    psArray *errorStack = psErrorStackGet();
  • trunk/psLib/src/sys/psError.h

    r19034 r23486  
    8787 *  @return int The number of items on the error stack
    8888 */
    89 long psErrorGetStackSize();
     89long psErrorGetStackSize(void);
    9090
    9191
  • trunk/psLib/src/sys/psLogMsg.c

    r23216 r23486  
    7676}
    7777
    78 int psLogGetLevel()
     78int psLogGetLevel(void)
    7979{
    8080    return globalLogLevel;
  • trunk/psLib/src/sys/psLogMsg.h

    r14452 r23486  
    6363 *  @return int:        The current file descriptor.
    6464 */
    65 int psLogGetDestination();
     65int psLogGetDestination(void);
    6666
    6767
     
    8383 *  @return int:        The current logging level.
    8484 */
    85 int psLogGetLevel();
     85int psLogGetLevel(void);
    8686
    8787/** This procedure sets the log format for future log messages.  The argument
  • trunk/psastro/src/psastro.h

    r23412 r23486  
    5858bool              psastroMaskUpdates (pmConfig *config);
    5959
    60 psPlaneDistort   *psPlaneDistortIdentity ();
     60psPlaneDistort   *psPlaneDistortIdentity (void);
    6161bool              psPlaneDistortIsIdentity (psPlaneDistort *distort);
    6262
  • trunk/psphot/src/psphot.h

    r23242 r23486  
    2323
    2424bool            psphotModelTest (pmConfig *config, const pmFPAview *view, psMetadata *recipe);
    25 bool            psphotInit ();
     25bool            psphotInit (void);
    2626bool            psphotReadout (pmConfig *config, const pmFPAview *view);
    2727bool            psphotReadoutFindPSF(pmConfig *config, const pmFPAview *view, psArray *inSources);
     
    3535
    3636// XXX test functions
    37 psArray        *psphotFakeSources ();
     37psArray        *psphotFakeSources (void);
    3838
    3939// psphotReadout functions
     
    7676
    7777// thread-related:
    78 bool            psphotSetThreads ();
     78bool            psphotSetThreads (void);
    7979bool            psphotChooseCellSizes (int *Cx, int *Cy, pmReadout *readout, int nThreads);
    8080bool            psphotCoordToCell (int *group, int *cell, float x, float y, int Cx, int Cy);
     
    136136bool            psphotPlotMoments (pmConfig *config, pmFPAview *view, psArray *sources);
    137137bool            psphotPlotPSFModel (pmConfig *config, pmFPAview *view, psArray *sources);
    138 bool            psphotFitInit ();
    139 bool            psphotFitSummary ();
     138bool            psphotFitInit (void);
     139bool            psphotFitSummary (void);
    140140
    141141bool            psphotMergeSources (psArray *oldSources, psArray *newSources);
     
    230230psImage *pmPCMDataSaveImage (pmPCMData *pcm);
    231231
    232 int psphotKapaOpen ();
    233 bool psphotKapaClose ();
     232int psphotKapaOpen (void);
     233bool psphotKapaClose (void);
    234234bool psphotImageBackgroundCellHistogram (psVector *values, float mean, float sigma, int ix, int iy);
    235235bool psphotDiagnosticPlots (const pmConfig *config, const char *name, ...);
  • trunk/psphot/src/psphotReadout.c

    r21366 r23486  
    22
    33// this should be called by every program that links against libpsphot
    4 bool psphotInit () {
     4bool psphotInit (void) {
    55
    66    psphotErrorRegister();              // register our error codes/messages
Note: See TracChangeset for help on using the changeset viewer.