/************************************************************************ * inner-prod --- a simple inner product loop * * Author: Jose Nelson Amaral * Department of Computing Science * University of Alberta * http://www.cs.ualberta.ca/~amaral * * Purpose: Analyse the generation of software pipelined schedules * * Release Date: February 08 2001 * *************************************************************************/ #include #define MAX_LENGTH 10000 float InnerProduct(float *X ,float *Z, int length); main(int argc, char* argv[]) { float Z[MAX_LENGTH]; float X[MAX_LENGTH]; float Q; int length; int i; if (argc != 2) { fprintf(stderr,"syntax: inner-prod \n"); exit(1); } length = atoi(argv[1]); if(length > MAX_LENGTH) { fprintf(stderr,"Sorry vector is too long. Must be less than %d elements\n",MAX_LENGTH); exit(1); } for(i=0 ; i