You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For optimization purposes, variable length arrays (VLAs) have been introduced in the main attenuation / tally routines as buffers to store scalar fluxes before transferring them to the main scalar flux(es for linear source) arrays.
This made the code significantly faster, possibly because those arrays live on the stack of each thread, rather than on the heap. By being careful about false sharing, I think similar performance may be achieved with regular buffers allocated before the transport sweep on the heap.
This change may be desirable, because VLAs are not part of the C++ standard, but were added to C99 and are offered as a C++ extension by GCC and ICPC. However, not by MSVC so OpenMOC will not compile with that.
If there is a need, I could easily add an installation option to offer a strictly C++ compliant version that will compile everywhere.
The text was updated successfully, but these errors were encountered:
For optimization purposes, variable length arrays (VLAs) have been introduced in the main attenuation / tally routines as buffers to store scalar fluxes before transferring them to the main scalar flux(es for linear source) arrays.
This made the code significantly faster, possibly because those arrays live on the stack of each thread, rather than on the heap. By being careful about false sharing, I think similar performance may be achieved with regular buffers allocated before the transport sweep on the heap.
This change may be desirable, because VLAs are not part of the C++ standard, but were added to C99 and are offered as a C++ extension by GCC and ICPC. However, not by MSVC so OpenMOC will not compile with that.
If there is a need, I could easily add an installation option to offer a strictly C++ compliant version that will compile everywhere.
The text was updated successfully, but these errors were encountered: