IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.