Skip to content

Commit 9a3d449

Browse files
authored
Add AMReX_Order.H (#4517)
Clean up includes: SmallMatrix does not need to be included in other base files like Array just because we use the order enum. Simplify include logic/chains.
1 parent 6370000 commit 9a3d449

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

Src/Base/AMReX_Array.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <AMReX_REAL.H>
1111
#include <AMReX_Algorithm.H>
1212
#include <AMReX_Dim3.H>
13-
#include <AMReX_SmallMatrix.H>
13+
#include <AMReX_Order.H>
1414

1515
#include <array>
1616
#include <memory>

Src/Base/AMReX_Order.H

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef AMREX_ORDER_H_
2+
#define AMREX_ORDER_H_
3+
#include <AMReX_Config.H>
4+
5+
namespace amrex
6+
{
7+
enum struct Order { C, F, RowMajor=C, ColumnMajor=F };
8+
}
9+
#endif
10+

Src/Base/AMReX_SmallMatrix.H

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <AMReX_Extension.H>
88
#include <AMReX_GpuQualifiers.H>
99
#include <AMReX_ConstexprFor.H>
10+
#include <AMReX_Order.H>
1011

1112
#include <algorithm>
1213
#include <initializer_list>
@@ -16,8 +17,6 @@
1617

1718
namespace amrex {
1819

19-
enum struct Order { C, F, RowMajor=C, ColumnMajor=F };
20-
2120
/**
2221
* \brief Matrix class with compile-time size
2322
*

Src/Base/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ foreach(D IN LISTS AMReX_SPACEDIM)
1414
AMReX_BlockMutex.cpp
1515
AMReX_Enum.H
1616
AMReX_GpuComplex.H
17+
AMReX_Order.H
1718
AMReX_SmallMatrix.H
1819
AMReX_ConstexprFor.H
1920
AMReX_Vector.H

Src/Base/Make.package

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ AMREX_BASE=EXE
44
C$(AMREX_BASE)_headers += AMReX_ccse-mpi.H AMReX_Algorithm.H AMReX_Any.H AMReX_Array.H
55
C$(AMREX_BASE)_headers += AMReX_Enum.H
66
C$(AMREX_BASE)_headers += AMReX_Vector.H AMReX_TableData.H AMReX_Tuple.H AMReX_Math.H
7+
C$(AMREX_BASE)_headers += AMReX_Order.H
78
C$(AMREX_BASE)_headers += AMReX_SmallMatrix.H AMReX_ConstexprFor.H
89

910
C$(AMREX_BASE)_headers += AMReX_TypeList.H

0 commit comments

Comments
 (0)