Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions src/.clang-format

@kennyweiss kennyweiss Jul 29, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file contains the only hand-edited changes.
Many of the changes were related to removing obsolete/deprecated features, and updating to the new ones.
Tested using clang-format --dump-config

The rest of the files in this PR are automatically generated via make style
(Note: Reviewing with "Hide whitespace" reveals that nearly every change in this PR is a whitespace change.)

Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# requires clang 14
# https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormatStyleOptions.html
# requires clang 19
# https://releases.llvm.org/19.1.0/tools/clang/docs/ClangFormatStyleOptions.html

BasedOnStyle: Google
Language: Cpp
Standard: Cpp11
Standard: c++20
LineEnding: LF

AccessModifierOffset: -2
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: true

BinPackArguments: false
BinPackParameters: false
BreakConstructorInitializers: BeforeComma
BreakTemplateDeclarations: Yes

BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
Expand All @@ -36,10 +36,12 @@ BraceWrapping:
SplitEmptyRecord: false
SplitEmptyNamespace: false

ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
ColumnLimit: 100
PackConstructorInitializers: CurrentLine

DerivePointerAlignment: false

FixNamespaceComments: true

Expand All @@ -48,10 +50,12 @@ IndentPPDirectives: BeforeHash
IndentWidth: 2

PenaltyExcessCharacter: 10
PointerAlignment: Left

ReferenceAlignment: Left
Comment on lines +53 to +55

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two control the placement of T* ptr and T& ref

The DerivePointAligment: false a few lines up says not to use the style found in the file.

ReflowComments: false

SortIncludes: false
SortIncludes: Never
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
Expand All @@ -60,20 +64,17 @@ SpaceBeforeInheritanceColon: true
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInAngles: Never
SpacesInContainerLiterals: false
SpacesInConditionalStatement: false
SpacesInParentheses: false
SpacesInParens: Never
SpacesInSquareBrackets: false

UseTab: Never

## Possible changes

