Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: It Hurts Wh...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 50 Topic 8152 of 8774
Post > Topic >>

Re: It Hurts When I Do This off topic

by Dick Hendrickson <dick.hendrickson@[EMAIL PROTECTED] > Apr 19, 2008 at 02:21 AM

James Van Buskirk wrote:
> "Dick Hendrickson" <dick.hendrickson@[EMAIL PROTECTED]
> wrote in message 
> news:NX7Oj.210915$cQ1.165669@[EMAIL PROTECTED]
> 
>>>>>
http://softwareblogs.intel.com/2008/03/31/doctor-it-hurts-when-i-do-t...
> 
>> In it Steve said
>> "Still, most of the time, the (:) is "harmless" in that it does not
>> change the overall meaning of the program, since an array section is
>> "definable" (can be stored into), as long as you don't use a vector
>> subscript such as A([1,3,5,7])."
> 
>> That particular example is perfectly definable.  It's only many
>> to one assignments that are prohibited.  Steve undoubtedly meant
>> A([1,3,5,3]). ;)
> 
> Well, sort of.  If A is of a user-defined type, defined assignment
> can't work for array sections with vector subscripts because it
> would require a dummy argument to be definable which it can't be in
> this case from the the paragraph of section 12.4.1.3 of N1601.pdf.
> 
> Curiously, ifort implements this correctly as an extension (IIRC)
> but fails when the expr of a defined assignment is an array section
> with a vector subscript even though the latter case is actually
> conforming.
> 
> What should a compiler do when the variable in a defined assignment
> is an array section with a vector subscript?  Should it call the
> elemental subroutine anyhow, with the result that nothing gets
> copied out to the variable, or recognize this case and use derived-
> type intrinsic assignment instead?
> 
There is an interpretation request about what the standard
really says about defined assignment to an array with a
vector subscript.  Personally, I think chapter 7 is quite
clear about what happens and chapter 12 merely prevents an
optimization.  The majority of J3 doesn't read it this way,
and believes that chapter 12 prevents defined assignment
to a vector subscripted array when the defining routine is
elemental.

As to what the compiler should do.  Personally, I think it
should invoke the defined assignment subroutine multiple
times with scalar arguments (even if it is elemental) and
it is free to do so in any order.  The majority view is
that it is a syntax error.

Dick Hendrickson
 




 50 Posts in Topic:
