octave-maintainers
[Top][All Lists]
Advanced

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

Re: 3D versus 2D Indexing and the Speed Thereof


From: John W. Eaton
Subject: Re: 3D versus 2D Indexing and the Speed Thereof
Date: Fri, 6 Apr 2007 13:00:39 -0400

On  6-Apr-2007, Luis F. Ortiz wrote:

| 1)  One of the methods patched is assign2(). It has the following
| signature:
| 
|         template <class LT, class RT>
|         int
|         assign2 (Array<LT>& lhs, const Array<RT>& rhs, const LT& rfv)
| 
| This seems to me to be an attempt to support type conversions during the
| assignment.
| But the code I wrote only works for the case where RT and LT are the
| same type.   What
| is the right way to handle this?  Can it be done at
| runtime/compiletime? 
| Is this ever instantiated with LT != RT?

Yes, see liboctave/Array-C.cc for example.  If there is no general way
to get the speedup with mixed types, then maybe we could come up with
a way to handle the same type case with some kind of partial
specialization?

jwe


reply via email to

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