- Timestamp:
- Aug 15, 2023, 4:43:48 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20230313/psLib/test/math/tap_psMatrix08.c
r24087 r42500 20 20 psS32 main( psS32 argc, char* argv[] ) 21 21 { 22 fprintf (stderr, "path: %s\n", argv[0]); 23 24 char imApath[1024]; 25 char imBpath[1024]; 26 char topPath[1024]; 27 char *libpath = strstr (argv[0], ".libs/"); 28 if (!libpath) { 29 fprintf (stderr, "ERROR: cannot find input data\n"); 30 exit (2); 31 } 32 33 // if (strncmp(argv[0], ".libs/", 6)) 34 int nTopPath = libpath - argv[0]; // 35 if (nTopPath) { 36 ps_strncpy_nowarn (topPath, argv[0], nTopPath); topPath[nTopPath] = 0; 37 ps_snprintf_nowarn (imApath, 1024, "%s/%s", topPath, "data/Agj.fits"); 38 ps_snprintf_nowarn (imBpath, 1024, "%s/%s", topPath, "data/Bgj.fits"); 39 } else { 40 ps_snprintf_nowarn (imApath, 1024, "%s", "data/Agj.fits"); 41 ps_snprintf_nowarn (imBpath, 1024, "%s", "data/Bgj.fits"); 42 } 43 22 44 plan_tests(23); 23 45 // psTraceSetLevel("psLib.math.psMatrixGJSolve", 4); … … 32 54 // XXX this is an ill-conditioned matrix. LU Decomposition does not inform us that it is ill-conditioned. 33 55 // the result solves the equation, but what are the errors on the values? 34 fits = psFitsOpen ( "data/Agj.fits", "r");56 fits = psFitsOpen (imApath, "r"); 35 57 ok(fits, "opened test image Agj.fits"); 36 58 … … 43 65 psFitsClose (fits); 44 66 45 fits = psFitsOpen ( "data/Bgj.fits", "r");67 fits = psFitsOpen (imBpath, "r"); 46 68 ok(fits, "opened test image Bgj.fits"); 47 69 … … 98 120 99 121 // we have a specific ill-conditioned matrix in Agj.fits. psMatrixGJSolve detects this and reports a failure. 100 fits = psFitsOpen ( "data/Agj.fits", "r");122 fits = psFitsOpen (imApath, "r"); 101 123 ok(fits, "opened test image Agj.fits"); 102 124 … … 106 128 psFitsClose (fits); 107 129 108 fits = psFitsOpen ( "data/Bgj.fits", "r");130 fits = psFitsOpen (imBpath, "r"); 109 131 ok(fits, "opened test image Bgj.fits"); 110 132 … … 147 169 148 170 // we have a specific ill-conditioned matrix in Agj.fits. psMatrixGJSolve detects this and reports a failure. 149 fits = psFitsOpen ( "data/Agj.fits", "r");171 fits = psFitsOpen (imApath, "r"); 150 172 ok(fits, "opened test image Agj.fits"); 151 173 … … 158 180 psFitsClose (fits); 159 181 160 fits = psFitsOpen ( "data/Bgj.fits", "r");182 fits = psFitsOpen (imBpath, "r"); 161 183 ok(fits, "opened test image Bgj.fits"); 162 184
Note:
See TracChangeset
for help on using the changeset viewer.
