Skip to content

Commit

Permalink
Maybe just use index_t
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarusz committed Nov 11, 2023
1 parent f35317a commit a6e7eb8
Show file tree
Hide file tree
Showing 13 changed files with 229 additions and 227 deletions.
1 change: 1 addition & 0 deletions dynamics/spam/src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ using yakl::c::SimpleBounds;

using ulong = unsigned long;
using uint = unsigned int;
using yakl::index_t;

////////////// These control the settings for SPAM++ //////////////

Expand Down
6 changes: 3 additions & 3 deletions dynamics/spam/src/operators/TransformMatrices_variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace pamc {
namespace TransformMatrices_variable {

template <auto ord>
template <index_t ord>
YAKL_INLINE void coefs_to_sten_variable(SArray<real, 1, ord + 1> const &locs,
SArray<real, 2, ord, ord> &rslt) {
// Create the Vandermonde matrix
Expand All @@ -30,7 +30,7 @@ YAKL_INLINE void coefs_to_sten_variable(SArray<real, 1, ord + 1> const &locs,
}
}

template <auto ord>
template <index_t ord>
YAKL_INLINE void sten_to_coefs_variable(SArray<real, 1, ord + 1> const &locs,
SArray<real, 2, ord, ord> &rslt) {
using yakl::intrinsics::matinv_ge;
Expand All @@ -43,7 +43,7 @@ YAKL_INLINE void sten_to_coefs_variable(SArray<real, 1, ord + 1> const &locs,
rslt = yakl::intrinsics::matinv_ge(c2s);
}

template <auto ord>
template <index_t ord>
YAKL_INLINE void
weno_lower_sten_to_coefs(SArray<real, 1, ord + 1> const &locs,
SArray<real, 3, (ord - 1) / 2 + 1, (ord - 1) / 2 + 1,
Expand Down
12 changes: 6 additions & 6 deletions dynamics/spam/src/operators/cfv_recon.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace pamc {
// THIS IS TRUE WITH HOW GRID IS CONSTRUCTED, AND ALSO REQUIRED FOR 2ND ORDER
// ACCURACY IN THE VERTICAL ANYWAYS...
// ALSO ONLY DEFINED FOR ORD=1
template <auto ndofs, auto ord>
template <index_t ndofs, index_t ord>
void YAKL_INLINE cfv_vert(SArray<real, 2, ndofs, 2> &edgerecon,
SArray<real, 2, ndofs, ord> const &dens) {
for (int l = 0; l < ndofs; l++) {
Expand All @@ -17,7 +17,7 @@ void YAKL_INLINE cfv_vert(SArray<real, 2, ndofs, 2> &edgerecon,
}
}

template <auto ndofs, auto nd>
template <index_t ndofs, index_t nd>
void YAKL_INLINE cfv(SArray<real, 3, ndofs, nd, 2> &edgerecon,
SArray<real, 3, ndofs, nd, 1> const &dens) {
for (int l = 0; l < ndofs; l++) {
Expand All @@ -28,7 +28,7 @@ void YAKL_INLINE cfv(SArray<real, 3, ndofs, nd, 2> &edgerecon,
}
}

template <auto ndofs, auto nd>
template <index_t ndofs, index_t nd>
void YAKL_INLINE cfv(SArray<real, 3, ndofs, nd, 2> &edgerecon,
SArray<real, 3, ndofs, nd, 3> const &dens) {
real er;
Expand All @@ -42,7 +42,7 @@ void YAKL_INLINE cfv(SArray<real, 3, ndofs, nd, 2> &edgerecon,
}
}

template <auto ndofs, auto nd>
template <index_t ndofs, index_t nd>
void YAKL_INLINE cfv(SArray<real, 3, ndofs, nd, 2> &edgerecon,
SArray<real, 3, ndofs, nd, 5> const &dens) {
real er;
Expand All @@ -57,7 +57,7 @@ void YAKL_INLINE cfv(SArray<real, 3, ndofs, nd, 2> &edgerecon,
}
}

template <auto ndofs, auto nd>
template <index_t ndofs, index_t nd>
void YAKL_INLINE cfv(SArray<real, 3, ndofs, nd, 2> &edgerecon,
SArray<real, 3, ndofs, nd, 7> const &dens) {
real er;
Expand All @@ -73,7 +73,7 @@ void YAKL_INLINE cfv(SArray<real, 3, ndofs, nd, 2> &edgerecon,
}
}

template <auto ndofs, auto nd>
template <index_t ndofs, index_t nd>
void YAKL_INLINE cfv(SArray<real, 3, ndofs, nd, 2> &edgerecon,
SArray<real, 3, ndofs, nd, 9> const &dens) {
real er;
Expand Down
Loading

0 comments on commit a6e7eb8

Please sign in to comment.