<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Aron,<br>
<br>
Thanks for the reply. Thats unfortunate i was hoping to use petsc/slepc
on matrices of doubles and of ints within the same application. I was
hoping to keep the ints for a smaller memory footprint as I'm already
in the >10g range. but it seems like that is possible.<br>
<br>
-Luke<br>
<br>
On 06/29/2010 11:30 AM, Aron Ahmadia wrote:
<blockquote
cite="mid:AANLkTin4zZz0puhlvm_jtkhiH5EV6P-Wfywj4J0o1oL5@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>You couldn't simply template the dereference, you would need to
have a way to reformat the data into single/double-precision, and PETSc
assumes you are giving it a raw C pointer. This would have the effect
of potentially generating an expensive data copy every time you need to
hand your object to PETSc. I think you would be much better served by
deciding ahead of time whether you will need a single or
double-precision PETSc and writing your code accordingly with that
assumption. </div>
<div><br>
</div>
<div>A </div>
<br>
<div class="gmail_quote">On Tue, Jun 29, 2010 at 6:21 PM, Umut Tabak <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:u.tabak@tudelft.nl">u.tabak@tudelft.nl</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Luke Bloy wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for the response. Thats unfortunate as i use many different
types of matrices that i would like use with petsc.<br>
<br>
I'm not much of a c++ whiz,<br>
</blockquote>
</div>
me neither ;)
<div class="im"><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
but i'm curious if something like an adaptor would be possible that
would make a<br>
(float *) behave like a (petscscalar *) as far as petsc was concerned?
Thoughts?<br>
</blockquote>
</div>
I am not sure if these kinds of pointer conversions are safe if you do
not know that what 'petscscalar *' really is, you might check the docs.<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
</body>
</html>