IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 18, 2008, 2:53:41 PM (18 years ago)
Author:
Paul Price
Message:

Enabling threads. So far, only using the threaded parts of pmSubtraction*.

File:
1 edited

Legend:

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

    r19045 r19123  
    175175    psMetadataAddBool(arguments, PS_LIST_TAIL, "-temp-delete", 0,
    176176                      "Delete temporary files on completion?", false);
     177    psMetadataAddS32(arguments, PS_LIST_TAIL, "-threads", 0, "Number of threads to use", 0);
    177178
    178179    if (argc == 1 || !psArgumentParse(arguments, &argc, argv) || argc != 3) {
     
    194195
    195196    valueArgStr(arguments, "-stats", "STATS", arguments);
     197
     198    int numThreads = psMetadataLookupS32(NULL, arguments, "-threads"); // Number of threads
     199    if (numThreads > 0 && !psThreadPoolInit(numThreads)) {
     200        psError(PS_ERR_UNKNOWN, false, "Unable to setup %d threads", numThreads);
     201        return false;
     202    }
    196203
    197204    return true;
Note: See TracChangeset for help on using the changeset viewer.