Changeset 30772 for branches/eam_branches/ipp-20110213/ppSub
- Timestamp:
- Mar 1, 2011, 6:21:28 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110213/ppSub/src
- Files:
-
- 4 edited
-
ppSub.h (modified) (2 diffs)
-
ppSubArguments.c (modified) (4 diffs)
-
ppSubConvolve.c (modified) (5 diffs)
-
ppSubMatchPSFs.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/ppSub/src/ppSub.h
r29937 r30772 128 128 void ppSubVersionPrint(void); 129 129 130 /// write the version info to a string 131 psString ppSubVersionLong(void); 132 130 133 /// Mark the data quality as bad and prepare to suspend processing 131 134 void ppSubDataQuality(ppSubData *data, ///< Processing data … … 185 188 bool ppSubSetSourceImageIDs (psArray *sources, int imageID); 186 189 190 void ppSubSetThreads (void); 191 187 192 ///@} 188 193 #endif -
branches/eam_branches/ipp-20110213/ppSub/src/ppSubArguments.c
r29937 r30772 57 57 } 58 58 59 void ppSubSetThreads (void) { 60 // ppSub does not have any of its own thread handlers 61 return; 62 } 63 59 64 bool ppSubArguments(int argc, char *argv[], ppSubData *data) 60 65 { … … 62 67 pmConfig *config = data->config; 63 68 assert(config); 69 70 // generic arguments (version, dumpconfig) 71 PS_ARGUMENTS_GENERIC( ppSub, config, argc, argv ); 72 73 // thread arguments 74 PS_ARGUMENTS_THREADS( ppSub, config, argc, argv ) 64 75 65 76 int argNum = psArgumentGet(argc, argv, "-debug"); // Debugging argument number … … 82 93 psMetadataAddStr(arguments, PS_LIST_TAIL, "-stats", 0, "Statistics file", NULL); 83 94 psMetadataAddStr(arguments, PS_LIST_TAIL, "-stamps", 0, "Stamps filename; x,y on each line", NULL); 84 psMetadataAddS32(arguments, PS_LIST_TAIL, "-threads", 0, "Number of threads", 0);85 psMetadataAddStr(arguments, PS_LIST_TAIL, "-dumpconfig", 0, "file to dump configuration to", NULL);86 95 psMetadataAddS32(arguments, PS_LIST_TAIL, "-convolve", 0, "Image to convolve [1 or 2]", 0); 87 96 psMetadataAddBool(arguments, PS_LIST_TAIL, "-photometry", 0, "Perform photometry?", NULL); … … 166 175 } 167 176 168 int threads = psMetadataLookupS32(NULL, arguments, "-threads"); // Number of threads169 if (threads > 0) {170 if (!psThreadPoolInit(threads)) {171 psError(psErrorCodeLast(), false, "Unable to setup %d threads", threads);172 return false;173 }174 }175 176 177 psTrace("ppSub", 1, "Done reading command-line arguments\n"); 177 178 -
branches/eam_branches/ipp-20110213/ppSub/src/ppSubConvolve.c
r29551 r30772 39 39 } 40 40 41 void ppSubSetThreads (void) { 42 // ppSub does not have any of its own thread handlers 43 return; 44 } 41 45 42 46 int main(int argc, char *argv[]) … … 49 53 goto die; 50 54 } 55 56 // generic arguments (version, dumpconfig) 57 PS_ARGUMENTS_GENERIC( ppSub, config, argc, argv ); 58 59 // thread arguments 60 PS_ARGUMENTS_THREADS( ppSub, config, argc, argv ) 51 61 52 62 bool reference = false; // Input is actually the reference image? … … 59 69 psMetadataAddStr(arguments, PS_LIST_TAIL, "-kernel", 0, "Convolution kernel", NULL); 60 70 psMetadataAddBool(arguments, PS_LIST_TAIL, "-reference", 0, "Input is actually reference?", false); 61 psMetadataAddS32(arguments, PS_LIST_TAIL, "-threads", 0, "Threads to use", 0);62 71 psMetadataAddBool(arguments, PS_LIST_TAIL, "-save-all", 0, "Save all outputs?", false); 63 72 … … 75 84 76 85 reference = psMetadataLookupBool(NULL, arguments, "-reference"); 77 threads = psMetadataLookupS32(NULL, arguments, " -threads");86 threads = psMetadataLookupS32(NULL, arguments, "NTHREADS"); 78 87 fileList("PPSUB.INPUT", inImage, "Input image", config); 79 88 fileList("PPSUB.INPUT.MASK", inMask, "Input mask", config); … … 239 248 if (threads > 0) { 240 249 pmSubtractionThreadsInit(); 241 psThreadPoolInit(threads);242 250 } 243 251 -
branches/eam_branches/ipp-20110213/ppSub/src/ppSubMatchPSFs.c
r30619 r30772 374 374 } 375 375 376 int threads = psMetadataLookupS32(NULL, config->arguments, " -threads"); // Number of threads376 int threads = psMetadataLookupS32(NULL, config->arguments, "NTHREADS"); // Number of threads 377 377 if (threads > 0) { 378 378 pmSubtractionThreadsInit();
Note:
See TracChangeset
for help on using the changeset viewer.
