IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19060


Ignore:
Timestamp:
Aug 13, 2008, 5:26:54 PM (18 years ago)
Author:
Paul Price
Message:

Changed API for pmSubtractionThreadsInit, and adding pmSubtractionThreadsFinalize. This takes care of mutexes for the images.

Location:
trunk/ppSub/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubArguments.c

    r19045 r19060  
    255255    }
    256256
    257     int threads = psMetadataLookupS32(NULL, arguments, "-threads"); // Number of threads
    258     if (threads > 0) {
    259         if (!psThreadPoolInit(threads)) {
    260             psError(PS_ERR_UNKNOWN, false, "Unable to setup %d threads", threads);
    261             return false;
    262         }
    263         pmSubtractionThreadSetup();
    264     }
    265 
    266257    return true;
    267258}
  • trunk/ppSub/src/ppSubReadout.c

    r18920 r19060  
    5757    psImage *reference = refRO->image;  // Reference image
    5858    PS_ASSERT_IMAGES_SIZE_EQUAL(input, reference, false);
     59
     60    int threads = psMetadataLookupS32(NULL, config->arguments, "-threads"); // Number of threads
     61    if (threads > 0) {
     62        if (!psThreadPoolInit(threads)) {
     63            psError(PS_ERR_UNKNOWN, false, "Unable to setup %d threads", threads);
     64            return false;
     65        }
     66        pmSubtractionThreadsInit(inConv, refConv, inRO, refRO);
     67    }
    5968
    6069    // Look up recipe values
     
    156165    psFree(optWidths);
    157166
     167    pmSubtractionThreadsFinalize(inConv, refConv, inRO, refRO);
     168
    158169    // Add kernel descrption to header
    159170    pmSubtractionKernels *kernels = psMetadataLookupPtr(&mdok, inConv->analysis,
Note: See TracChangeset for help on using the changeset viewer.