// ------------------------------------------------------------------------- // // --- This is the raw MPI stereo deal-style program --- // // ------------------------------------------------------------------------- // #include #include #include #include #include #include "stereo.h" #define DEBUG 0 // set to 1 for debugging mode, 0 for normal mode #define WINX 13 // window rows #define WINY 13 // window columns // For eSkel #define STAGES 3 // pipeline stages // For display #define CASEDEAL 1 #define CASE3ST 2 #define CASESEQ 3 #define CASEMPI 4 #define BYEBYE 1 //end of work tag #define SPECIALBYEBYE 2 //end of work tag to the deal worker which will have to forward BYEBYEto the final stage double dsecsG=0, esecsG=0; double st3secs[ITERS]; // times between completions at stage 3, // st3secs[0] must be ignored, leaving // ITERS-1 interesting readings double truethrput; // ------------------------------------------------------------------------- // // gendiffimg forms the difference image void gendiffimg(int ref[(ROWS+WINY)*COLS], int m1[(ROWS+WINY)*COLS], int m2[(ROWS+WINY)*COLS], float diffimg[(ROWS+WINY)*COLS], int curdisp) { int i,j; for (i=0;i