-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathArborX_PairValueIndex.hpp
51 lines (38 loc) · 1.49 KB
/
ArborX_PairValueIndex.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/****************************************************************************
* Copyright (c) 2025, ArborX authors *
* All rights reserved. *
* *
* This file is part of the ArborX library. ArborX is *
* distributed under a BSD 3-clause license. For the licensing terms see *
* the LICENSE file in the top-level directory. *
* *
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/
#ifndef ARBORX_PAIR_VALUE_INDEX_HPP
#define ARBORX_PAIR_VALUE_INDEX_HPP
#include <Kokkos_Macros.hpp>
#include <type_traits>
namespace ArborX
{
template <typename Value, typename Index = unsigned>
struct PairValueIndex
{
static_assert(std::is_integral_v<Index>);
using value_type = Value;
using index_type = Index;
Value value;
Index index;
};
namespace Details
{
template <typename T>
struct is_pair_value_index : public std::false_type
{};
template <typename Value, typename Index>
struct is_pair_value_index<PairValueIndex<Value, Index>> : public std::true_type
{};
template <typename T>
inline constexpr bool is_pair_value_index_v = is_pair_value_index<T>::value;
} // namespace Details
} // namespace ArborX
#endif