Skip to content

Commit

Permalink
Fix type error of n_scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
julianmi committed Aug 9, 2024
1 parent 7aee850 commit b344cc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,9 @@ struct __parallel_transform_reduce_impl
_Size __n_groups = oneapi::dpl::__internal::__dpl_ceiling_div(__n, __size_per_work_group);

// Create temporary global buffers to store temporary values
const std::size_t __n_scratch = 2 * __n_groups;
using __result_and_scratch_storage_t = __result_and_scratch_storage<_ExecutionPolicy, _Tp>;
__result_and_scratch_storage_t __scratch_container{__exec, 1, 2 * __n_groups};
__result_and_scratch_storage_t __scratch_container{__exec, 1, __n_scratch};

// __is_first == true. Reduce over each work_group
// __is_first == false. Reduce between work groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,8 @@ struct __result_and_scratch_storage
public:
__result_and_scratch_storage(const _ExecutionPolicy& __exec_, std::size_t __result_n, std::size_t __scratch_n)
: __exec{__exec_}, __result_n{__result_n}, __scratch_n{__scratch_n},
__use_USM_host{__use_USM_host_allocations(__exec.queue())},
__supports_USM_device{__use_USM_allocations(__exec.queue())}
__use_USM_host{__use_USM_host_allocations(__exec.queue())}, __supports_USM_device{
__use_USM_allocations(__exec.queue())}
{
std::size_t __total_n = __scratch_n + __result_n;
// Skip in case this is a dummy container
Expand Down

0 comments on commit b344cc9

Please sign in to comment.