<div dir="ltr">Hi,<div><br></div><div>This is &quot;just&quot; like std::vector. There&#39;s a number of elements in the array and a size to the storage. Reallocation is something you want to avoid (particularly for high-performance multi-threaded code), so you over-allocate the size when you first know the number, and hope you will never need to re-allocate.</div><div><br></div><div>Mark</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 30, 2015 at 10:03 PM Sikandar Mashayak &lt;<a href="mailto:mashayak@votca.org">mashayak@votca.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi,<br><br></div>I am a bit confused about length/size of the out-&gt;f , x, and q arrays. Looking at the data structures in the nbnxn_pairlist.h, there are two size related variables, natoms and nalloc. And in nbnxn_atomdata.c, when f, x, and q arrays are reallocated they are passed nalloc*stride size value. Does that mean the actual size is nalloc*stride or natoms*stride? Also, I noticed nalloc and natoms may not be the same.<br><br></div>Thanks,<br></div>Sikandar<br></div>
--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.</blockquote></div>