It Hurts When I Do This
GaryScott <garylscott@  2008-04-18 09:03:06 
Re: It Hurts When I Do This
nospam@[EMAIL PROTECTED]   2008-04-18 09:27:27 
Re: It Hurts When I Do This
GaryScott <garylscott@  2008-04-18 10:53:28 
Re: It Hurts When I Do This off topic
Dick Hendrickson <dick  2008-04-18 20:58:21 
Re: It Hurts When I Do This off topic
Steve Lionel <steve.li  2008-04-19 00:14:48 
Re: It Hurts When I Do This off topic
glen herrmannsfeldt <g  2008-04-18 16:39:41 
Re: It Hurts When I Do This off topic
Dick Hendrickson <dick  2008-04-19 02:03:35 
Re: It Hurts When I Do This off topic
Steve Lionel <steve.li  2008-04-19 12:21:24 
Re: It Hurts When I Do This off topic
"James Van Buskirk&q  2008-04-18 18:34:10 
Re: It Hurts When I Do This off topic
Dick Hendrickson <dick  2008-04-19 02:21:26 
Re: It Hurts When I Do This
none <none@[EMAIL PROT  2008-04-18 19:25:29 
Re: It Hurts When I Do This
Clive Page <junk@[EMAI  2008-04-18 19:32:15 
Re: It Hurts When I Do This
glen herrmannsfeldt <g  2008-04-18 13:03:45 
Re: It Hurts When I Do This
GaryScott <garylscott@  2008-04-18 13:14:28 
Re: It Hurts When I Do This
nospam@[EMAIL PROTECTED]   2008-04-18 13:54:56 
Re: It Hurts When I Do This
glen herrmannsfeldt <g  2008-04-18 13:12:10 
Re: It Hurts When I Do This
nospam@[EMAIL PROTECTED]   2008-04-18 14:43:23 
Re: It Hurts When I Do This
glen herrmannsfeldt <g  2008-04-18 14:24:32 
Re: It Hurts When I Do This
Dick Hendrickson <dick  2008-04-18 21:09:45 
Re: It Hurts When I Do This
glen herrmannsfeldt <g  2008-04-18 12:43:04 
Re: It Hurts When I Do This
GaryScott <garylscott@  2008-04-18 15:41:56 
Re: It Hurts When I Do This
GaryScott <garylscott@  2008-04-18 15:43:51 
Re: It Hurts When I Do This
nospam@[EMAIL PROTECTED]   2008-04-18 15:55:51 
Re: It Hurts When I Do This
fj <francois.jacq@[EMA  2008-04-19 03:47:57 
Re: It Hurts When I Do This
nospam@[EMAIL PROTECTED]   2008-04-19 08:28:07 
Re: It Hurts When I Do This
Ron Shepard <ron-shepa  2008-04-19 10:52:58 
Re: It Hurts When I Do This
nospam@[EMAIL PROTECTED]   2008-04-19 08:59:50 
Re: It Hurts When I Do This
Beliavsky <beliavsky@[  2008-04-21 11:06:09 
Re: It Hurts When I Do This
nospam@[EMAIL PROTECTED]   2008-04-21 12:13:11 
Re: It Hurts When I Do This
Dick Hendrickson <dick  2008-04-21 19:29:02 
Re: It Hurts When I Do This
glen herrmannsfeldt <g  2008-04-21 11:52:12 
Re: It Hurts When I Do This
Dan Nagle <dannagle@[E  2008-04-21 20:25:04 
Re: It Hurts When I Do This
nospam@[EMAIL PROTECTED]   2008-04-21 15:25:50 
Re: It Hurts When I Do This
Beliavsky <beliavsky@[  2008-04-21 11:10:27 
Re: It Hurts When I Do This
Arjen Markus <arjen.ma  2008-04-21 12:45:28 
Re: It Hurts When I Do This
Beliavsky <beliavsky@[  2008-04-21 12:53:06 
Re: It Hurts When I Do This
Beliavsky <beliavsky@[  2008-04-21 13:05:55 
Re: It Hurts When I Do This
nospam@[EMAIL PROTECTED]   2008-04-21 15:25:50 
Re: It Hurts When I Do This
glen herrmannsfeldt <g  2008-04-21 14:58:15 
Re: It Hurts When I Do This
Steve Lionel <steve.li  2008-04-22 01:12:20 
Re: It Hurts When I Do This
glen herrmannsfeldt <g  2008-04-21 19:36:49 
Re: It Hurts When I Do This -- diversion...
dpb <none@[EMAIL PROTE  2008-04-22 09:37:11 
Re: It Hurts When I Do This -- diversion...
Steve Lionel <Steve.Li  2008-04-22 11:44:31 
Re: It Hurts When I Do This -- diversion...
dpb <none@[EMAIL PROTE  2008-04-22 11:28:33 
Re: It Hurts When I Do This -- diversion...
Steve Lionel <Steve.Li  2008-04-22 16:13:37 
CVF help -- was: Re: It Hurts When I Do This -- diversion...
dpb <none@[EMAIL PROTE  2008-04-22 15:27:08 
Re: CVF help -- was: Re: It Hurts When I Do This -- diversion...
Steve Lionel <Steve.Li  2008-04-22 16:43:38 
Re: CVF help -- was: Re: It Hurts When I Do This -- diversion...
dpb <none@[EMAIL PROTE  2008-04-22 18:51:06 
Re: CVF help -- was: Re: It Hurts When I Do This -- diversion...
"Jugoslav Dujic"  2008-04-23 09:35:40 
Re: CVF help -- was: Re: It Hurts When I Do This -- diversion...
dpb <none@[EMAIL PROTE  2008-04-23 08:58:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 23:41:57 CDT 2008.