<div class="gmail_quote">On Mon, Oct 17, 2011 at 17:29, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":2nn">An IS is NOT a Vec for integers, it is a very different best.<br></div></blockquote><div><br></div><div>Besides immutability, an IS is contravariant. Although ISGeneral is implemented with a similar data structure, it isn't meant to be used as "a Vec for integers".</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":2nn">
<div class="im"><br>
><br>
> 2) How about arbitrary parallel vectors of integers?<br>
<br>
</div> You can put the integers in a Vec. Unless your code is all integers (which is unlikely because why are you using PETSc for a code that just uses integers) the overhead of shipping around a few integers stored as doubles is not going to kill the overall performance of the code. In fact, I will faint away if you can even measure the difference. This is likely a case of premature over optimization.</div>
</blockquote></div><br><div>The downside of this is that single precision is useless because the mantissa isn't big enough to hold useful integer sizes. If you always have at least double precision, then you can still solve big problems this way (2^53 is a big number), but I still find it aesthetically displeasing.</div>