IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2009, 10:00:02 AM (17 years ago)
Author:
Paul Price
Message:

Reorganising ppStackLoop: splitting into multiple separate functions which are joined using a common data carrier, ppStackOptions (which aren't really 'options', but that's the word I chose...).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackThread.c

    r23190 r23341  
    99
    1010#include "ppStack.h"
     11#include "ppStackOptions.h"
     12#include "ppStackThread.h"
     13
    1114
    1215#define THREAD_WAIT 10000               // Microseconds to wait if thread is not available
     
    5356}
    5457
    55 ppStackThreadData *ppStackThreadDataSetup(const psArray *cells, const psArray *imageNames,
    56                                           const psArray *maskNames, const psArray *varianceNames,
    57                                           const psArray *covariances, const pmConfig *config)
    58 {
     58ppStackThreadData *ppStackThreadDataSetup(const ppStackOptions *options, const pmConfig *config)
     59{
     60    psAssert(options, "Require options");
     61    psAssert(config, "Require configuration");
     62
     63    const psArray *cells = options->cells; // Array of input cells
     64    const psArray *imageNames = options->imageNames; // Names of images to read
     65    const psArray *maskNames = options->maskNames; // Names of masks to read
     66    const psArray *varianceNames = options->varianceNames; // Names of variance maps to read
     67    const psArray *covariances = options->covariances; // Covariance matrices (already read)
     68
    5969    PS_ASSERT_ARRAY_NON_NULL(cells, NULL);
    6070    PS_ASSERT_ARRAYS_SIZE_EQUAL(cells, imageNames, NULL);
     
    245255
    246256    {
    247         psThreadTask *task = psThreadTaskAlloc("PPSTACK_INITIAL_COMBINE", 6);
     257        psThreadTask *task = psThreadTaskAlloc("PPSTACK_INITIAL_COMBINE", 3);
    248258        task->function = &ppStackReadoutInitialThread;
    249259        psThreadTaskAdd(task);
     
    259269
    260270    {
    261         psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 7);
     271        psThreadTask *task = psThreadTaskAlloc("PPSTACK_FINAL_COMBINE", 3);
    262272        task->function = &ppStackReadoutFinalThread;
    263273        psThreadTaskAdd(task);
Note: See TracChangeset for help on using the changeset viewer.