/****************************************************************************** * FILE: loop02.c * DESCRIPTION: * Demonstrates loop fusion ******************************************************************************/ #include #include #include #define ARRAY_SIZE 16384 #define SEED 1995 float a[ARRAY_SIZE], aa[ARRAY_SIZE]; float b[ARRAY_SIZE], bb[ARRAY_SIZE]; float c[ARRAY_SIZE], cc[ARRAY_SIZE]; float d[ARRAY_SIZE], dd[ARRAY_SIZE]; float e[ARRAY_SIZE], ee[ARRAY_SIZE]; float x, y, z, xx, yy, zz; struct timeval start_time, end_time; main() { int i; initialize_data(); /*****************************************************************************/ /* Unfused Loop */ /*****************************************************************************/ gettimeofday(&start_time, (struct timeval*)0); for(i=0;i