alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
include
alpaka
simd
simdConfig.hpp
Go to the documentation of this file.
1
/* Copyright 2026 René Widera
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include "
alpaka/core/config.hpp
"
8
9
/* We can not include 'experimental/simd' with NVCC else we will trigger the compiler error:
10
* experimental/bits/simd.h(1537): error: invalid type conversion
11
* reinterpret_cast<__vector_type_t<float, 4>>(__v)));
12
*/
13
#if !ALPAKA_COMP_NVCC
14
15
# if !defined(ALPAKA_DISABLE_STD_SIMD)
16
# if __has_include(<simd>)
17
# include <simd>
18
namespace
alpakaStdSimd =
std
;
19
# if !defined(ALPAKA_HAS_STD_SIMD)
20
# define ALPAKA_HAS_STD_SIMD 1
21
# endif
22
# elif __has_include(<experimental/simd>)
23
# include <experimental/simd>
24
namespace
alpakaStdSimd = std::experimental;
25
# if !defined(ALPAKA_HAS_STD_SIMD)
26
# define ALPAKA_HAS_STD_SIMD 1
27
# endif
28
# endif
29
# endif
30
31
#endif
32
33
// In case it is not already set, set it to disabled, to ensure that his header is includes whereever the macro is
34
// used. If this header is not included compiler flag `-Wundef` will show an error.
35
#if !defined(ALPAKA_HAS_STD_SIMD)
36
# define ALPAKA_HAS_STD_SIMD 0
37
#endif
config.hpp
std
STL namespace.
Generated on
for alpaka by
1.16.1