Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

How could I compare two dense matrices with the same dimensions?

$
0
0

I'm currently porting some Fortran codes to C/C++ and my question is: How could I compare two dense matrices with the same dimensions?

For exampe,
...
ALLOCATE ( A( n,m ) )
ALLOCATE ( B( n,m ) )
...
A = 0
B = 0
...
! Some processing...
...
Could I use:
...
IF A == B THEN
WRITE(*,"(A)"),'Matrix A equal to Matrix B'
ELSEIF THEN
WRITE(*,"(A)"),'Matrix A not equal to Matrix B'
ENDIF
...
Thanks in advance.


Viewing all articles
Browse latest Browse all 5691

Trending Articles



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