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: Thu, 12 Apr 2007 17:30:49 -0400

On 12-Apr-2007, Bob Weigel wrote:

| 
| >
| >     // First do one element to force the copy-on-write
| >     elem(dest_offset) = source.elem (source_offset);
| >     raw_source = &(source.rep->data[source_offset]);
| >     raw_dest = &(rep->data[dest_offset] );
| >
| >     for (octave_idx_type i = 0; i < block_count; i++)
| >      {
| >        memcpy (raw_dest, raw_source, sizeof(T)*element_count);
| >        raw_source += source_stride;
| >        raw_dest += dest_stride;
| >      }
| >   }
| >
| 
| I am not sure if this is related, but I have wanted to speed up Octave's 
| repmat (and zeros and ones) function.   As currently implemented,  repmat.m 
| uses some impressive vectorization tricks, but it is orders of magnitude 
| slower than other implementations.  The way I was going to approach it was 
| using the method from repmat.c at 
| http://research.microsoft.com/~minka/software/lightspeed.
| 
| I don't fully understand the C++ code that was posted iin this thread, but I 
| suspect that it is using the same method of the "lightspeed" repmat.c.  If it 
| is, then ignore this post.
| 
| The relevant part of repmat.c is as follows.  

Is this free software?  It doesn't seem that it is.  I followed the
download link on the page above and it led me to a page that has the
statement:

  Here you?ll find tools, programs, and presentations created by
  Microsoft researchers. All software on this site is available for
  non-commercial use only. For more information about commercial
  licensing, contact the Microsoft Research Licensing Group.

A "non-commercial" use license means that we can't use it in Octave.

Please don't discuss non-free software on this list.

Thanks,

jwe


reply via email to

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