summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pstl/include/pstl/internal/parallel_backend_tbb.h2
-rw-r--r--pstl/include/pstl/internal/unseq_backend_simd.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/pstl/include/pstl/internal/parallel_backend_tbb.h b/pstl/include/pstl/internal/parallel_backend_tbb.h
index fb621f2601e..cf6319a0982 100644
--- a/pstl/include/pstl/internal/parallel_backend_tbb.h
+++ b/pstl/include/pstl/internal/parallel_backend_tbb.h
@@ -233,7 +233,7 @@ class trans_scan_body
sum() const
{
__TBB_ASSERT(_M_has_sum, "sum expected");
- return *(_Tp*)_M_sum_storage;
+ return *const_cast<_Tp*>(reinterpret_cast<_Tp const*>(_M_sum_storage));
}
void
diff --git a/pstl/include/pstl/internal/unseq_backend_simd.h b/pstl/include/pstl/internal/unseq_backend_simd.h
index 7bd5a442b55..a1d3ceed576 100644
--- a/pstl/include/pstl/internal/unseq_backend_simd.h
+++ b/pstl/include/pstl/internal/unseq_backend_simd.h
@@ -456,7 +456,7 @@ template <typename _Size, typename _Tp, typename _BinaryOperation, typename _Una
typename std::enable_if<!is_arithmetic_plus<_Tp, _BinaryOperation>::value, _Tp>::type
simd_transform_reduce(_Size __n, _Tp __init, _BinaryOperation __binary_op, _UnaryOperation __f) noexcept
{
- const std::size_t __block_size = __lane_size / sizeof(_Tp);
+ const _Size __block_size = __lane_size / sizeof(_Tp);
if (__n > 2 * __block_size && __block_size > 1)
{
alignas(__lane_size) char __lane_[__lane_size];
OpenPOWER on IntegriCloud