Changeset 30772 for branches/eam_branches/ipp-20110213/ppStack/src
- Timestamp:
- Mar 1, 2011, 6:21:28 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110213/ppStack/src
- Files:
-
- 7 edited
-
ppStackArguments.c (modified) (3 diffs)
-
ppStackFiles.c (modified) (2 diffs)
-
ppStackLoop.c (modified) (1 diff)
-
ppStackMatch.c (modified) (1 diff)
-
ppStackReject.c (modified) (1 diff)
-
ppStackThread.c (modified) (2 diffs)
-
ppStackThread.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/ppStack/src/ppStackArguments.c
r30620 r30772 110 110 { 111 111 assert(config); 112 113 // generic arguments (version, dumpconfig) 114 PS_ARGUMENTS_GENERIC( ppStack, config, argc, argv ); 115 116 // thread arguments 117 PS_ARGUMENTS_THREADS( ppStack, config, argc, argv ) 112 118 113 119 { … … 181 187 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-variance", 0, "Suffix for temporary variance maps", NULL); 182 188 psMetadataAddBool(arguments, PS_LIST_TAIL, "-temp-delete", 0, "Delete temporary files on completion?", false); 183 psMetadataAddS32(arguments, PS_LIST_TAIL, "-threads", 0, "Number of threads to use", 0);184 189 psMetadataAddBool(arguments, PS_LIST_TAIL, "-visual", 0, "visualisation", false); 185 190 … … 238 243 valueArgStr(arguments, "-stats", "STATS", arguments); 239 244 240 int numThreads = psMetadataLookupS32(NULL, arguments, "-threads"); // Number of threads241 if (numThreads > 0 && !psThreadPoolInit(numThreads)) {242 psError(PPSTACK_ERR_ARGUMENTS, false, "Unable to setup %d threads", numThreads);243 return false;244 }245 246 245 psMetadataAddBool(arguments, PS_LIST_TAIL, "PPSTACK.DEBUG.STACK", 0, 247 246 "Read old convolved images to debug stack?", debugStack); -
branches/eam_branches/ipp-20110213/ppStack/src/ppStackFiles.c
r30620 r30772 65 65 for (int i = 0; i < numLeaks; i++) { 66 66 psMemBlock *mb = leaks[i]; 67 fprintf(memFile, "%12lu\t%12zd\t%s:%d\n", mb->id, mb->userMemorySize, 68 mb->file, mb->lineno); 67 fprintf(memFile, "%12lu\t%12zd\t%s:%d\n", mb->id, mb->userMemorySize, mb->file, mb->lineno); 69 68 total += mb->userMemorySize; 70 69 } … … 75 74 num++; 76 75 } 77 78 79 76 80 77 // Activate/deactivate a list of files -
branches/eam_branches/ipp-20110213/ppStack/src/ppStackLoop.c
r30620 r30772 55 55 } 56 56 57 // Start threading 58 ppStackThreadInit(); 57 // Define threading elements 59 58 ppStackThreadData *stack = ppStackThreadDataSetup(options, config, true); 60 59 if (!stack) { -
branches/eam_branches/ipp-20110213/ppStack/src/ppStackMatch.c
r30684 r30772 142 142 bool mdok; // Status of MD lookup 143 143 float penalty = psMetadataLookupF32(NULL, ppsub, "PENALTY"); // Penalty for wideness 144 int threads = psMetadataLookupS32(NULL, config->arguments, " -threads"); // Number of threads144 int threads = psMetadataLookupS32(NULL, config->arguments, "NTHREADS"); // Number of threads 145 145 146 146 // Replaced pmReadoutMaskNonfinite with pmReadoutMaskInvalid (tests for already masked pixels) -
branches/eam_branches/ipp-20110213/ppStack/src/ppStackReject.c
r30620 r30772 55 55 56 56 // Reject bad pixels 57 if (psMetadataLookupS32(NULL, config->arguments, " -threads") > 0) {57 if (psMetadataLookupS32(NULL, config->arguments, "NTHREADS") > 0) { 58 58 pmStackRejectThreadsInit(); 59 59 } -
branches/eam_branches/ipp-20110213/ppStack/src/ppStackThread.c
r30620 r30772 101 101 } 102 102 103 int numThreads = psMetadataLookupS32(NULL, config->arguments, " -threads"); // Number of threads103 int numThreads = psMetadataLookupS32(NULL, config->arguments, "NTHREADS"); // Number of threads 104 104 105 105 // Generate readouts for each input file in each file group … … 248 248 249 249 250 void ppStack ThreadInit(void)250 void ppStackSetThreads(void) 251 251 { 252 252 static bool threaded = false; // Are we running threaded? -
branches/eam_branches/ipp-20110213/ppStack/src/ppStackThread.h
r30620 r30772 43 43 44 44 // Initialise the threads 45 void ppStack ThreadInit(void);45 void ppStackSetThreads(void); 46 46 47 47
Note:
See TracChangeset
for help on using the changeset viewer.
