P4 to Git Change 1410993 by lmoriche@lmoriche_opencl_dev2 on 2017/05/17 22:25:50
SWDEV-102733 - [OCL-LC-ROCm] Cmake build Write CMakeLists.txt to enable building with and without the DK environment
- Make it possible to use cl2.hpp
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl2.hpp#2 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/clinfo.cpp#3 edit
[ROCm/clr commit: 842f311464]
This commit is contained in:
@@ -1235,6 +1235,9 @@ inline cl_int getInfoHelper(Func f, cl_uint name, T* param, int, typename T::cl_
|
||||
F(cl_device_info, CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT, cl_uint) \
|
||||
F(cl_device_info, CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT, cl_uint) \
|
||||
F(cl_device_info, CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT, cl_uint) \
|
||||
F(cl_device_info, CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE, size_type) \
|
||||
F(cl_device_info, CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE, size_type) \
|
||||
F(cl_device_info, CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS, cl_uint) \
|
||||
F(cl_command_queue_info, CL_QUEUE_SIZE, cl_uint) \
|
||||
F(cl_mem_info, CL_MEM_USES_SVM_POINTER, cl_bool) \
|
||||
F(cl_program_build_info, CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE, size_type) \
|
||||
@@ -6513,7 +6516,7 @@ inline cl_int cl::Program::getInfo(cl_program_info name, vector<vector<unsigned
|
||||
|
||||
// Resize the parameter array and constituent arrays
|
||||
param->resize(numBinaries);
|
||||
for (int i = 0; i < numBinaries; ++i) {
|
||||
for (size_type i = 0; i < numBinaries; ++i) {
|
||||
(*param)[i].resize(sizes[i]);
|
||||
}
|
||||
|
||||
|
||||
@@ -100,15 +100,23 @@ jurisdiction and venue of these courts.
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#define __CL_ENABLE_EXCEPTIONS
|
||||
#define __MAX_DEFAULT_VECTOR_SIZE 50
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4290)
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_CL2_HPP)
|
||||
#define CL_HPP_ENABLE_EXCEPTIONS
|
||||
#define CL_HPP_MINIMUM_OPENCL_VERSION 120
|
||||
#define CL_HPP_TARGET_OPENCL_VERSION 200
|
||||
#define CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY
|
||||
#include "CL/cl2.hpp"
|
||||
#else // !HAVE_CL2_HPP
|
||||
#define __CL_ENABLE_EXCEPTIONS
|
||||
#define __MAX_DEFAULT_VECTOR_SIZE 50
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
#include "cl.hpp"
|
||||
#endif // !HAVE_CL2_HPP
|
||||
|
||||
bool verbose = false;
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user