-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fdiff_direct_neumann use size_t for offsets (#1339)
offset1 and offset2 are approximately the size of volume so can overflow a 32bit int for a reasonable sized dataset. Use long long for loops where signed values are needed (for openMP on MSVC), and size_t elsewhere. Constify values that can be used in loop conditions * fdiff_direct_periodic protect against overflow when long is 32bit * fdiff_adjoint_neumann protect against overflow when long is 32bit * fdiff_adjoint_periodic protect against overflow when long is 32bit * FiniteDifferenceLibrary update wrapper functions to use size_t for array dimensions * FiniteDifferenceLibrary use consistent check for z_dim Co-authored-by: Gemma Fardell <47746591+gfardell@users.noreply.github.com>
- Loading branch information
1 parent
5062f44
commit 0db53ce
Showing
4 changed files
with
68 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters