Skip to content

[oneDPL][simd] using _PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED where it is applicable #2151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions include/oneapi/dpl/pstl/unseq_backend_simd.h
Original file line number Diff line number Diff line change
@@ -259,6 +259,7 @@ __simd_unique_copy(_InputIterator __first, _DifferenceType __n, _OutputIterator
_DifferenceType __cnt = 1;
__result[0] = __first[0];

_PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED
_ONEDPL_PRAGMA_SIMD
for (_DifferenceType __i = 1; __i < __n; ++__i)
{
@@ -289,6 +290,7 @@ __simd_copy_if(_InputIterator __first, _DifferenceType __n, _OutputIterator __re
{
_DifferenceType __cnt = 0;

_PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED
_ONEDPL_PRAGMA_SIMD
for (_DifferenceType __i = 0; __i < __n; ++__i)
{
@@ -338,6 +340,7 @@ __simd_copy_by_mask(_InputIterator __first, _DifferenceType __n, _OutputIterator
_Assigner __assigner) noexcept
{
_DifferenceType __cnt = 0;
_PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED
_ONEDPL_PRAGMA_SIMD
for (_DifferenceType __i = 0; __i < __n; ++__i)
{
@@ -358,6 +361,7 @@ __simd_partition_by_mask(_InputIterator __first, _DifferenceType __n, _OutputIte
_OutputIterator2 __out_false, bool* __mask) noexcept
{
_DifferenceType __cnt_true = 0, __cnt_false = 0;
_PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED
_ONEDPL_PRAGMA_SIMD
for (_DifferenceType __i = 0; __i < __n; ++__i)
{
@@ -786,6 +790,7 @@ __simd_partition_copy(_InputIterator __first, _DifferenceType __n, _OutputIterat
{
_DifferenceType __cnt_true = 0, __cnt_false = 0;

_PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED
_ONEDPL_PRAGMA_SIMD
for (_DifferenceType __i = 0; __i < __n; ++__i)
{
@@ -867,6 +872,7 @@ __simd_remove_if(_RandomAccessIterator __first, _DifferenceType __n, _UnaryPredi
}

_DifferenceType __cnt = 0;
_PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED
_ONEDPL_PRAGMA_SIMD
for (_DifferenceType __i = 1; __i < __n; ++__i)
{