IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2009, 3:09:38 PM (17 years ago)
Author:
eugene
Message:

comment out the mutex spins on the psImages (now handled by the psImage functions)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmStackReject.c

    r21183 r21351  
    4343    if (box > 0) {
    4444        // Convolve a subimage, then stick it in the target
    45         if (threaded) {
    46             psMutexLock(source);
    47         }
     45        // XXX if (threaded) {
     46        // XXX     psMutexLock(source);
     47        // XXX }
    4848        psImage *mask = psImageSubset(source, psRegionSet(xMin - box, xMax + box,
    4949                                                          yMin - box, yMax + box)); // Mask to convolve
    50         if (threaded) {
    51             psMutexUnlock(source);
    52         }
     50        // XXX if (threaded) {
     51        // XXX     psMutexUnlock(source);
     52        // XXX }
    5353        psImage *convolved = psImageConvolveMask(NULL, mask, PM_STACK_MASK_BAD, PM_STACK_MASK_CONVOLVE,
    5454                                                 -box, box, -box, box); // Convolved mask
    55         if (threaded) {
    56             psMutexLock(source);
    57         }
     55        // XXX if (threaded) {
     56        // XXX     psMutexLock(source);
     57        // XXX }
    5858        psFree(mask);
    59         if (threaded) {
    60             psMutexUnlock(source);
    61         }
     59        // XXX if (threaded) {
     60        // XXX     psMutexUnlock(source);
     61        // XXX }
    6262
    6363        int numBytes = (xMax - xMin) * PSELEMTYPE_SIZEOF(PS_TYPE_IMAGE_MASK); // Number of bytes to copy
     
    162162    pmReadout *inRO = pmReadoutAlloc(NULL); // Readout with input image
    163163    inRO->image = image;
    164     if (threaded) {
    165         psMutexInit(image);
    166     }
     164    // XXX if (threaded) {
     165    // XXX     psMutexInit(image);
     166    // XXX }
    167167    for (int i = 0; i < numRegions; i++) {
    168168        psRegion *region = subRegions->data[i]; // Region of interest
     
    211211        }
    212212    }
    213     if (threaded) {
    214         psMutexDestroy(image);
    215     }
     213    // XXX if (threaded) {
     214    // XXX     psMutexDestroy(image);
     215    // XXX }
    216216    psFree(inRO);
    217217    psImage *convolved = psMemIncrRefCounter(convRO->image);
     
    264264    psImage *target = psImageRecycle(convolved, numCols, numRows, PS_TYPE_IMAGE_MASK); // Grown image
    265265    psImageInit(target, 0);
    266     if (threaded) {
    267         psMutexInit(source);
    268     }
     266    // XXX if (threaded) {
     267    // XXX     psMutexInit(source);
     268    // XXX }
    269269    for (int i = 0; i < subRegions->n; i++) {
    270270        psRegion *region = subRegions->data[i]; // Subtraction region
     
    287287                    psArray *args = job->args; // Job arguments
    288288                    psArrayAdd(args, 1, target);
    289                     psMutexLock(source);
     289                    // XXX psMutexLock(source);
    290290                    psArrayAdd(args, 1, source);
    291                     psMutexUnlock(source);
     291                    // XXX psMutexUnlock(source);
    292292                    psArrayAdd(args, 1, kernels);
    293293                    PS_ARRAY_ADD_SCALAR(args, numCols, PS_TYPE_S32);
     
    332332        }
    333333
    334         psMutexDestroy(source);
     334        // XXX psMutexDestroy(source);
    335335    }
    336336
Note: See TracChangeset for help on using the changeset viewer.