NeoN
A framework for CFD software
Loading...
Searching...
No Matches
include
NeoN
core
primitives
label.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2023 - 2026 NeoN authors
2
//
3
// SPDX-License-Identifier: MIT
4
5
#pragma once
6
7
#include <cstdint>
8
9
#include "
NeoN/core/primitives/traits.hpp
"
10
30
namespace
NeoN
31
{
32
#ifdef NeoN_DP_LABEL
33
using
label
= int64_t;
34
35
#ifdef NeoN_US_IDX
36
using
localIdx
= uint32_t;
37
using
globalIdx
= uint64_t;
38
#else
39
using
localIdx
= int64_t;
40
using
globalIdx
= int64_t;
41
#endif
42
43
#else
44
using
label
= int32_t;
45
46
#ifdef NeoN_US_IDX
47
using
localIdx
= uint32_t;
48
using
globalIdx
= uint64_t;
49
#else
50
using
localIdx
= int32_t;
51
using
globalIdx
= int64_t;
52
#endif
53
54
#endif
55
56
using
size_t
= std::size_t;
57
using
mpi_label_t
= int;
58
59
// traits for label
60
template
<>
61
KOKKOS_INLINE_FUNCTION
localIdx
one<localIdx>
()
62
{
63
return
1;
64
};
65
66
template
<>
67
KOKKOS_INLINE_FUNCTION
localIdx
zero<localIdx>
()
68
{
69
return
0;
70
};
71
72
}
NeoN
Integer types used throughout NeoN.
Definition
array.hpp:18
NeoN::globalIdx
int64_t globalIdx
Definition
label.hpp:51
NeoN::localIdx
int32_t localIdx
Definition
label.hpp:50
NeoN::size_t
std::size_t size_t
Definition
label.hpp:56
NeoN::one< localIdx >
KOKKOS_INLINE_FUNCTION localIdx one< localIdx >()
Definition
label.hpp:61
NeoN::zero< localIdx >
KOKKOS_INLINE_FUNCTION localIdx zero< localIdx >()
Definition
label.hpp:67
NeoN::mpi_label_t
int mpi_label_t
Definition
label.hpp:57
NeoN::label
int32_t label
Definition
label.hpp:44
traits.hpp
Generated by
1.9.8