mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-22 23:29:02 +00:00
Change arg type to unsigned int from signed int (#1078)
* Change arg type to unsigned int from signed int * Fix formatting issues
This commit is contained in:
committed by
GitHub
parent
ca673af488
commit
216455842d
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Copyright (c) 2017 The Khronos Group Inc.
|
||||
//
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
@@ -17,15 +17,19 @@
|
||||
|
||||
const char *find_targets_kernel[] = {
|
||||
|
||||
"__kernel void find_targets(__global uint* image, uint target, volatile __global atomic_uint *numTargetsFound, volatile __global atomic_uint *targetLocations)\n"
|
||||
"{\n"
|
||||
" size_t i = get_global_id(0);\n"
|
||||
" uint index;\n"
|
||||
" if(image[i] == target) {\n"
|
||||
" index = atomic_fetch_add_explicit(numTargetsFound, 1, memory_order_relaxed, memory_scope_device); \n"
|
||||
" atomic_exchange_explicit(&targetLocations[index], i, memory_order_relaxed, memory_scope_all_svm_devices); \n"
|
||||
" }\n"
|
||||
"}\n"
|
||||
"__kernel void find_targets(__global uint* image, uint target, volatile "
|
||||
"__global atomic_uint *numTargetsFound, volatile __global atomic_uint "
|
||||
"*targetLocations)\n"
|
||||
"{\n"
|
||||
" size_t i = get_global_id(0);\n"
|
||||
" uint index;\n"
|
||||
" if(image[i] == target) {\n"
|
||||
" index = atomic_fetch_add_explicit(numTargetsFound, 1u, "
|
||||
"memory_order_relaxed, memory_scope_device); \n"
|
||||
" atomic_exchange_explicit(&targetLocations[index], i, "
|
||||
"memory_order_relaxed, memory_scope_all_svm_devices); \n"
|
||||
" }\n"
|
||||
"}\n"
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user