<div dir="ltr">Now, they are sparse (AIJ) and sequential. But I will upgrade the code to parallel later.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 22, 2016 at 4:34 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">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"><br>
   Matrix A and B, sparse or dense, parallel or sequential?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> On Jun 22, 2016, at 3:27 PM, ehsan sadrfaridpour <<a href="mailto:it.sadr@gmail.com">it.sadr@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
> I need the diagonal elements from result of multiplying matrix A, B together.<br>
> I can get by multiplying the 2 matrices and then call MatGetDiagonal.<br>
> However, I only need the values on the diagonal and the rest of the elements are useless for me.<br>
> As the size of matrices increase, I am afraid it affect the performance.<br>
><br>
> So, I am looking for another method that only calculates the diagonal of multiplication and not the rest of elements.<br>
> If there is not such a method for matrix, how can I use the vector's operations to reach the same results?<br>
><br>
><br>
> Best,<br>
> Ehsan<br>
<br>
</div></div></blockquote></div><br></div>