Update all template formatting - #505
Open
PhilipFackler wants to merge 3 commits into
Open
Conversation
PhilipFackler
force-pushed
the
PhilipFackler/template-formatting
branch
2 times, most recently
from
July 22, 2026 19:50
25b463f to
29d6d5d
Compare
PhilipFackler
force-pushed
the
PhilipFackler/template-formatting
branch
3 times, most recently
from
July 23, 2026 19:44
d3fa387 to
45cf5d5
Compare
Fixed extraneous divergence Fixed extraneous divergence
PhilipFackler
force-pushed
the
PhilipFackler/template-formatting
branch
from
July 23, 2026 20:01
45cf5d5 to
618fb79
Compare
6 tasks
pelesh
reviewed
Jul 28, 2026
pelesh
left a comment
Collaborator
There was a problem hiding this comment.
Some preliminary comments:
- This PR changes the scope of scalar type aliases from private to public. This leads to an unintuitive code like
void function<scalar_type>(ScalarT x);. - There is minor scope creep as type aliases other than scalar types were handled in a similar way. What is the motivation for that?
Comment on lines
20
to
+23
| public: | ||
| using RealT = GridKit::ScalarTraits<ScalarT>::RealT; | ||
| using ScalarT = scalar_type; | ||
| using IdxT = index_type; | ||
| using RealT = GridKit::ScalarTraits<ScalarT>::RealT; |
Collaborator
There was a problem hiding this comment.
Why are these public? Shouldn't these be private as they are intended for use inside the class?
Comment on lines
+684
to
+685
| template <typename real_type, typename IdxT> | ||
| int CsrMatrix<real_type, IdxT>::allocateMatrixData(memory::MemorySpace memspace) |
Collaborator
There was a problem hiding this comment.
I believe this was an omission:
Suggested change
| template <typename real_type, typename IdxT> | |
| int CsrMatrix<real_type, IdxT>::allocateMatrixData(memory::MemorySpace memspace) | |
| template <typename real_type, typename index_type> | |
| int CsrMatrix<real_type, IdxT>::allocateMatrixData(memory::MemorySpace memspace) |
Comment on lines
-29
to
+38
| * @tparam Policy - Memory management policy (vendor specific) | ||
| * @tparam policy - Memory management policy (vendor specific) | ||
| * | ||
| * @author Slaven Peles <peless@ornl.gov> | ||
| */ | ||
| template <class Policy> | ||
| template <typename policy> | ||
| class MemoryUtils | ||
| { | ||
| public: | ||
| using Policy = policy; | ||
|
|
Comment on lines
38
to
+49
|
|
||
| /// Parameters enum | ||
| using Parameters = parameters_type; | ||
| /// Buses enum | ||
| using Buses = buses_type; | ||
| /// Signal inputs enum | ||
| using SignalInputs = signal_inputs_type; | ||
| /// Signal outputs enum | ||
| using SignalOutputs = signal_outputs_type; | ||
| /// Monitorable variables enum | ||
| using MonitorableVariables = monitorable_variables_type; | ||
|
|
Collaborator
There was a problem hiding this comment.
Why is this necessary? I thought the issue was with scalar types?
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
Update templates everywhere to use new style guidelines
Closes #366
Checklist
-Wall -Wpedantic -Wconversion -Wextra.