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
42
43#ifndef OPENSWMM_ENGINE_2D_GPU_KOKKOS_TYPES_HPP
44#define OPENSWMM_ENGINE_2D_GPU_KOKKOS_TYPES_HPP
45
46#include <Kokkos_Core.hpp>
47
48namespace openswmm::twoD::gpu {
49
50#if defined(OPENSWMM_GPU_EXECSPACE_CUDA)
51using ExecSpace = Kokkos::Cuda;
52#elif defined(OPENSWMM_GPU_EXECSPACE_HIP)
53using ExecSpace = Kokkos::HIP;
54#elif defined(OPENSWMM_GPU_EXECSPACE_SYCL)
55using ExecSpace = Kokkos::SYCL;
56#elif defined(OPENSWMM_GPU_EXECSPACE_OPENMP)
57using ExecSpace = Kokkos::OpenMP;
58#else
59using ExecSpace = Kokkos::DefaultExecutionSpace;
60#endif
61using MemSpace = ExecSpace::memory_space;
62
63using DView = Kokkos::View<double*, MemSpace>;
64using CDView = Kokkos::View<const double*, MemSpace>;
65using IView = Kokkos::View<int*, MemSpace>;
66using CIView = Kokkos::View<const int*, MemSpace>;
67
68} // namespace openswmm::twoD::gpu
69
70#endif // OPENSWMM_ENGINE_2D_GPU_KOKKOS_TYPES_HPP
Definition ExplicitKokkosSurfaceSolver.cpp:36
Kokkos::View< int *, MemSpace > IView
mutable int array
Definition KokkosTypes.hpp:65
Kokkos::DefaultExecutionSpace ExecSpace
Definition KokkosTypes.hpp:59
Kokkos::View< double *, MemSpace > DView
mutable double array
Definition KokkosTypes.hpp:63
ExecSpace::memory_space MemSpace
Definition KokkosTypes.hpp:61
Kokkos::View< const double *, MemSpace > CDView
const double array
Definition KokkosTypes.hpp:64
Kokkos::View< const int *, MemSpace > CIView
const int array
Definition KokkosTypes.hpp:66