Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[apple scitech] Re: Scitech Digest, Vol 4, Issue 168



Hello,

Thank you so much for all of the clever ideas folks! I shall code up the F and G functions and report back...

In response to Steve: I am coding on my laptop, G4 1.5GHz PCC but will run the finally version on our MacPro Intel Xeon 2.4+GHz * 4. The matrix can be solved for floats, although doubles would be better (all real numbers).

If anyone is interested here is the specific case I am solving:
http://mathworld.wolfram.com/Line-PlaneIntersection.html

As some of the terms are 1s and 0s I should look into coding a determinate for this special case. Possibly using Steve's optimised assembler code as a starting point? I have not delved into assembler at all, but see how this type of optimisation would be extremely useful to know.

By the way in response to an earlier question, I calculate the determinate twice in each traversal of the Monte-Carlo code. However, it is certainly possible to thread the Monte-Carlo section and simply add the histograms of the collected statistics at the end. Perhaps this is the best solution as should give ~x4 speed up on the MacPro. However this would require some structural changes to my code, i.e. wrapping in ObjC the main loop etc.

Thank you for all the suggestions and code samples, I am very grateful.

Dan.



On 3 Nov 2007, at 19:07, email@hidden wrote:

Send Scitech mailing list submissions to
	email@hidden

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.apple.com/mailman/listinfo/scitech
or, via email, send a message with subject or body 'help' to
	email@hidden

You can reach the person managing the list at
	email@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Scitech digest..."


Today's Topics:

  1.  Determinant refinement (Richard Crandall)


----------------------------------------------------------------------

Message: 1
Date: Fri, 2 Nov 2007 12:57:43 -0700
From: Richard Crandall <email@hidden>
Subject: [apple scitech] Determinant refinement
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed

Daniel Farrell:

If you want to try Martin Costabel's variant for 4x4 det, as:

======================================
 det = G(0,1,2,3) + G(0,2,1,3) + G(0,3,1,2) +
        G(1,2,0,3) + G(1,3,0,2) + G(2,3,0,1);


double G(int j, int k, int m, int n) { return( ( a[j][0] * a[k][1] - a[k][0] * a[j][1] ) * ( a[m][2] * a[n][3] - a[n][2] * a[m][3] ) ); }

======================================

then observe that function overhead could be reduced by unrolling the whole thing, instead of calling G six times...or in-lining G, something such. It would be good to know if the F- or G- scheme gives you the speed you want, for there are yet more speedups possible...it all becomes, as is typical, a tradeoff between research time and execution time, i.e. quality-of-life vs. quality-of-machine-life!

Richard Crandall
Advanced Computation Group





------------------------------

_______________________________________________
Scitech mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/scitech

End of Scitech Digest, Vol 4, Issue 168
***************************************

_______________________________________________ Do not post admin requests to the list. They will be ignored. Scitech mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/scitech/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.