PACMAN 0.1.0
Portable Algorithms for Coupling, Mapping, and Adaptive iNterpolation
Loading...
Searching...
No Matches
types.hpp
Go to the documentation of this file.
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
6#pragma once
7
8#include <KokkosKernels_ArithTraits.hpp>
9#include <Kokkos_Core.hpp>
10#include <cstdint>
11#include <iomanip>
12#include <limits>
13
14namespace PACMAN {
15typedef double fp_t;
16typedef double coordinates_t;
17
18typedef int32_t int_t;
19typedef int32_t shortint_t;
20typedef uint32_t index_t;
21typedef int32_t offset_t;
22
23// types optionnels pour expliciter le type sous jacent des enums
24typedef int32_t method_t;
25typedef int32_t cell_t;
26typedef int32_t status_t;
27typedef int32_t geosupport_t;
28
35 RBF_PUM = 0xF5,
36 MLS = 0xF6,
37};
38
46
59
83
84namespace fp_consts {
85KOKKOS_INLINE_FUNCTION fp_t min(void) {
86 return KokkosKernels::ArithTraits<fp_t>::min();
87}
88
89KOKKOS_INLINE_FUNCTION fp_t max(void) {
90 return KokkosKernels::ArithTraits<fp_t>::max();
91}
92KOKKOS_INLINE_FUNCTION consteval fp_t zero(void) {
93 return static_cast<fp_t>(0.0);
94}
95KOKKOS_INLINE_FUNCTION consteval fp_t one(void) {
96 return static_cast<fp_t>(1.0);
97}
98KOKKOS_INLINE_FUNCTION consteval fp_t epsilon(void) { return 1.0e-14; }
99// LCOV_EXCL_START
100constexpr unsigned int precision = std::numeric_limits<fp_t>::max_digits10;
101inline auto set_precision(void) {
102 return std::setprecision(fp_consts::precision);
103}
104// LCOV_EXCL_STOP
105}; // namespace fp_consts
106
107} // namespace PACMAN
KOKKOS_INLINE_FUNCTION consteval fp_t zero(void)
Definition types.hpp:92
constexpr unsigned int precision
Definition types.hpp:100
KOKKOS_INLINE_FUNCTION consteval fp_t epsilon(void)
Definition types.hpp:98
auto set_precision(void)
Definition types.hpp:101
KOKKOS_INLINE_FUNCTION fp_t max(void)
Definition types.hpp:89
KOKKOS_INLINE_FUNCTION consteval fp_t one(void)
Definition types.hpp:95
KOKKOS_INLINE_FUNCTION fp_t min(void)
Definition types.hpp:85
double fp_t
Definition types.hpp:15
double coordinates_t
Definition types.hpp:16
TransferStatus
Definition types.hpp:39
int32_t geosupport_t
Definition types.hpp:27
int32_t status_t
Definition types.hpp:26
int32_t cell_t
Definition types.hpp:25
uint32_t index_t
Definition types.hpp:20
int32_t offset_t
Definition types.hpp:21
GeoSupport
Definition types.hpp:47
int32_t shortint_t
Definition types.hpp:19
TransferMethods
Definition types.hpp:29
int32_t method_t
Definition types.hpp:24
int32_t int_t
Definition types.hpp:18
CellType
Definition types.hpp:60
@ VTK_QUADRATIC_HEXAHEDRON
Definition types.hpp:79
@ VTK_QUADRATIC_PYRAMID
Definition types.hpp:81
@ VTK_QUADRATIC_TRIANGLE
Definition types.hpp:71