Altera_Forum
Honored Contributor
8 years agoHow to solve data dependency problem?
After I compiled my kernel,I got the report as following:
Block2: II bottleneck due to data dependency on variable(s): value (kernels.cl:42) Largest critical path contributor(s): 64%: Floating Point Multiply Operation (kernels.cl:83) 36%: Fadd Operation (kernels.cl:83)Block2: code is here:# define NUM 128# define M 512 for(int i=0;i<NUM;i++){ double A[NUM]; double B[NUM]; double Value[M+1]; for(int m=0;m<M;m++){ for (int n=0; n < M - m; n++) { Value[n] =A*value[n] + b*Value[n+1]; } } } There are nested loops and data dependency in the code,How to optimize it?Can anyone give me some advise?Thanks so much