[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dispatching for sparse
From: |
John W. Eaton |
Subject: |
Re: dispatching for sparse |
Date: |
Thu, 07 Feb 2008 06:05:00 -0500 |
On 5-Feb-2008, David Bateman wrote:
| John W. Eaton wrote:
| > [I'm moving this discussion to the maintainers list. --jwe]
| >
| > On 4-Jan-2008, David Bateman wrote:
| >
| > | What we need to do to fix this is to use the newly introduced object
| > | classes (ie the "@" directories in this case) and the superiorto
| > | function to force mixed sparse/full function to be treated by the sparse
| > | versions of the functions. As we are still missing the superiorto
| > | function this isn't yet possible and so even converting to object
| > | classes won't help here yet... I think this is one that will have to
| > | wait at the moment.
| >
| > As it is currently implemented, the new class-based dispatching won't
| > really help here since the class of a sparse object is always double.
| >
| > One possibility is to extend the class-based dispatch to be finer
| > grained so that we can dispatch on "sparse", "sparse complex matrix",
| > "sparse bool matrix", etc. (the string returned by typeinfo). But
| > this adds even more complexity to the type dispatch code, and I think
| > I'd prefer to avoid it.
| >
| > Another possibility is to merge the sparse code with the existing
| > functions and dispatch internally. For example, we would eliminate
| > spkron and just have kron, which then needs to do the dispatching
| > itself for the various "internal" types.
| >
| >
| Well, I'd thought to move kron the the Array<T> and Sparse<T> classes
| like I did with sort. However, I'm not sure that is the right thing to
| do.. What about the attached instead.
I applied this patch and committed it.
I also added a scripts/deprecated/spkron.m to help ease the transition
for anyone who has been using spkron directly.
Thanks,
jwe