Skip to content

Commit

Permalink
Fixed namespace issues that were breaking build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jennloe committed Apr 1, 2022
1 parent be45977 commit 925e82c
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 22 deletions.
12 changes: 6 additions & 6 deletions src/batched/ode/tftk_DeviceODESolverState.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//#include "tftk_util/tftk_KokkosTypes.h"
#include "tftk_KokkosTypes.h"

namespace tftk {
namespace KokkosBatched {
namespace ode {

struct StackAllocationTag;
Expand All @@ -27,9 +27,9 @@ struct RkStack {
using type = StackAllocationTag;

using V1 =
Kokkos::View<double[NDOFS], tftk::AnonSpace, Kokkos::MemoryUnmanaged>;
Kokkos::View<double[NDOFS], AnonSpace, Kokkos::MemoryUnmanaged>;
using V2 = Kokkos::View<double[NSTAGES][NDOFS], Kokkos::LayoutRight,
tftk::AnonSpace, Kokkos::MemoryUnmanaged>;
AnonSpace, Kokkos::MemoryUnmanaged>;
using Arr1 = Kokkos::Array<double, NDOFS>;
using Arr2 = Kokkos::Array<double, NSTAGES * NDOFS>;
Arr1 y;
Expand Down Expand Up @@ -81,9 +81,9 @@ struct RkSolverState {
std::conditional_t<std::is_same<Type, StackAllocationTag>::value,
Kokkos::LayoutRight, Kokkos::LayoutStride>;
using View1 =
Kokkos::View<double *, Layout, tftk::AnonSpace, Kokkos::MemoryUnmanaged>;
Kokkos::View<double *, Layout, AnonSpace, Kokkos::MemoryUnmanaged>;
using View2 =
Kokkos::View<double **, Layout, tftk::AnonSpace, Kokkos::MemoryUnmanaged>;
Kokkos::View<double **, Layout, AnonSpace, Kokkos::MemoryUnmanaged>;

KOKKOS_FORCEINLINE_FUNCTION int ndofs() const {
return static_cast<int>(y.extent(0));
Expand Down Expand Up @@ -154,6 +154,6 @@ struct RkSolverState {
};

} // namespace ode
} // namespace tftk
} // namespace KokkosBatched

#endif
8 changes: 4 additions & 4 deletions src/batched/ode/tftk_DeviceODESolverStatus.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define SIERRA_tftk_DeviceODESolverStatus_h

#include <ostream>
namespace tftk {
namespace KokkosBatched {
namespace ode {
enum class ODESolverStatus {
SUCCESS = 0,
Expand All @@ -19,7 +19,7 @@ enum class ODESolverStatus {
NONFINITE_STATE
};

std::ostream& operator<<(std::ostream& os, ODESolverStatus status);
//std::ostream& operator<<(std::ostream& os, ODESolverStatus status);
} // namespace ode
} // namespace tftk
#endif
} // namespace KokkosBatched
#endif
4 changes: 2 additions & 2 deletions src/batched/ode/tftk_DeviceODESolvers.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <type_traits>

namespace tftk {
namespace KokkosBatched {
namespace ode {

KOKKOS_FORCEINLINE_FUNCTION double tol(const double y, const double y0,
Expand Down Expand Up @@ -167,6 +167,6 @@ struct RungeKuttaSolver {
const SolverControls controls;
};
} // namespace ode
} // namespace tftk
} // namespace KokkosBatched

#endif
4 changes: 2 additions & 2 deletions src/batched/ode/tftk_KokkosTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//#include <tftk_util/tftk_Macros.h>
#include <tftk_Macros.h>

namespace tftk {
namespace KokkosBatched {

using HostSpace = Kokkos::HostSpace;

Expand Down Expand Up @@ -70,6 +70,6 @@ using Array2d = Kokkos::View<T **, Kokkos::LayoutRight, UVMSpace>;

template <class T>
using Array3d = Kokkos::View<T ***, Kokkos::LayoutRight, UVMSpace>;
} // namespace tftk
} // namespace KokkosBatched

#endif /* TFTK_TFTK_UTIL_TFTK_UTIL_TFTK_KOKKOSTYPES_H_ */
4 changes: 2 additions & 2 deletions src/batched/ode/tftk_ODEArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <limits>
//#include <stk_util/diag/String.hpp>

namespace tftk {
namespace KokkosBatched {
namespace ode {

enum class ODESolverType {
Expand Down Expand Up @@ -73,6 +73,6 @@ struct SolverControls {
const bool is_adaptive;
};
} // namespace ode
} // namespace tftk
} // namespace KokkosBatched

#endif
6 changes: 3 additions & 3 deletions src/batched/ode/tftk_RungeKuttaTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <Kokkos_Array.hpp>

namespace tftk {
namespace KokkosBatched {
namespace ode {
//=====================================================================
// Generalized RK Explicit ODE solver with embedded error estimation
Expand Down Expand Up @@ -182,6 +182,6 @@ struct DormandPrince // Referred to as DOPRI5
11.0 / 84.0 - 187.0 / 2100.0, -1.0 / 40.0}};
};
} // namespace ode
} // namespace tftk
} // namespace KokkosBatched

#endif
#endif
6 changes: 3 additions & 3 deletions src/batched/ode/tftk_TestODEs.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <Kokkos_Macros.hpp>
#include <Kokkos_ArithTraits.hpp>

namespace tftk {
namespace KokkosBatched {
namespace ode {

struct DegreeOnePoly {
Expand Down Expand Up @@ -414,6 +414,6 @@ struct EnrightD4 {
};

} // namespace ode
} // namespace tftk
} // namespace KokkosBatched

#endif
#endif
6 changes: 6 additions & 0 deletions unit_test/batched/ode/Test_Batched_ODE_Performance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
#include <tftk_TestODEs.h>
#include <tftk_ODEArgs.h>

namespace KokkosBatched{
namespace ode{

template <typename MemorySpace, typename ODEType, typename SolverType>
void scratch_kernel(const ODEType &ode, const SolverType &solver,
const int nelems) {
Expand Down Expand Up @@ -237,4 +240,7 @@ TEST_F(TestCategory, ODE_RKPerformance) {
<< dt_host_scratch / dt_host_stack << "\n";
}

} //namespace ode
} //namespace KokkosBatched

#endif
6 changes: 6 additions & 0 deletions unit_test/batched/ode/Test_Batched_ODE_Solve.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
#include <tftk_TestODEs.h>
#include <tftk_ODEArgs.h>

namespace KokkosBatched{
namespace ode{

template <typename SolverState, typename MemorySpace, typename ODEType,
typename SolverType>
void kernel(int nelems, const ODEType &ode, const SolverType &solver,
Expand Down Expand Up @@ -432,4 +435,7 @@ TEST_F(TestCategory, ODE_RKSingleStep) {
check_single_step(dt, s.table, state, ke);
}

} //namespace ode
} //namespace KokkosBatched

#endif

0 comments on commit 925e82c

Please sign in to comment.