[Numpy-discussion] Fortran was dead ... [was Re: rewriting NumPy code in C or C++ or similar]
Yung-Yu Chen
yyc at solvcon.net
Tue Mar 15 13:01:19 EDT 2011
On Tue, Mar 15, 2011 at 12:10, Christopher Barker <Chris.Barker at noaa.gov>wrote:
> On 3/15/11 8:33 AM, Charles R Harris wrote:
> > There really isn't a satisfactory array library for C++. The fact that
> > every couple of years there is another project to produce one testifies
> > to that fact.
>
> And I think not just the fact that there is not one, but that perhaps
> C++ the language, or maybe the culture, simply doesn't support that way
> of thinking.
>
> I've been slowly arriving to the conclusion that that is no place for
> C++ in programming. If you really need to twiddle bits, use C. If you
> need high performance numerics, use Fortran. If you need high level
> complex data structures, use Python.
>
>
I can't agree more.
I really love the capabilities Fortran provides for quick array operations,
especially floating-points. What I think Fortran is still lacking is better
support of C pointers and structures. I once wrote all number-crunching
code in Fortran and then interfaced it from Python, but the long argument
list is too annoying. I then translate everything to C, which makes life
much easier. I also get the bonus of straightforward porting to CUDA (and
OpenCL when it's ready).
Column-majoring of Fortran arrays is also annoying, but manageable.
C++ has its strengths. But as the mixing-language approach is becoming more
and more mature, I think C++ will gradually lose ground.
yyc
> And the fact that using all these in the same program is pretty easy
> makes it all possible.
>
> -Chris
>
>
>
>
>
>
> --
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R (206) 526-6959 voice
> 7600 Sand Point Way NE (206) 526-6329 fax
> Seattle, WA 98115 (206) 526-6317 main reception
>
> Chris.Barker at noaa.gov
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
--
Yung-Yu Chen
PhD candidate of Mechanical Engineering
The Ohio State University, Columbus, Ohio
+1 (614) 859 2436
http://solvcon.net/yyc/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110315/16cc907b/attachment.html>
More information about the NumPy-Discussion
mailing list