KEYGS is a switch in DFAULT which may need to be changed for
different vector computers. KEYGS indicates whether
vectorized gather and scatter operations can be chained to
other vector operations or whether they need to be
done explicitly using workspace vectors.
KEYGS =1 |
if explicit gathering and scattering
is needed for vectorization |
|
|
=2 |
if vectorized gathering and scattering
can be chained to other vector operations |
As an example, if the loop
DO 10 I = 1,N
C(I) = C(I) + A(IA(I))
10 CONTINUE
can be vectorized by the compiler, KEYGS should be set to 2.
If the loop needs to be rewritten as
DO 10 I = 1,N
WKSP(I) = A(IA(I))
C(I) = C(I) + WKSP(I)
10 CONTINUE
for vectorization, KEYGS should be set to 1.
KEYGS = 1 should be selected for the following computers:
CDC Cyber 205 |
Cray-1, Cray-1S, Cray-1M |
Cray X-MPs without hardware gather/scatter |
KEYGS = 2 should be selected for the following computers:
Cray X-MPs with hardware gather/scatter |
Cray-2 |
All scalar computers |
KEYGS will inform NSPCG if it needs to set aside workspace
for gather and scatter operations.