(j3.2006) an intrinsic for SORT()
Bill Long
longb
Tue Feb 6 15:05:41 EST 2018
> On Feb 6, 2018, at 1:45 PM, Van Snyder <van.snyder at jpl.nasa.gov> wrote:
>
> On Tue, 2018-02-06 at 18:52 +0000, Bill Long wrote:
>
>> We have other, similar, intrinsics. MATMUL, for example.
>
> If I write MATMUL(TRANSPOSE(A),B) will most processors create a temp for
> TRANSPOSE(A), or will they do what DGEMM does and handle the TRANSPOSE
> as a flag that changes how the multiply is done?
I suppose it depends on the compiler. At default compiler optimization options, for one compiler I have available, this source
subroutine test (a, b, c, n)
real(8) :: a(n,n), b(n,n), c(n,n)
c = matmul(transpose(a),b)
end subroutine test
results in this code for line 5:
5. if ( n > 0 ) then
5. _substr($W0,1,1) = 't'
5. _substr($W1,1,1) = 'n'
5. $W2 = n
5. $W3 = n
5. $W4 = n
5. $W5 = 1.0
5. $W6 = n
5. $W7 = n
5. $W8 = 0.0
5. $W9 = n
5. _dgemm( _substr($W0,1,1), _substr($W1,1,1), $W2, $W3, $W4, $W5, a(1, 1), $W6, b(1
, 1), $W7, $W8, c(1, 1), $W9 )
5. endif
Cheers,
Bill
>
Bill Long longb at cray.com
Principal Engineer, Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9143
Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
More information about the J3
mailing list