From owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org  Tue Aug  6 02:28:00 2013
Return-Path: <owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id E4121357214; Tue,  6 Aug 2013 02:28:00 +0200 (CEST)
Delivered-To: sc22wg5@open-std.org
Received: from nag-j.co.jp (nag-j.co.jp [111.68.142.10])
	by www.open-std.org (Postfix) with ESMTP id 61BDF356A50
	for <sc22wg5@open-std.org>; Tue,  6 Aug 2013 02:27:43 +0200 (CEST)
Received: from Maru6 (218-42-159-105.cust.bit-drive.ne.jp [218.42.159.105])
	(authenticated bits=0)
	by nag-j.co.jp (8.14.5/8.14.5) with ESMTP id r760RdG1083407
	for <sc22wg5@open-std.org>; Tue, 6 Aug 2013 00:27:41 GMT
	(envelope-from malcolm@nag-j.co.jp)
Message-ID: <3A4796239C8D4284B99290B5A59F6878@Maru6>
From: "Malcolm Cohen" <malcolm@nag-j.co.jp>
To: <sc22wg5@open-std.org>
References: <20130805201609.8DB153571EF@www.open-std.org>
In-Reply-To: <20130805201609.8DB153571EF@www.open-std.org>
Subject: Re: [ukfortran] (SC22WG5.5060) (j3.2006) WG5 vote on draft TSon	further coarray features
Date: Tue, 6 Aug 2013 09:27:38 +0900
Organization: =?UTF-8?B?5pel5pysTkFH?=
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0095_01CE9287.31906530"
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Mailer: Microsoft Windows Live Mail 15.4.3555.308
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

This is a multi-part message in MIME format.

------=_NextPart_000_0095_01CE9287.31906530
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Steve Lionel wrote:
<<<
Events =E2=80=93 I=E2=80=99d like to see a note or some wording =
specifying what happens if more than one image is waiting for an event =
to be posted.
>>>
Cannot happen because we lobotomised events =E2=80=93 only the image on =
which the event variable resides is permitted to wait (EVENT WAIT =
prohibits event-variable from being coindexed).
<<<
7.4.1 (ATOMIC_ADD) =E2=80=93 change =E2=80=9CATOM becomes defined with =
the value of ATOM + VALUE.=E2=80=9D To =E2=80=9CATOM becomes defined =
with the value of ATOM + INT(VALUE,ATOMIC_INT_KIND).=E2=80=9D   Or is =
the intent that the normal mixed-mode arithmetic and assignment rules =
apply? This seems rather ugly to me, and =E2=80=9Cbecomes defined with =
the value=E2=80=9D is not intrinsic assignment.
>>>
This is a change with little real effect, since if the mathematical =
result of adding ATOM and VALUE is not representable the program is not =
conforming in precisely the same way for ATOM + VALUE as it would be for =
ATOM + INT(VALUE,KIND(ATOM)) or indeed as it would be for =
INT(ATOM+VALUE,KIND(ATOM)).  Viz, the mathematical value is not =
representable.
In fact the only effect of the change is to make the case where VALUE is =
outside the range of KIND(ATOM) but ATOM+VALUE is not, e.g. =
ATOM=3D=3D-HUGE(ATOM) and VALUE=3D=3DHUGE(ATOM)+1_int64.  Since the =
corresponding assignment statement is valid this would be an unpleasant =
surprise to the user at runtime.
Given the usual hardware limitations on atomic ops, I would suggest =
constaining the kind of VALUE such that RANGE(VALUE)<=3DRANGE(ATOM).  Or =
even say that all values representable in the kind of VALUE shall be =
representable in the kind of ATOM.  Then the user will not get an =
unpleasant surprise at runtime but will be informed at compile time that =
he cannot atomically add a 128-bit value to a 32-bit atom.
Cheers,


--=20
................................Malcolm Cohen, Nihon NAG, Tokyo.


