Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Michel <[email protected]>
  • Loading branch information
mmichel11 committed Jan 31, 2025
1 parent 20aea2d commit 22f0b9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// -*- C++ -*-
//===-- parallel_backend_sycl_for.h --------------------------------===//
//===-- parallel_backend_sycl_for.h ---------------------------------------===//
//
// Copyright (C) Intel Corporation
//
Expand Down
4 changes: 2 additions & 2 deletions include/oneapi/dpl/pstl/hetero/dpcpp/unseq_backend_sycl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1453,13 +1453,13 @@ struct __brick_shift_left
const _DiffType __write_offset = __k + __i;
if constexpr (_IsFull::value)
{
if (__k + __idx + __preferred_vector_size <= __size)
if (__read_offset + __preferred_vector_size <= __size)
{
_ValueType __rng_vector[__preferred_vector_size];
__vec_load(std::true_type{}, __read_offset, __load_op, __rng, __rng_vector);
__vec_store(std::true_type{}, __write_offset, __store_op, __rng_vector, __rng);
}
else if (__k + __idx < __size)
else if (__read_offset < __size)
{
const std::size_t __num_remaining = __size - __read_offset;
for (_DiffType __j = 0; __j < __num_remaining; ++__j)
Expand Down

0 comments on commit 22f0b9e

Please sign in to comment.