extension request - masked do loop

extension request - masked do loop

In the spirit of Run it up the flagpole and see if
anyone salutes, this proposes the following modest
language extension.

[name:] &
LOOP (triplet-spec [,triplet-spec]...[, mask-expr])
.
END LOOP [name]

Note the proposed syntax matches that of the FORALL
construct which was a DIGITAL F90 extension.
LOOP differs from FORALL in that any statement allowed
in the body of an ordinary DO loop is allowed within the
LOOP construct.

The first triplet-spec specifies the outermost loop.
Thus with two triplet-specs, the proposed construct
would execute exactly as the F77 construct:

DO i = i1, i2, i3 ! first triplet
DO j = j1, j2, j3 ! second triplet
IF (mask-expr) THEN
.
END IF
END DO
END DO

The keyword LOOP is tentative; other candidate keywords
include: DoFor, DoMask, DoOver, NEST, or VFDO. Compiler
writer to choose the keyword.

Arguments for this extension are: it is more F95-like;
it is a relatively common need; and it saves at least
one level of indentation. Anyone else think it worth
having?

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

FYI - FORALL was a feature from High-Performance Fortran (HPF) that was subsequently adopted into Fortran 95. It wasn't our invention.

Steve

Steve - Intel Developer Support

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya