chapel-lang/chapel — pull request #770 by bradcray (2014-11-07 07:20:50+00:00)
Title: Alternate cfd-mini version

I spent a few hours tonight taking a stab at writing an alternate
version of the cd-mini code, in part to get my head around what
it does (nothing like rewriting code to understand it).

The main changes I took on were:

* converted the 5D arrays to 1D of 1D of 3D arrays which seems to
match its logical structure better (and similarly, the 4D arrays
to a 1D of 3D). This killed performance unless I also made either
aliases to the inner arrays when I was computing on them for
awhile or passed them into routines that chewed on them.

* also created routines in order to try and remove the amount of
redundancy in the code.

I don't feel fully confident that I got everything correct, and
am worried that the correctness check is not tight enough that
it would necessarily catch problems if I did get something right.

It's also almost certain that my variable names could be made better
-- I didn't always know what they were representing, especially as I
was introducing formal argument names for the routines I was
injecting, and would be happy for suggestions for improvement.