alpaka
Abstraction Library for Parallel Kernel Acceleration
RemoveRestrict.hpp
Go to the documentation of this file.
1
/* Copyright 2021 Rene Widera
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include "
alpaka/core/BoostPredef.hpp
"
8
9
namespace
alpaka
10
{
11
//! Removes __restrict__ from a type
12
template
<
typename
T>
13
struct
remove_restrict
14
{
15
using
type
= T;
16
};
17
18
#if BOOST_COMP_MSVC
19
template
<
typename
T>
20
struct
remove_restrict
<T* __restrict>
21
{
22
using
type = T*;
23
};
24
#else
25
template
<
typename
T>
26
struct
remove_restrict
<T* __restrict__>
27
{
28
using
type
= T*;
29
};
30
#endif
31
32
//! Helper to remove __restrict__ from a type
33
template
<
typename
T>
34
using
remove_restrict_t
=
typename
remove_restrict<T>::type
;
35
}
// namespace alpaka
BoostPredef.hpp
alpaka
The alpaka accelerator library.
Definition:
AccCpuOmp2Blocks.hpp:49
alpaka::remove_restrict_t
typename remove_restrict< T >::type remove_restrict_t
Helper to remove restrict from a type.
Definition:
RemoveRestrict.hpp:34
alpaka::remove_restrict< T *__restrict__ >::type
T * type
Definition:
RemoveRestrict.hpp:28
alpaka::remove_restrict
Removes restrict from a type.
Definition:
RemoveRestrict.hpp:14
alpaka::remove_restrict::type
T type
Definition:
RemoveRestrict.hpp:15
include
alpaka
core
RemoveRestrict.hpp
Generated on Thu Dec 12 2024 11:51:45 for alpaka by
1.9.1