mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Reorganization directory structure [2/n]
Change-Id: I47962d17d755e80dcd9476e1ed75560f433f6115
This commit is contained in:

committed by
Jaroslaw Chodor

parent
d015d3633f
commit
e8852a68c4
14
opencl/test/unit_test/test_files/simple_nonuniform.cl
Normal file
14
opencl/test/unit_test/test_files/simple_nonuniform.cl
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
__kernel void simpleNonUniform(int atomicOffset, __global volatile int *dst) {
|
||||
int id = (int)(get_global_id(2) * (get_global_size(1) * get_global_size(0)) + get_global_id(1) * get_global_size(0) + get_global_id(0));
|
||||
dst[id] = id;
|
||||
|
||||
__global volatile atomic_int *atomic_dst = ( __global volatile atomic_int * )dst;
|
||||
atomic_fetch_add_explicit( &atomic_dst[atomicOffset], 1 , memory_order_relaxed, memory_scope_all_svm_devices );
|
||||
}
|
Reference in New Issue
Block a user