IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18894


Ignore:
Timestamp:
Aug 4, 2008, 3:25:20 PM (18 years ago)
Author:
eugene
Message:

moving threading down into psModules functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageLoop_Threaded.c

    r18823 r18894  
    6565                // and before any of the value are used)
    6666                if (!ppImageSetMaskBits (config, options)) ESCAPE ("Unable to set bit masks");
    67 
    68                 // allocate a job
    69                 // XXX we are threading by pmReadout, but this only helps mu
    70                 psThreadJob *job = psThreadJobAlloc ("PPIMAGE_DETREND_READOUT", 0);
    71 
    72                 // construct the arguments for this job
    73                 psArrayAdd (job->args, 1, config);
    74                 psArrayAdd (job->args, 1, options);
    75                 psArrayAdd (job->args, 1, view);
    76 
    77                 // ppImageDetrendReadout(config, options, view)
    78                 if (!psThreadJobAddPending (job)) ESCAPE ("Unable to detrend readout");
     67               
     68                if (!ppImageDetrendReadout(config, options, view)) ESCAPE ("Unable to detrend readout");
    7969            }
    80 
    81             // wait for the threads to finish and manage results
    82             if (nThreads) {
    83                 // wait here for the threaded jobs to finish
    84                 if (!psThreadPoolWait ()) {
    85                     psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
    86                     return false;
    87                 }
    88                 fprintf (stderr, "success for threaded jobs\n");
    89 
    90                 // we don't care about the results, just dump the done queue jobs
    91                 psThreadJob *job = NULL;
    92                 while ((job = psThreadJobGetDone()) != NULL) {
    93                     psFree (job);
    94                 }
    95             }
    96 
    9770        }
    9871
Note: See TracChangeset for help on using the changeset viewer.