# Axom defaults for alignment -- consider changing
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: false
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignOperands: DontAlign
2 changes: 1 addition & 1 deletion src/axom/bump/BlendData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct BlendData
* \return The number of blend groups in the BlendData.
*/
AXOM_HOST_DEVICE
inline axom::IndexType numberOfValues(const BlendData &blend)
inline axom::IndexType numberOfValues(const BlendData& blend)
{
return blend.m_blendGroupSizesView.size();
}
Expand Down
6 changes: 3 additions & 3 deletions src/axom/bump/ComputeMeasure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ComputeMeasure
*
* \param adaptor The adaptor object to use to compute the measure.
*/
ComputeMeasure(Adaptor &adaptor)
ComputeMeasure(Adaptor& adaptor)
: m_adaptor(adaptor)
, m_allocator_id(axom::execution_space<ExecSpace>::allocatorID())
{ }
Expand Down Expand Up @@ -67,14 +67,14 @@ class ComputeMeasure
* \param topoName The topology name for the field.
* \param n_field The node that will contain the new field.
*/
void execute(const std::string &topoName, conduit::Node &n_field)
void execute(const std::string& topoName, conduit::Node& n_field)
{
const auto conduitAllocatorId =
axom::sidre::ConduitMemory::axomAllocIdToConduit(getAllocatorID());

n_field["topology"] = topoName;
n_field["association"] = "element";
conduit::Node &n_values = n_field["values"];
conduit::Node& n_values = n_field["values"];
n_values.set_allocator(conduitAllocatorId);
n_values.set(conduit::DataType::float64(m_adaptor.numberOfZones()));
auto valuesView = bump::utilities::make_array_view<double>(n_values);
Expand Down
12 changes: 6 additions & 6 deletions src/axom/bump/CoordsetBlender.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ class CoordsetBlender
* a view and the coordset node since the view may not be able to contain
* some coordset metadata and remain trivially copyable.
*/
void execute(const BlendData &blend,
const CoordsetViewType &view,
const conduit::Node &n_input,
conduit::Node &n_output,
void execute(const BlendData& blend,
const CoordsetViewType& view,
const conduit::Node& n_input,
conduit::Node& n_output,
int allocator_id = axom::execution_space<ExecSpace>::allocatorID()) const
{
using value_type = typename CoordsetViewType::value_type;
Expand All @@ -73,7 +73,7 @@ class CoordsetBlender

n_output.reset();
n_output["type"] = "explicit";
conduit::Node &n_values = n_output["values"];
conduit::Node& n_values = n_output["values"];

// Determine output size.
const auto origSize = blend.m_originalIdsView.size();
Expand All @@ -85,7 +85,7 @@ class CoordsetBlender
for(size_t i = 0; i < nComponents; i++)
{
// Allocate data in the Conduit node and make a view.
conduit::Node &comp = n_values[axes[i]];
conduit::Node& comp = n_values[axes[i]];
comp.set_allocator(conduitAllocatorId);
comp.set(conduit::DataType(utils::cpp2conduit<value_type>::id, outputSize));
compViews[i] = utils::make_array_view<value_type>(comp);
Expand Down
10 changes: 5 additions & 5 deletions src/axom/bump/CoordsetExtents.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ struct ComputeCoordsetExtents
axom::for_all<ExecSpace>(
CoordsetView::dimension(),
AXOM_LAMBDA(axom::IndexType dim) {
double &minValue = extentsView[2 * dim];
double &maxValue = extentsView[2 * dim + 1];
double& minValue = extentsView[2 * dim];
double& maxValue = extentsView[2 * dim + 1];
minValue = axom::numeric_limits<double>::max();
maxValue = -axom::numeric_limits<double>::max();
});
Expand All @@ -55,8 +55,8 @@ struct ComputeCoordsetExtents
const auto pt = coordsetView[index];
for(int d = 0; d < CoordsetView::dimension(); d++)
{
double *minValue = extentsView.data() + 2 * d;
double *maxValue = minValue + 1;
double* minValue = extentsView.data() + 2 * d;
double* maxValue = minValue + 1;
const auto value = static_cast<double>(pt[d]);
axom::atomicMin<ExecSpace>(minValue, value);
axom::atomicMax<ExecSpace>(maxValue, value);
Expand Down Expand Up @@ -150,7 +150,7 @@ class CoordsetExtents
*
* \param coordsetView The coordset view that wraps the coordset to be examined.
*/
CoordsetExtents(const CoordsetView &coordsetView)
CoordsetExtents(const CoordsetView& coordsetView)
: m_coordsetView(coordsetView)
, m_allocator_id(axom::execution_space<ExecSpace>::allocatorID())
{ }
Expand Down
8 changes: 4 additions & 4 deletions src/axom/bump/CoordsetSlicer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class CoordsetSlicer
{
public:
/// Constructor
CoordsetSlicer(const CoordsetView &coordsetView)
CoordsetSlicer(const CoordsetView& coordsetView)
: m_coordsetView(coordsetView)
, m_allocator_id(axom::execution_space<ExecSpace>::allocatorID())
{ }
Expand Down Expand Up @@ -69,7 +69,7 @@ class CoordsetSlicer
*
* \note We assume for now that n_input != n_output.
*/
void execute(const SliceData &slice, const conduit::Node &n_input, conduit::Node &n_output)
void execute(const SliceData& slice, const conduit::Node& n_input, conduit::Node& n_output)
{
AXOM_ANNOTATE_SCOPE("CoordsetSlicer");
using value_type = typename CoordsetView::value_type;
Expand All @@ -88,7 +88,7 @@ class CoordsetSlicer

n_output.reset();
n_output["type"] = "explicit";
conduit::Node &n_values = n_output["values"];
conduit::Node& n_values = n_output["values"];

// Determine output size.
const auto outputSize = slice.m_indicesView.size();
Expand All @@ -98,7 +98,7 @@ class CoordsetSlicer
for(size_t i = 0; i < nComponents; i++)
{
// Allocate data in the Conduit node and make a view.
conduit::Node &comp = n_values[axes[i]];
conduit::Node& comp = n_values[axes[i]];
comp.set_allocator(conduitAllocatorId);
comp.set(conduit::DataType(utils::cpp2conduit<value_type>::id, outputSize));
compViews[i] = utils::make_array_view<value_type>(comp);
Expand Down
Loading