Add simple kernel to unit tests
Change-Id: Ifc02970a1d9384e00242cc3b8a97b1d2cc1d24c0 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
parent
9523942573
commit
764aa45137
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2017-2018 Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -106,3 +106,19 @@ __kernel void simple_kernel_7(__global int *resIdx, global TYPE *src, global TYP
|
|||
|
||||
dst[gid] = res;
|
||||
}
|
||||
|
||||
__kernel void simple_kernel_8(__global uint *dst, uint incrementationsCount) {
|
||||
uint groupIdX = get_group_id(0);
|
||||
uint groupIdY = get_group_id(1);
|
||||
uint groupIdZ = get_group_id(2);
|
||||
|
||||
uint groupCountX = get_num_groups(0);
|
||||
uint groupCountY = get_num_groups(1);
|
||||
uint groupCountZ = get_num_groups(2);
|
||||
|
||||
uint destination = groupIdZ * groupCountY * groupCountX + groupIdY * groupCountX + groupIdX;
|
||||
|
||||
for(uint i = 0; i < incrementationsCount; i++){
|
||||
dst[destination]++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue