<div dir="ltr">There are no "easy" solutions, but this is definitely Eigen3 territory...<div><br></div><div>A<br><br><div class="gmail_quote">On Mon, Jul 5, 2010 at 5:05 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Mon, Jul 5, 2010 at 3:50 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org" target="_blank">jed@59a2.org</a>></span> wrote:<br>
</div></div><div class="gmail_quote"><div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Sat, 3 Jul 2010 15:41:53 +0300, Aron Ahmadia <<a href="mailto:aja2111@columbia.edu" target="_blank">aja2111@columbia.edu</a>> wrote:<br>
> I am not sure I understand your argument here (I apologize if I talk past<br>
> you, please feel free to clarify). I am surmising from the rest of your<br>
> paragraph that you feel it would be most beneficial to users to have the<br>
> full flexibility of mixed-precision with matrices/vectors, i.e. A = A1 + A2,<br>
> where A1 is single-precision and A2 is double-precision. The layer at which<br>
> you express your linear algebra algorithms should be unaware of the data<br>
> that composes a given matrix A.<br>
<br>
</div>Consider a sparse matrix consisting of 12x12 blocks operating on vector<br>
blocks with 3 single precision reals, 6 double precision reals, and 3<br>
double precision complex. Now write a templated factorization that<br>
operates on these (user-defined) blocks. Ideally this would merely<br>
involve the user defining<br>
<br>
struct Field {<br>
float a[3];<br>
double b[6];<br>
complex double c[3];<br>
};<br>
Matrix<int64_t,Field,Field> A;<br>
<br>
but I don't know how to make that work. All I can think of is an<br>
expression template solution operating on recursive types, which strikes<br>
me as terribly confusing to write and use, as well as perhaps having<br>
padding and ordering issues.</blockquote><div><br></div></div></div><div>Can we think up an easy DSL or library solution?</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font color="#888888"><br>
Jed</font></blockquote></div><div><div></div><div class="h5">-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</div></div></blockquote></div><br></div></div>