Vector and supporting classes update#477
Merged
Merged
Conversation
Collaborator
Author
7 tasks
lukelowry
approved these changes
Jul 6, 2026
lukelowry
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me one minor import note for completeness but otherwise seems like an improvment!
Collaborator
|
Can I preemptively rebase my other branches onto this? |
Collaborator
|
@lukelowry If it’s for the sake of not having to rebase later, the commits that end up in develop will be different so you’ll still have to rebase against develop later. |
|
|
||
| // If no GPU support is present, set device memory manager to a dummy object. | ||
| #include <GridKit/MemoryUtilities/cpu/CpuMemory.hpp> | ||
| using MemoryHandler = GridKit::MemoryUtils<GridKit::memory::Cpu>; |
Collaborator
There was a problem hiding this comment.
Since this is not namespaced, it will conflict with other definitions of MemorHandler - such as with ReSolve
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.
Description
Implement several enhancements to the
VectorandMemoryUtilsclasses needed to optimize GridKit model evaluation performance and portability.Proposed changes
This PR provides (partial) support for #452 and includes:
MemoryUtilsclass.DependencyTracking::Variableclass to improve performance.resizemethod now can resize to a value larger than the original capacity to allow for instantiate now, allocate later.MemoryUtilsare moved out ofLinearAlgebradirectory.Checklist
-Wall -Wpedantic -Wconversion -Wextra.Further comments
A few questions that we should probably address in this PR, as well:
Vectordata should we mark it updated? Should we initialize it?setDatafunctions and allow creating vector views only through constructors (and optionally factories)?