21 #ifndef ROCPRIM_TYPES_HPP_ 22 #define ROCPRIM_TYPES_HPP_ 24 #include <type_traits> 29 #include "types/future_value.hpp" 30 #include "types/double_buffer.hpp" 31 #include "types/integer_sequence.hpp" 32 #include "types/key_value_pair.hpp" 33 #include "types/tuple.hpp" 38 BEGIN_ROCPRIM_NAMESPACE
46 #define DEFINE_VECTOR_TYPE(name, base) \ 48 struct alignas(sizeof(base) * 2) name##2 \ 50 typedef base vector_value_type __attribute__((ext_vector_type(2))); \ 52 vector_value_type data; \ 53 struct { base x, y; }; \ 57 struct alignas(sizeof(base) * 4) name##4 \ 59 typedef base vector_value_type __attribute__((ext_vector_type(4))); \ 61 vector_value_type data; \ 62 struct { base x, y, w, z; }; \ 66 #define DEFINE_VECTOR_TYPE(name, base) \ 68 struct alignas(sizeof(base) * 2) name##2 \ 70 typedef base vector_value_type; \ 72 vector_value_type data; \ 73 struct { base x, y; }; \ 77 struct alignas(sizeof(base) * 4) name##4 \ 79 typedef base vector_value_type; \ 81 vector_value_type data; \ 82 struct { base x, y, w, z; }; \ 88 #pragma warning( push ) 89 #pragma warning( disable : 4201 ) // nonstandard extension used: nameless struct/union 91 DEFINE_VECTOR_TYPE(
char,
char);
92 DEFINE_VECTOR_TYPE(
short,
short);
93 DEFINE_VECTOR_TYPE(
int,
int);
94 DEFINE_VECTOR_TYPE(longlong,
long long);
96 #pragma warning( pop ) 99 template <
class T,
unsigned int NumElements>
105 #define DEFINE_MAKE_VECTOR_N_TYPE(name, base, suffix) \ 107 struct make_vector_type<base, suffix> \ 109 using type = name##suffix; \ 112 #define DEFINE_MAKE_VECTOR_TYPE(name, base) \ 115 struct make_vector_type<base, 1> \ 119 DEFINE_MAKE_VECTOR_N_TYPE(name, base, 2) \ 120 DEFINE_MAKE_VECTOR_N_TYPE(name, base, 4) 122 DEFINE_MAKE_VECTOR_TYPE(
char,
char);
123 DEFINE_MAKE_VECTOR_TYPE(
short,
short);
124 DEFINE_MAKE_VECTOR_TYPE(
int,
int);
125 DEFINE_MAKE_VECTOR_TYPE(longlong,
long long);
127 #undef DEFINE_VECTOR_TYPE 128 #undef DEFINE_MAKE_VECTOR_TYPE 129 #undef DEFINE_MAKE_VECTOR_N_TYPE 151 #ifndef __AMDGCN_WAVEFRONT_SIZE 154 #define __AMDGCN_WAVEFRONT_SIZE 64 156 #if __AMDGCN_WAVEFRONT_SIZE == 32 163 #elif __AMDGCN_WAVEFRONT_SIZE == 64 168 #ifdef __HIP_CPU_RT__ 175 #ifdef __HIP_CPU_RT__ 182 END_ROCPRIM_NAMESPACE
187 #endif // ROCPRIM_TYPES_HPP_ Empty type used as a placeholder, usually used to flag that given template parameter should not be us...
Definition: types.hpp:135
Definition: types.hpp:100
constexpr empty_type operator()(const empty_type &, const empty_type &) const
Invocation operator.
Definition: types.hpp:142
Deprecated: Configuration of device-level scan primitives.
Definition: block_histogram.hpp:62
::hip_bfloat16 bfloat16
bfloat16 floating point type
Definition: types.hpp:148
bfloat16 native_bfloat16
native bfloat16 type
Definition: types.hpp:179
_Float16 native_half
Native half-precision floating point type.
Definition: types.hpp:171
unsigned long long int lane_mask_type
The lane_mask_type is an integer that contains one bit per thread.
Definition: types.hpp:164
Binary operator that takes two instances of empty_type, usually used as nop replacement for the HIP-C...
Definition: types.hpp:139
::__half half
Half-precision floating point type.
Definition: types.hpp:146