Hi Alan,


> -----Original Message-----
> From: Alan W. Irwin [mailto:ir...@beluga.phys.uvic.ca]
> Sent: Tuesday, January 19, 2016 4:47 AM
> To: PLplot development list
> Subject: [Plplot-devel] Redacted dimension arguments
> ..., I came up with the following cunning plan....
>
> My new plan for handling redacted dimension arguments for the Fortran binding 
> is
> simply to calculate n as the minimum dimension of the associated arrays with 
> the
> only sanity check imposed on our users being that the resulting n > 0.  I 
> think this
> way of handling things is a good one because it still gives the users some 
> type of
> plot (and no memory management issues) even if they screw up and have one
> associated array inadvertently shorter than the rest.
>
I agree on this wrt one-dimensional arrays that are passed, but for 
two-dimensional arrays there is a slight complication with this scheme. 
Thinking out loud here ...

Suppose the user passes arrays x(10,10) and y(20,20) to a contouring routine, 
then the most consistent way for the wrapping routine to pass these two arrays 
would be to take an array section: x(1:10,1:10) and y(1:10,1:10). Hm, that 
could be done easily with Fortran - since the C routine has no notion of 
non-contiguous array sections, the interfacing features will transform it into 
a temporary array that is contiguous. No copying back is required as the 
arguments are intent(in).

Okay, this should work - provided it can be done for other bindings in the same 
way. I cannot comment too much on this aspect.

Your remark about the Tcl binding not using redacted dimension arguments 
triggered me look at it again. The current bindings use the matrix data type to 
store the values and that type does actually keep track of the dimensions, so 
with a twist to that binding, we can get the same benefits.

Regards,

Arjen



DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to