octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: POC for automatic bsxfun


From: John W. Eaton
Subject: Re: POC for automatic bsxfun
Date: Wed, 24 Aug 2011 12:50:39 -0400

On 24-Aug-2011, Jordi Gutiérrez Hermoso wrote:

| Encouraged by this, I started looking at the power operators. What a
| mess. Can we replace OCTAVE_MS_POW_OPS in src/OPERATORS/op-int.h:534
| with actual templates?

Sure, I'm happy to replace macros with templates where possible.

| There's a cute trick for easily templating classes like the NDarray
| classes

If possible, I'd rather avoid too many cute tricks.

| (btw, why aren't these already templated, hysterical raisins?):

Yes, like many other things in Octave that are not "modern".  When I
started writing Octave, C++ did not have a template mechanism at all,
so I used macros.  Single precision arrays did not seem important back
then, and when they were added, David Bateman thought it would be
easier to copy code rather than use templates (at least that is what I
remember).

If you can clean things up and eliminate some cruft, that's great.
But I would appreciate small patches that fix one (or just a few)
thing(s) at a time as that is easier to follow and makes debugging
easier if you happen to make a mistake and a bug is discovered later.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]