octave-maintainers
[Top][All Lists]
Advanced

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

Re: surface cdata property restricted to double or uint8


From: Shai Ayal
Subject: Re: surface cdata property restricted to double or uint8
Date: Sun, 29 Aug 2010 22:07:39 +0300

On Fri, Aug 27, 2010 at 7:02 PM, John W. Eaton <address@hidden> wrote:
>
> Why are the surface cdata and alphadata properties restricted to
> double or uint8 arrays?  I see that this restriction is documented for
> Matlab, but is there any reason we can't allow other data types for
> these properties?  At the very least, why isn't single allowed?
>
> See also bug #30877.

I see no reason for the restriction, but relaxing it would have to be
reflected in the convert_cdata function in graphics.cc
I think that for the sake of optimization it accesses the underlaying
c-array for cdata. However this means it has to do all the type
conversions. How slower would it be if we access the cdata elements
using octave's element operator, which will do type conversions for us
auto-magically?

John, can you please have a look at this function?

Shai



reply via email to

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