[newchem-cpp] internal scratch-buffer interface update#333
Merged
brittonsmith merged 14 commits intoAug 13, 2025
Merged
Conversation
…atchBuf Data Structures
…cribe/internal_types_updates
…cribe/internal_types_updates
…sitor subdirectory)
Contributor
|
@mabruzzo can you resolve these merger conflicts? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was originally proposed as brittonsmith#26
This must be reviewed after #332.
This consists of a few commits that tweak the general interface of the internal-type I have been creating (their nominal role is to carry around collections of scratch buffers). Basically I formalize the idea that each of these types should support the visitor design pattern for visiting the data-members of these types (we were already doing to help with allocation and destruction).
A longer description of the design pattern is provided within the modified files.
This is important for the at least the initial transcription of step_rate_newton_raphson. We may be able to get rid of this machinery down the road.
While the new visitor machinery makes fairly heavy use of C++, it's relatively compartmentalized. In my view this makes the more C-like nature of the rest of the code a lot more ergonomic. But, we can always revisit this later.
This machinery could be very useful for aggregating memory allocations, the initial port to GPUs (i.e. copying data to and from the GPU), and debugging (e.g. printing out the contents of the buffers tracked by a particular buffer in a nicely formatted manner)