------=_NextPart_000_0095_01CE9287.31906530
Content-Type: text/html;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:v =3D=20
"urn:schemas-microsoft-com:vml" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word" xmlns:m =3D=20
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META content=3D"text/html; charset=3Dus-ascii" =
http-equiv=3DContent-Type>
<META name=3DGenerator content=3D"Microsoft Word 15 (filtered medium)">
<STYLE><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></STYLE>
</HEAD>
<BODY lang=3DEN-US dir=3Dltr link=3D#0563c1 vLink=3D#954f72>
<DIV dir=3Dltr>
<DIV style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline">
<DIV style=3D"FONT: 10pt tahoma">
<DIV><FONT face=3DArial>Steve Lionel wrote:</FONT></DIV>
<DIV><FONT face=3DArial>&lt;&lt;&lt;</FONT></DIV>
<DIV></DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline">Events=20
=E2=80=93 I=E2=80=99d like to see a note or some wording specifying what =
happens if more than=20
one image is waiting for an event to be posted.</DIV></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline">&gt;&gt;&gt;</DIV></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline">&nbsp;</DIV></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline"><FONT=20
size=3D2 face=3D"=EF=BC=AD=EF=BC=B3 =
=E3=82=B4=E3=82=B7=E3=83=83=E3=82=AF">Cannot happen because we =
lobotomised events =E2=80=93 only the=20
image on which the event variable resides is permitted to wait (EVENT =
WAIT=20
prohibits event-variable from being coindexed).</FONT></DIV></DIV>
<DIV><FONT face=3D"=EF=BC=AD=EF=BC=B3 =
=E3=82=B4=E3=82=B7=E3=83=83=E3=82=AF">
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline">&nbsp;</DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline">&nbsp;</DIV></FONT></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline">&lt;&lt;&lt;</DIV></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline">7.4.1=20
(ATOMIC_ADD) =E2=80=93 change =E2=80=9CATOM becomes defined with the =
value of ATOM + VALUE.=E2=80=9D To=20
=E2=80=9CATOM becomes defined with the value of ATOM +=20
INT(VALUE,ATOMIC_INT_KIND).=E2=80=9D&nbsp;&nbsp; Or is the intent that =
the normal=20
mixed-mode arithmetic and assignment rules apply? This seems rather ugly =
to me,=20
and =E2=80=9Cbecomes defined with the value=E2=80=9D is not intrinsic =
assignment.</DIV></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline">&gt;&gt;&gt;</DIV></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline">&nbsp;</DIV></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline"><FONT=20
size=3D2 face=3D"=EF=BC=AD=EF=BC=B3 =
=E3=82=B4=E3=82=B7=E3=83=83=E3=82=AF">This is a change with little real =
effect, since if the=20
mathematical result of adding ATOM and VALUE is not representable the =
program is=20
not conforming in precisely the same way for ATOM + VALUE as it would be =
for=20
ATOM + INT(VALUE,KIND(ATOM)) or indeed as it would be for=20
INT(ATOM+VALUE,KIND(ATOM)).&nbsp; Viz, the mathematical value is not=20
representable.</FONT></DIV></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline"><FONT=20
size=3D2 face=3D"=EF=BC=AD=EF=BC=B3 =
=E3=82=B4=E3=82=B7=E3=83=83=E3=82=AF"></FONT>&nbsp;</DIV></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline"><FONT=20
size=3D2 face=3D"=EF=BC=AD=EF=BC=B3 =
=E3=82=B4=E3=82=B7=E3=83=83=E3=82=AF">In fact the only effect of the =
change is to make the case=20
where VALUE is outside the range of KIND(ATOM) but ATOM+VALUE is not, =
e.g.=20
ATOM=3D=3D-HUGE(ATOM) and VALUE=3D=3DHUGE(ATOM)+1_int64.&nbsp; Since the =
corresponding=20
assignment statement is valid this would be an unpleasant surprise to =
the user=20
at runtime.</FONT></DIV></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline"><FONT=20
size=3D2 face=3D"=EF=BC=AD=EF=BC=B3 =
=E3=82=B4=E3=82=B7=E3=83=83=E3=82=AF"></FONT>&nbsp;</DIV></DIV>
<DIV>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline"><FONT=20
size=3D2 face=3D"=EF=BC=AD=EF=BC=B3 =
=E3=82=B4=E3=82=B7=E3=83=83=E3=82=AF">Given the usual hardware =
limitations on atomic ops, I=20
would suggest constaining the kind of VALUE such that=20
RANGE(VALUE)&lt;=3DRANGE(ATOM).&nbsp; Or even say that all values =
representable in=20
the kind of VALUE shall be representable in the kind of ATOM.&nbsp; Then =
the=20
user will not get an unpleasant surprise at runtime but will be informed =
at=20
compile time that he cannot atomically add a 128-bit value to a 32-bit=20
atom.</FONT></DIV></DIV>
<DIV><FONT face=3D"=EF=BC=AD=EF=BC=B3 =
=E3=82=B4=E3=82=B7=E3=83=83=E3=82=AF"></FONT>
<DIV=20
style=3D"FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; =
COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: =
inline"><o:p><FONT=20
size=3D2 face=3DArial></FONT></o:p></DIV></DIV>
<DIV class=3DWordSection1>
<P class=3DMsoNormal><o:p><FONT size=3D2 =
face=3DArial>Cheers,</FONT></o:p></P>
<P class=3DMsoNormal></P></DIV>-- =
<BR>................................Malcolm=20
Cohen, Nihon NAG, Tokyo.<BR>
<P></P></DIV></DIV></DIV></BODY></HTML>

------=_NextPart_000_0095_01CE9287.31906530--

