alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
ExpectedValueType.hpp
Go to the documentation of this file.
1/* Copyright 2025 Simeon Ehrig
2 * SPDX-License-Identifier: MPL-2.0
3 */
4
5#pragma once
6
7#include "alpaka/trait.hpp"
8
9#include <concepts>
10
11namespace alpaka::concepts
12{
13 /** Check whether the specified data type matches the expected type, or if the expected type is
14 *`alpaka::NotRequired`, then all data types passes the concept.
15 **/
16 template<typename T_Data, typename T_Expected>
17 concept ExpectedValueType = std::same_as<T_Expected, T_Data> || std::same_as<T_Expected, alpaka::NotRequired>;
18} // namespace alpaka::concepts
Check whether the specified data type matches the expected type, or if the expected type is alpaka::N...