IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 31, 2008, 2:13:59 PM (18 years ago)
Author:
eugene
Message:

adding multithread capability

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpArguments.c

    r18558 r18839  
    4040        psArgumentRemove(N, &argc, argv);
    4141    }
     42
     43    // Number of threads
     44    if ((N = psArgumentGet(argc, argv, "-threads"))) {
     45        psArgumentRemove(N, &argc, argv);
     46        int nThreads = atoi(argv[N]);
     47        psMetadataAddS32(config->arguments, PS_LIST_TAIL, "NTHREADS", 0, "number of warp threads", nThreads);
     48        psArgumentRemove(N, &argc, argv);
     49
     50        // create the thread pool with number of desired threads, supplying our thread launcher function
     51        // XXX need to determine the number of threads from the config data
     52        psThreadPoolInit (nThreads);
     53    }
     54    pswarpSetThreads ();
    4255
    4356    // PSF determination?
Note: See TracChangeset for help on using the changeset viewer.