Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Has anyone tested the efficiency of MERGE function?

$
0
0
REAL::X(100,5)
INTEGER::IS,K
IS=merge(MINLOC(X(:,K)),MAXLOC(X(:,-K)),K>0)

! its equivalent is

IF(K>0)THEN
   IS=MINLOC(X(:,K))
ELSEIF(K<0)THEN
   IS=MAXLOC(X(:,-K))
END IF

! but it seems the later has better efficiency.


Viewing all articles
Browse latest Browse all 3270

Trending Articles



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