(j3.2006) IEEE and the GPU world
Van Snyder
Van.Snyder
Fri Aug 27 14:11:16 EDT 2010
On Fri, 2010-08-27 at 09:00 -0700, John Reid wrote:
> Malcolm Cohen wrote:
> > Van Snyder wrote:
> >> "scoping unit" should be "scope" throughout Clause 14 since we don't
> >> want to require IEEE compliance within an entire scoping unit if there
> >> is a USE statement for an IEEE module within a BLOCK construct.
> >
> > A BLOCK construct is a scoping unit, so that wouldn't do anything.
>
> I think Van means "inclusive scope" and I have (tentatively) changed my draft
> interp to say that we goofed when we introduced "inclusive scope".
In retrospect, I think "scoping unit" was after all the correct term.
Consider two cases.
One is a subroutine with "use IEEE_ARITHMETIC" containing a block
construct without it. Does the mandate to support IEEE features extend
into the block? With "scoping unit" I think it does unless one has
something like "integer IEEE_ARITHMETIC" in the block. The declaration
blocks the use: "any entity of the host that has this as its nongeneric
name is inaccessible by that name by host
association" [10-007:444:22-23].
The other is a subroutine without "use IEEE_ARITHMETIC" containing a
block construct with it. Does the mandate for IEEE support extend
throughout the subroutine? With "scoping unit" it does not; with
"inclusive scope" it does.
> >> If we use "scope" throughout Clause 14, one could have a USE statement
> >> for an IEEE module in a scope, and then declare an entity of the same
> >> name within a BLOCK construct within that scope, thereby "turning off"
> >> IEEE features within that block -- where you might want to use a GPU
> >> to do some arithmetic.
> >
> > As I read John's suggested interpretation, both USE and HOST association
> > "turn off" IEEE compliance.
> >
> > I really don't think this is acceptable. (And doesn't make sense for
> > IEEE_FEATURES.)
> >
> > Maybe I have just misunderstood it, but... that's what the words seem to
> > say.
>
> The present words (14.1:p3) are
> "If a scoping unit does not access IEEE_FEATURES, IEEE_EXCEPTIONS, or
> IEEE_ARITHMETIC, the level of support is processor dependent, and need
> not include support for any exceptions."
> and Fortran 2003 has the same words.
>
> Thus an internal procedure that does nothing with the IEEE features might be
> implemented on a GPU. It might be a surprise, but that's what the standard says.
> However, I don't think this should be extended to blocks.
>
> Cheers,
>
> John.
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
More information about the J3
mailing list