Skip to content

Commit d27706b

Browse files
Use PSTL-prefixed macro along with ONEDPL one (#1195)
This is a fix after #1182 PR to make these changes valid for a version where PSTL is used (upstream) Signed-off-by: Dmitriy Sobolev <[email protected]>
1 parent 234b3ae commit d27706b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/oneapi/dpl/pstl/glue_memory_impl.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,15 @@ destroy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __
229229
const auto __is_parallel =
230230
oneapi::dpl::__internal::__is_parallelization_preferred<_ExecutionPolicy, _ForwardIterator>(__exec);
231231
using _is_vector_type =
232-
#if _ONEDPL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN
232+
#if (_PSTL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN || _ONEDPL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN)
233233
::std::conditional_t<
234234
oneapi::dpl::__internal::__is_host_execution_policy<::std::decay_t<_ExecutionPolicy>>::value,
235235
::std::false_type,
236236
decltype(oneapi::dpl::__internal::__is_vectorization_preferred<_ExecutionPolicy, _ForwardIterator>(
237237
__exec))>;
238238
#else
239239
decltype(oneapi::dpl::__internal::__is_vectorization_preferred<_ExecutionPolicy, _ForwardIterator>(__exec));
240-
#endif // _ONEDPL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN
240+
#endif // _PSTL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN || _ONEDPL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN
241241
constexpr _is_vector_type __is_vector;
242242

243243
if constexpr (!::std::is_trivially_destructible_v<_ValueType>)
@@ -258,15 +258,15 @@ destroy_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n)
258258
const auto __is_parallel =
259259
oneapi::dpl::__internal::__is_parallelization_preferred<_ExecutionPolicy, _ForwardIterator>(__exec);
260260
using _is_vector_type =
261-
#if _ONEDPL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN
261+
#if (_PSTL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN || _ONEDPL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN)
262262
::std::conditional_t<
263263
oneapi::dpl::__internal::__is_host_execution_policy<::std::decay_t<_ExecutionPolicy>>::value,
264264
::std::false_type,
265265
decltype(oneapi::dpl::__internal::__is_vectorization_preferred<_ExecutionPolicy, _ForwardIterator>(
266266
__exec))>;
267267
#else
268268
decltype(oneapi::dpl::__internal::__is_vectorization_preferred<_ExecutionPolicy, _ForwardIterator>(__exec));
269-
#endif // _ONEDPL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN
269+
#endif // _PSTL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN || _ONEDPL_ICPX_OMP_SIMD_DESTROY_WINDOWS_BROKEN
270270
constexpr _is_vector_type __is_vector;
271271

272272
if constexpr (::std::is_trivially_destructible_v<_ValueType>)

0 commit comments

Comments
 (0)