guillaumetousignant / NDG_cuda

MIT License
1 stars 0 forks source link

Very big meshes (60 000 elements and more) take forever to allocate memory #11

Open guillaumetousignant opened 2 years ago

guillaumetousignant commented 2 years ago

image

Time is mostly taken up by memory allocation functions.

guillaumetousignant commented 2 years ago

Maybe allocate once per element, and just offset through that memory for everything?

guillaumetousignant commented 2 years ago

Each element allocates the number of neighbour faces size_t, and 35 (N + 1) + 14 (N + 1)^2 deviceFloat. Assuming deviceFloat is 8 bytes, at N = 4 elements allocate 4 kB each, and 23 kB at N = 12.

guillaumetousignant commented 2 years ago

Maybe also use a better cuda malloc implementation, the following link has a link to the implementation and the paper: https://github.com/ax3l/scatteralloc