IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2008, 2:21:25 PM (18 years ago)
Author:
eugene
Message:

adding threading for psphotGuessModels (threads still clashing...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081026/psphot/src/psphotArguments.c

    r19869 r20399  
    2929    // these options override the PSPHOT recipe values loaded from recipe files
    3030    psMetadata *options = pmConfigRecipeOptions (config, PSPHOT_RECIPE);
     31
     32    // Number of threads
     33    if ((N = psArgumentGet(argc, argv, "-threads"))) {
     34        psArgumentRemove(N, &argc, argv);
     35        int nThreads = atoi(argv[N]);
     36        psMetadataAddS32(config->arguments, PS_LIST_TAIL, "NTHREADS", 0, "number of psphot threads", nThreads);
     37        psArgumentRemove(N, &argc, argv);
     38
     39        // create the thread pool with number of desired threads, supplying our thread launcher function
     40        // XXX need to determine the number of threads from the config data
     41        psThreadPoolInit (nThreads);
     42    }
     43    psphotSetThreads();
    3144
    3245    // run the test model (requires X,Y coordinate)
Note: See TracChangeset for help on using the changeset viewer.