Quantcast
Channel: Intel® Many Integrated Core Architecture
Viewing all articles
Browse latest Browse all 1347

evaluate the code here please

$
0
0

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

 


Viewing all articles
Browse latest Browse all 1347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>