Quantcast
Channel: Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2583

Array attribution with all elements

$
0
0

Hi,

one way to set values to all elements of an array is:

Do i=1, N

    A(i)=2*B(i)
    C(1,i)=2*B(i)

End do

Another possibility is to use this:

A(:)=2*B(:)

C(1,:)=2*B(:)

Which is the optimum way to set values of an entire array? And with parallel computing?

Thank you.

 

Thread Topic: 

Question

Viewing all articles
Browse latest Browse all 2583

Trending Articles



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