20 #ifndef __SYCL_DEVICE_ONLY__
27 template <
bool Cond,
typename TrueT,
typename FalseT>
struct conditional {
30 template <
typename TrueT,
typename FalseT>
63 static constexpr
const char *
getName() {
return ""; }
76 #ifndef __SYCL_UNNAMED_LAMBDA__
83 static constexpr
const char *
getName() {
return ""; }
84 static constexpr
bool isESIMD() {
return 0; }
92 template <
char...>
struct KernelInfoData {
93 static constexpr
unsigned getNumParams() {
return 0; }
94 static const kernel_param_desc_t &getParamDesc(
int Idx) {
95 static kernel_param_desc_t Dummy;
98 static constexpr
const char *getName() {
return ""; }
99 static constexpr
bool isESIMD() {
return 0; }
100 static constexpr
const char *getFileName() {
return ""; }
101 static constexpr
const char *getFunctionName() {
return ""; }
102 static constexpr
unsigned getLineNumber() {
return 0; }
103 static constexpr
unsigned getColumnNumber() {
return 0; }
104 static constexpr
int64_t getKernelSize() {
return 0; }
109 template <
class T, T...>
struct integer_sequence {};
110 template <
unsigned long long... I>
111 using index_sequence = integer_sequence<
unsigned long long, I...>;
112 template <
unsigned long long N>
113 using make_index_sequence =
114 __make_integer_seq<integer_sequence, unsigned long long, N>;
116 template <
typename T>
struct KernelInfoImpl {
118 static constexpr
auto n = __builtin_sycl_unique_stable_name(T);
119 template <
unsigned long long... I>
120 static KernelInfoData<n[I]...> impl(index_sequence<I...>) {
125 using type = decltype(impl(make_index_sequence<__builtin_strlen(n)>{}));
133 template <
class KernelNameType>
struct KernelInfo {
134 using SubKernelInfo =
typename KernelInfoImpl<KernelNameType>::type;
135 static constexpr
unsigned getNumParams() {
136 return SubKernelInfo::getNumParams();
138 static const kernel_param_desc_t &getParamDesc(
int Idx) {
139 return SubKernelInfo::getParamDesc(Idx);
141 static constexpr
const char *getName() {
return SubKernelInfo::getName(); }
142 static constexpr
bool isESIMD() {
return SubKernelInfo::isESIMD(); }
143 static constexpr
const char *getFileName() {
return ""; }
144 static constexpr
const char *getFunctionName() {
return ""; }
145 static constexpr
unsigned getLineNumber() {
return 0; }
146 static constexpr
unsigned getColumnNumber() {
return 0; }
147 static constexpr
int64_t getKernelSize() {
148 return SubKernelInfo::getKernelSize();
151 #endif //__SYCL_UNNAMED_LAMBDA__