<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div class="" style=""><span class="" style="">So on the GPU I should use </span><span style="font-family: monospace; font-size: 13px;" class="">MatSeqAIJSetPreallocation </span><span style="font-size: 12pt;" class="">and</span><span class="" style="font-family: monospace; font-size: 13px;"> </span><span class="" style="font-family: monospace; font-size: 13px;">MatMPIAIJSetPreallocation</span><span style="font-size: 12pt;" class="">, just like on the CPU.</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 12pt; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span style="font-size: 12pt;" class="">Reading you answer I have a doubt: using preallocation on GPU is he
speedup high?</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 12pt; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span style="font-size: 12pt;" class=""><br></span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;" class=""> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;" class=""> <div dir="ltr" class="" style=""> <font size="2" face="Arial" class="" style=""> Il Domenica 1 Giugno 2014 12:23, Jed Brown <jed@jedbrown.org> ha scritto:<br class="" style=""> </font> </div> <br class="" style=""><br class="" style=""> <div class="" style="">mary sweat <<a shape="rect"
ymailto="mailto:mary.sweat78@yahoo.it" href="mailto:mary.sweat78@yahoo.it" class="" style="">mary.sweat78@yahoo.it</a>> writes:<div class="" id="yqtfd75745" style=""><br clear="none" class="" style=""><br clear="none" class="" style="">> Hi all<br clear="none" class="" style="">> are there any functions such as MatSeqAIJSetPreallocation to<br clear="none" class="" style="">> preallocate MatSeqAIJCusp and MatMPIAIJCusp matrices? </div><br clear="none" class="" style=""><br clear="none" class="" style="">Yeah, it's name is MatSeqAIJSetPreallocation, just like the CPU version.<br clear="none" class="" style="">Matrix assembly is an irregular process that currently happens on the<br clear="none" class="" style="">CPU and is copied to the GPU. The insertion itself is generally not a<br clear="none" class="" style="">bottleneck.<br class="" style=""><br class="" style=""></div> </div> </div> </div> </div></body></html>