diff --git a/tests/group_functions/group_scan.h b/tests/group_functions/group_scan.h index 7f266613a..d15bd8bda 100644 --- a/tests/group_functions/group_scan.h +++ b/tests/group_functions/group_scan.h @@ -419,7 +419,7 @@ void check_scan_over_group(sycl::queue& queue, sycl::range range, OpT op, // Use the local id of the item in the group to place results of // the scan operation in the order of the items. auto g_index = group.get_group_linear_id() * - group.get_group_linear_range() + + group.get_local_linear_range() + group.get_local_linear_id(); local_id_acc[g_index] = group.get_local_linear_id(); @@ -436,7 +436,7 @@ void check_scan_over_group(sycl::queue& queue, sycl::range range, OpT op, // Use the local id of the item in the sub-group to place // results of the scan operation in the order of the items. auto sg_index = sub_group.get_group_linear_id() * - sub_group.get_group_linear_range() + + sub_group.get_local_linear_range() + sub_group.get_local_linear_id(); local_id_acc[range_size + sg_index] = sub_group.get_local_linear_id();