IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 4, 2008, 3:25:43 PM (18 years ago)
Author:
eugene
Message:

adding -threads option for multithreading

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageArguments.c

    r16844 r18895  
    7878    }
    7979
     80    // Number of threads
     81    if ((argnum = psArgumentGet(argc, argv, "-threads"))) {
     82        psArgumentRemove(argnum, &argc, argv);
     83        int nThreads = atoi(argv[argnum]);
     84        psMetadataAddS32(config->arguments, PS_LIST_TAIL, "NTHREADS", 0, "number of warp threads", nThreads);
     85        psArgumentRemove(argnum, &argc, argv);
     86
     87        // create the thread pool with number of desired threads, supplying our thread launcher function
     88        // XXX need to determine the number of threads from the config data
     89        psThreadPoolInit (nThreads);
     90    }
     91
    8092    // the following options override the PPIMAGE recipe options
    8193
Note: See TracChangeset for help on using the changeset viewer.