Eigen-Contrib  5.0.1
 
Loading...
Searching...
No Matches
Meta.h
1// This file is part of Eigen, a lightweight C++ template library
2// for linear algebra.
3//
4// This Source Code Form is subject to the terms of the Mozilla
5// Public License v. 2.0. If a copy of the MPL was not distributed
6// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7// SPDX-FileCopyrightText: The Eigen Authors
8// SPDX-License-Identifier: MPL-2.0
9
10#ifndef EIGEN_GPU_META_H
11#define EIGEN_GPU_META_H
12
13// IWYU pragma: private
14#include "./InternalHeaderCheck.h"
15#include <type_traits>
16
17namespace Eigen {
18namespace gpu {
19namespace internal {
20
21template <typename T>
22using require_t = std::enable_if_t<std::decay_t<T>::value, int>;
23
24template <typename T>
25using require_not_t = std::enable_if_t<!std::decay_t<T>::value, int>;
26
27template <typename T1, typename T2>
28using require_same_t = require_t<std::is_same<std::decay_t<T1>, std::decay_t<T2>>>;
29
30template <typename T1, typename T2>
31using require_not_same_t = require_not_t<std::is_same<std::decay_t<T1>, std::decay_t<T2>>>;
32
33template <bool... Values>
34using require_all_t = require_t<Eigen::internal::reduce_all<Values...>>;
35
36} // namespace internal
37} // namespace gpu
38} // namespace Eigen
39
40#endif // EIGEN_GPU_META_H
Namespace containing all symbols from the Eigen library.