Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation allocates velocity buffers that are too large #132

Open
ixchow opened this issue Feb 9, 2022 · 0 comments
Open

Documentation allocates velocity buffers that are too large #132

ixchow opened this issue Feb 9, 2022 · 0 comments

Comments

@ixchow
Copy link

ixchow commented Feb 9, 2022

In at least two places I have noticed, the manual suggests allocating a velocity buffer with 32 bytes per element despite only using 24 bytes (i.e., sizeof(Vec3)) per element.

In manual.html#quick-start:

NvFlexBuffer* velocityBuffer = NvFlexAllocBuffer(library, n, sizeof(float4), eNvFlexBufferHost);

In NvFlex.h (and the documentation generated from it):

NvFlexBuffer* velocityBuffer = NvFlexAllocBuffer(library, n, sizeof(Vec4), eNvFlexBufferHost);

It is clear there is not some hidden constraint that requires allocating 33% more memory for velocities, given that the extensions code uses a 24-bytes-per-element buffer (via NvFlexVector< Vec3 >). I suggest that these mentions in the manual be corrected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant