Changeset 18679 for trunk/ippTools/src/difftool.c
- Timestamp:
- Jul 23, 2008, 1:09:42 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/difftool.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/difftool.c
r18673 r18679 652 652 653 653 // Generate a single populated run 654 static bool populatedrun(const char *workdir, // Working directory 654 static bool populatedrun(psArray *list, // List of runs, to print 655 const char *workdir, // Working directory 655 656 const char *skycell_id, // Skycell identifier 656 657 const char *tess_id, // Tessellation identifier … … 759 760 } 760 761 761 if (!diffRunPrintObject(stdout, run, !simple)) { 762 psError(PS_ERR_UNKNOWN, false, "failed to print object"); 763 psFree(run); 764 return false; 762 if (list) { 763 psArrayAdd(list, list->n, run); 765 764 } 766 765 … … 782 781 PXOPT_LOOKUP_S64(input_warp_id, config->args, "-input_warp_id", false, false); 783 782 PXOPT_LOOKUP_S64(input_stack_id, config->args, "-input_stack_id", false, false); 783 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 784 784 785 785 if (template_stack_id && template_warp_id) { … … 803 803 } 804 804 805 return populatedrun(workdir, skycell_id, tess_id, 806 input_warp_id ? input_warp_id : PS_MAX_S64, 807 input_stack_id ? input_stack_id : PS_MAX_S64, 808 template_warp_id ? template_warp_id : PS_MAX_S64, 809 template_stack_id ? template_stack_id : PS_MAX_S64, 810 config); 805 psArray *list = psArrayAllocEmpty(16); // List of runs, to print 806 807 if (!populatedrun(list, workdir, skycell_id, tess_id, 808 input_warp_id ? input_warp_id : PS_MAX_S64, 809 input_stack_id ? input_stack_id : PS_MAX_S64, 810 template_warp_id ? template_warp_id : PS_MAX_S64, 811 template_stack_id ? template_stack_id : PS_MAX_S64, 812 config)) { 813 psError(PS_ERR_UNKNOWN, false, "failed to create populated diffRun"); 814 psFree(list); 815 return false; 816 } 817 818 if (!diffRunPrintObjects(stdout, list, !simple)) { 819 psError(PS_ERR_UNKNOWN, false, "failed to print object"); 820 psFree(list); 821 return false; 822 } 823 psFree(list); 811 824 812 825 return true; … … 880 893 } 881 894 895 psArray *list = psArrayAllocEmpty(16); // List of runs, to print 882 896 long numGood = 0; // Number of good rows added 883 897 for (long i = 0; i < output->n; i++) { … … 907 921 } 908 922 909 if (!populatedrun(workdir, skycell_id, tess_id, warp_id, PS_MAX_S64, PS_MAX_S64, stack_id, config)) { 923 if (!populatedrun(list, workdir, skycell_id, tess_id, warp_id, PS_MAX_S64, PS_MAX_S64, 924 stack_id, config)) { 910 925 psWarning("Unable to add run for %s,%s,%" PRId64 ",%" PRId64, skycell_id, tess_id, 911 926 warp_id, stack_id); … … 916 931 numGood++; 917 932 } 918 919 psLogMsg("difftool", PS_LOG_INFO, "%ld runs added.", numGood);920 921 933 psFree(output); 922 934 923 return true; 924 } 935 if (!diffRunPrintObjects(stdout, list, !simple)) { 936 psError(PS_ERR_UNKNOWN, false, "failed to print object"); 937 psFree(list); 938 return false; 939 } 940 psFree(list); 941 942 return true; 943 }
Note:
See TracChangeset
for help on using the changeset viewer.
