alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
Traits.hpp
Go to the documentation of this file.
1
/* Copyright 2022 Benjamin Worpitz, Bernhard Manfred Gruber
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include <type_traits>
8
9
namespace
alpaka
10
{
11
//! The element trait.
12
namespace
trait
13
{
14
//! The element type trait.
15
template
<
typename
TView,
typename
TSfinae =
void
>
16
struct
ElemType
;
17
}
// namespace trait
18
19
//! The element type trait alias template to remove the ::type.
20
template
<
typename
TView>
21
using
Elem
= std::remove_volatile_t<typename trait::ElemType<TView>::type>;
22
23
// Trait specializations for unsigned integral types.
24
namespace
trait
25
{
26
//! The fundamental type elem type trait specialization.
27
template
<
typename
T>
28
struct
ElemType
<T,
std
::enable_if_t<std::is_fundamental_v<T>>>
29
{
30
using
type
= T;
31
};
32
}
// namespace trait
33
}
// namespace alpaka
alpaka
The alpaka accelerator library.
Definition
AccCpuOmp2Blocks.hpp:49
alpaka::Elem
std::remove_volatile_t< typename trait::ElemType< TView >::type > Elem
The element type trait alias template to remove the ::type.
Definition
Traits.hpp:21
std
STL namespace.
alpaka::trait::ElemType< T, std::enable_if_t< std::is_fundamental_v< T > > >::type
T type
Definition
Traits.hpp:30
alpaka::trait::ElemType
The element type trait.
Definition
Traits.hpp:16
include
alpaka
elem
Traits.hpp
Generated on Tue Feb 4 2025 09:02:23 for alpaka by
1.9.8