Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

SORTQQ

g_f_thomas
Beginner
605 Views

Why does:

use ifport

:

z =

cmplx(x,y) ! x, y, z are all double 1-D arrays of the same length

call sortqq(loc(real(z)), xend, srt$real8)

:

fail? I'm merely trying to sort z wrt its real part.

Thanks,

Gerry

0 Kudos
3 Replies
Steven_L_Intel1
Employee
605 Views
You're sorting a temporary expression consisting of the values from the real part of Z, and not Z itself. Once the call returns, the temporary goes away.

I don't think you can do what you want with SORTQQ. Use QSORT instead and write your own comparison function.
0 Kudos
jimdempseyatthecove
Honored Contributor III
605 Views

Gerry,

SORTQQ assumes all data are keys.

Look at using QSORT

Jim Dempsey

0 Kudos
g_f_thomas
Beginner
605 Views

Thank you Gentlemen, now I get it.

Gerry

0 Kudos
Reply