Guest User

Untitled

a guest
Jul 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #define SIZE 256
  2.  
  3. /*
  4.  * Feautrier schedule :
  5.  * S1[i, j] -> [1 + j, i]
  6.  * S0[i] -> [0, i]
  7.  */
  8. void BlockBasedFIR(double y[SIZE],double x[SIZE],
  9.         double c[SIZE],int BLOCK, int NTAP){
  10.     int i, j;
  11. #pragma scop BlockBasedFIR, dims = (s,j,i:PAR)
  12.     for (i=0; i<BLOCK; i++) {
  13. #pragma  scop_schedule_statement (0,0,i)
  14.         y[i] = 0;
  15.         for (j=0; j<NTAP; j++) {
  16.             if(i>=j)
  17. #pragma  scop_schedule_statement (1,j,i)
  18.                 y[i] = y[i] + x[i-j]*c[j];
  19.         }
  20.     }
  21. }
Add Comment
Please, Sign In to add comment