Add global address space qualifier to kernel with indirect access

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2021-07-19 16:44:48 +00:00
committed by Compute-Runtime-Automation
parent f06938c3d0
commit cf7ecb903c

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Intel Corporation * Copyright (C) 2020-2021 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@ -8,7 +8,7 @@
__kernel void testIndirect(__global long* buf) { __kernel void testIndirect(__global long* buf) {
size_t gid = get_global_id(0); size_t gid = get_global_id(0);
if (gid == 0) { if (gid == 0) {
char* val = (char*)buf[0]; __global char* val = (__global char*)buf[0];
*val = 1; *val = 1;
} }
} }