OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
KokkosTypes.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2//
3// Copyright 2026 Caleb Buahin
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
23
49
50#ifndef OPENSWMM_ENGINE_2D_GPU_KOKKOS_TYPES_HPP
51#define OPENSWMM_ENGINE_2D_GPU_KOKKOS_TYPES_HPP
52
53#include <Kokkos_Core.hpp>
54
55namespace openswmm::twoD::gpu {
56
57#if defined(OPENSWMM_GPU_EXECSPACE_CUDA)
58using ExecSpace = Kokkos::Cuda;
59#elif defined(OPENSWMM_GPU_EXECSPACE_HIP)
60using ExecSpace = Kokkos::HIP;
61#elif defined(OPENSWMM_GPU_EXECSPACE_SYCL)
62using ExecSpace = Kokkos::SYCL;
63#elif defined(OPENSWMM_GPU_EXECSPACE_OPENMP)
64using ExecSpace = Kokkos::OpenMP;
65#else
66using ExecSpace = Kokkos::DefaultExecutionSpace;
67#endif
68using MemSpace = ExecSpace::memory_space;
69
70using DView = Kokkos::View<double*, MemSpace>;
71using CDView = Kokkos::View<const double*, MemSpace>;
72using IView = Kokkos::View<int*, MemSpace>;
73using CIView = Kokkos::View<const int*, MemSpace>;
74
75} // namespace openswmm::twoD::gpu
76
77#endif // OPENSWMM_ENGINE_2D_GPU_KOKKOS_TYPES_HPP
Definition ExplicitKokkosSurfaceSolver.cpp:48
Kokkos::View< int *, MemSpace > IView
mutable int array
Definition KokkosTypes.hpp:72
Kokkos::DefaultExecutionSpace ExecSpace
Definition KokkosTypes.hpp:66
Kokkos::View< double *, MemSpace > DView
mutable double array
Definition KokkosTypes.hpp:70
ExecSpace::memory_space MemSpace
Definition KokkosTypes.hpp:68
Kokkos::View< const double *, MemSpace > CDView
const double array
Definition KokkosTypes.hpp:71
Kokkos::View< const int *, MemSpace > CIView
const int array
Definition KokkosTypes.hpp:73