From 4a04e4a25e00b7204b56245de2e5f15e406dd9d2 Mon Sep 17 00:00:00 2001 From: Ken Barker Date: Tue, 3 Dec 2024 06:35:45 +0000 Subject: [PATCH] Update opencl2_kernel_test.rs --- tests/opencl2_kernel_test.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/opencl2_kernel_test.rs b/tests/opencl2_kernel_test.rs index 66929d8..5251df6 100644 --- a/tests/opencl2_kernel_test.rs +++ b/tests/opencl2_kernel_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Via Technology Ltd. All Rights Reserved. +// Copyright (c) 2021-2024 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ const PROGRAM_SOURCE: &str = r#" kernel void sum_int (global int* sums, global int const* values) { - int value = work_group_reduce_add(values[get_global_id(0)]); + int value = sub_group_reduce_add(values[get_global_id(0)]); if (0u == get_local_id(0)) sums[get_group_id(0)] = value; @@ -55,10 +55,10 @@ kernel void inclusive_scan_int (global int* output, for (size_t i = 0u; i < num_groups; ++i) { size_t lidx = i * lsize + lid; - int value = work_group_scan_inclusive_add(values[lidx]); + int value = sub_group_scan_inclusive_add(values[lidx]); output[lidx] = sum + value; - sum += work_group_broadcast(value, lsize - 1); + sum += sub_group_broadcast(value, lsize - 1); } }"#;