hi all
I have a question to ask here
which of the below two codes do better on vectorization.
do i=1,n if(LMASK(i)) a(i)=b(i)*c(i) endif enddo
integer LMASKtemp = abs(LMASK) do i=1,n a(i) = a(i)*(1-LMASKtemp) + LMASKtemp * b(i)*c(i) enddo
hi all
I have a question to ask here
which of the below two codes do better on vectorization.
do i=1,n if(LMASK(i)) a(i)=b(i)*c(i) endif enddo
integer LMASKtemp = abs(LMASK) do i=1,n a(i) = a(i)*(1-LMASKtemp) + LMASKtemp * b(i)*c(i) enddo