// -*- C++ -*- #define N 5 #define M 10 #define MAX_ITER 20 #define RIS "/tmp/risultato.txt" /***************************************************************/ /* */ /* Test of the on_demand distribution over the array topology */ /* */ /* The parmod "elabora" has array topology */ /* */ /* The replicated attribute is a one-dimension array */ /* */ /**************************************************************/ generic main() { stream long[M] A; stream long[M] B; genera (output_stream A); elabora (input_stream A output_stream B); stampa (input_stream B); } genera (output_stream long A[M]) { Fgenera (output_stream A); } proc Fgenera (output_stream long A[M]) inc<"iostream"> $c++{ long tmp_A[M]; // start regression test std::cerr << "STARTING fgen" << std::endl; for (int k=0; k; } } stampa (input_stream long B[M]) inc<"fstream","iostream"> $c++{ static std::ofstream f; static int count = 0; static int ok = 0; if (count == 0) { f.open (RIS); } /* print and verify results */ for (int i=0; i= MAX_ITER) { if (ok==0) std::cerr << "ENDING with SUCCESS fine array_on_demand_attrib_array_replic.ast" << std::endl; else std::cerr << "ENDING with FAILURE fine array_on_demand_attrib_array_replic.ast" << std::endl; f.close(); } }c++$ proc Felab (in long A[M] out long B_[M]) inc<"iostream"> $c++{ for (int i=0; i