Skip to content

Commit bd7ea4d

Browse files
committed
mark some APIs as ESIMD_INLINE to avoid symbol duplication linker error.
Signed-off-by: Konstantin S Bobrovsky <[email protected]>
1 parent c07e6ac commit bd7ea4d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sycl/include/sycl/ext/intel/experimental/esimd/detail/elem_type_traits.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ struct element_type_traits<T, std::enable_if_t<is_vectorizable_v<T>>> {
152152
// These are default implementations for wrapper types with native cpp
153153
// operations support for their corresponding raw type.
154154
template <class WrapperTy, class StdTy, int N>
155-
vector_type_t<__raw_t<WrapperTy>, N>
155+
ESIMD_INLINE vector_type_t<__raw_t<WrapperTy>, N>
156156
__esimd_convertvector_to(vector_type_t<StdTy, N> Val)
157157
#ifdef __SYCL_DEVICE_ONLY__
158158
; // needs to be implemented for WrapperTy's for which
@@ -165,7 +165,7 @@ __esimd_convertvector_to(vector_type_t<StdTy, N> Val)
165165
#endif // __SYCL_DEVICE_ONLY__
166166

167167
template <class WrapperTy, class StdTy, int N>
168-
vector_type_t<StdTy, N>
168+
ESIMD_INLINE vector_type_t<StdTy, N>
169169
__esimd_convertvector_from(vector_type_t<__raw_t<WrapperTy>, N> Val)
170170
#ifdef __SYCL_DEVICE_ONLY__
171171
; // needs to be implemented for WrapperTy's for which
@@ -668,12 +668,12 @@ struct element_type_traits<T, std::enable_if_t<std::is_same_v<T, sycl::half>>> {
668668

669669
using half_raw = __raw_t<sycl::half>;
670670

671-
template <>
671+
template <> ESIMD_INLINE
672672
sycl::half __esimd_wrapper_type_bitcast_to<sycl::half>(half_raw Val) {
673673
return WrapperElementTypeProxy::bitcast_to_half(Val);
674674
}
675675

676-
template <>
676+
template <> ESIMD_INLINE
677677
half_raw __esimd_wrapper_type_bitcast_from<sycl::half>(sycl::half Val) {
678678
return WrapperElementTypeProxy::bitcast_from_half(Val);
679679
}

0 commit comments

Comments
 (0)