On 10-Jul-2006, Matthew Marzilli wrote:
| This is my first post to the Maintainters list. My name is Matt
Marzilli,
| I'm a researcher at Lincoln Labs working with Octave.
|
| I am exploring the Octave Native Interface. Are there any plans for
Octave
| to internally support single precision, float values? As I
understand it
| now the single(..) function simply returns its argument and all data
is
| stored internally as doubles. I have read posts from developers and
Paul
| Kienzle offering some various ways to implement single precision
within the
| octave code base.
|
|
http://velveeta.che.wisc.edu/octave/lists/archive//help-octave.2003/
msg01338.html
|
| Has there been any development of a single precision matrix
(sMatrix) octave
| value either in the Octave or Octave-Forge code?
Not that I know of, but I'd like to have single precision support in
Octave.
My (vague) ideas about how to make this work are
* Convert the current Matrix/NDArray classes (both real and complex)
to use templates with specialization for the parts that call
LAPACK functions.
* Work on the double version first, so we can have the current
functionality but using templates instead. The current classes
can be replaced by typedefs.
* Write specializations for the single versions. Since the only
difference may end up being the names of some LAPACK functions,
try to limit the amount of duplicated code using function
pointers(?)
or macros.
* Provide all the operations on single arrays -- all the mx-*
and vx-* files that are generated in the liboctave directory and
all the files in src/OPERATORS to define the operators for the
scripting language.
* Do the same for sparse? Do we need single precision sparse
arrays?