Skip to content

Commit fc4a612

Browse files
Removed work-around applied to proj
The issue that was being work arround has been fixed in 2024.1 compiler
1 parent 72e38bc commit fc4a612

File tree

1 file changed

+3
-27
lines changed
  • dpctl/tensor/libtensor/include/kernels/elementwise_functions

1 file changed

+3
-27
lines changed

dpctl/tensor/libtensor/include/kernels/elementwise_functions/proj.hpp

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ using ProjStridedFunctor = elementwise_common::
108108

109109
template <typename T> struct ProjOutputType
110110
{
111-
using value_type = typename std::disjunction< // disjunction is C++17
112-
// feature, supported by DPC++
111+
// disjunction is C++17 feature, supported by DPC++
112+
using value_type = typename std::disjunction<
113113
td_ns::TypeMapResultEntry<T, std::complex<float>>,
114114
td_ns::TypeMapResultEntry<T, std::complex<double>>,
115115
td_ns::DefaultResultEntry<void>>::result_type;
@@ -130,30 +130,6 @@ sycl::event proj_contig_impl(sycl::queue &exec_q,
130130
exec_q, nelems, arg_p, res_p, depends);
131131
}
132132

133-
template <typename argTy>
134-
sycl::event
135-
proj_workaround_contig_impl(sycl::queue &exec_q,
136-
size_t nelems,
137-
const char *arg_p,
138-
char *res_p,
139-
const std::vector<sycl::event> &depends = {})
140-
{
141-
using resTy = typename ProjOutputType<argTy>::value_type;
142-
143-
const argTy *arg_tp = reinterpret_cast<const argTy *>(arg_p);
144-
resTy *res_tp = reinterpret_cast<resTy *>(res_p);
145-
146-
sycl::event e = exec_q.submit([&](sycl::handler &cgh) {
147-
cgh.depends_on(depends);
148-
cgh.parallel_for({nelems}, [=](sycl::id<1> id) {
149-
size_t i = id[0];
150-
res_tp[i] = ProjFunctor<argTy, resTy>{}(arg_tp[i]);
151-
});
152-
});
153-
154-
return e;
155-
}
156-
157133
template <typename fnT, typename T> struct ProjContigFactory
158134
{
159135
fnT get()
@@ -165,7 +141,7 @@ template <typename fnT, typename T> struct ProjContigFactory
165141
}
166142
else {
167143
if constexpr (std::is_same_v<T, std::complex<double>>) {
168-
fnT fn = proj_workaround_contig_impl<T>;
144+
fnT fn = proj_contig_impl<T>;
169145
return fn;
170146
}
171147
else {

0 commit comments

Comments
 (0)