CAT speedup

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CAT speedup

John W. Eaton-6
On 29-Feb-2004, Petter Risholm <[hidden email]> wrote:

| I've reimplemented the cat function which has resulted in a considerable
| speedup. As it is now, it should be comparable to matlab's cat function
| when it comes to speed.
|
| The reason for the speedup comes mainly from elimination of all N-d
| indexing which was the bottleneck in the old version.
|
| This patch also provides horzcat and vertcat. They are currently
| called horzcat2 and vertcat2 since there already are a couple of .m
| scripts for doing horzcat and vertcat (I'm pretty sure they are quite a
| bit slower than my version for N-d concatenation, so I would recommend
| removing those .m files from the distribution).

I applied your changes.

Thanks,

jwe


Reply | Threaded
Open this post in threaded view
|

Someone please check for me...

Daniel Sebald
I'm at version 2.1.46 and came across what looks like a bug.  I realize
I'm way out of date, but I've downloaded the latest CVS version and
can't seem to get it to compile easily.  It is easy to script around the
problem, but could someone with a recent version do a simple test of the
code below and confirm this has been fixed?  Thanks.

The following code should not produce a matrix of all ones:

octave:174> a = [0 0.5; 0 0.4]
a =

  0.00000  0.50000
  0.00000  0.40000

octave:175> sinc(a)
ans =

  1  1
  1  1




Reply | Threaded
Open this post in threaded view
|

Re: Someone please check for me...

Paul Kienzle
It persists in 2.1.53.  Change any(i) to any(i(:)). The attached patch
fixes it.

Paul Kienzle
[hidden email]

On Mar 2, 2004, at 3:09 AM, Daniel J Sebald wrote:

> I'm at version 2.1.46 and came across what looks like a bug.  I
> realize I'm way out of date, but I've downloaded the latest CVS
> version and can't seem to get it to compile easily.  It is easy to
> script around the problem, but could someone with a recent version do
> a simple test of the code below and confirm this has been fixed?  
> Thanks.
>
> The following code should not produce a matrix of all ones:
>
> octave:174> a = [0 0.5; 0 0.4]
> a =
>
>  0.00000  0.50000
>  0.00000  0.40000
>
> octave:175> sinc(a)
> ans =
>
>  1  1
>  1  1

sinc.diff (361 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Someone please check for me...

John W. Eaton-6
On  2-Mar-2004, Paul Kienzle <[hidden email]> wrote:

| It persists in 2.1.53.  Change any(i) to any(i(:)). The attached patch
| fixes it.

I applied this change.

Thanks,

jwe