IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 27, 2008, 12:41:58 PM (18 years ago)
Author:
eugene
Message:

turn on threading; add -threads argument, split out pswarpTransformSources

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080719/pswarp/src/pswarpTransformReadout_Threaded.c

    r18752 r18753  
    11# include "pswarp.h"
    22
    3 #define SOURCE_ARRAY_BUFFER 100         // Size to grow the array of sources at a time
     3# define THREADED 1
     4# define SOURCE_ARRAY_BUFFER 100         // Size to grow the array of sources at a time
    45
    56// NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT
     
    9091            args->goodPixels = 0;
    9192
     93# if (THREADED)     
    9294            // allocate a job
    9395            psThreadJob *job = psThreadJobAlloc ("PSWARP_TRANSFORM_TILE", 0);
     
    9799            psArrayAdd (job->args, 1, args);
    98100            psThreadJobAddPending (job);
     101# else
     102            pswarpTransformTile (args);
     103            goodPixels += args->goodPixels;
     104# endif
    99105            psFree (args);
    100106        }
    101107    }
     108
     109# if (THREADED)     
    102110    // wait here for the threaded jobs to finish
    103111    if (!psThreadPoolWait ()) {
     
    115123        psFree (job);
    116124    }
     125# endif
    117126    psFree(interp);
    118127    psFree(grid);
     128
    119129
    120130    // Store the variance factor and number of good pixels
Note: See TracChangeset for help on using the changeset viewer.