Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Change for OpenCL2.2 header promotion #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ find_package(Threads REQUIRED)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC")

add_definitions(-DLINUX -D__x86_64__ -D__AMD64__ -DUNIX_OS -DqLittleEndian -DOPENCL_MAJOR=2 -DOPENCL_MINOR=1 -DWITH_AQL -DWITH_ONLINE_COMPILER -DATI_OS_LINUX -DATI_ARCH_X86 -DLITTLEENDIAN_CPU -DATI_BITS_64 -DATI_COMP_GCC -DWITH_TARGET_AMDGCN -DOPENCL_EXPORTS -DCL_USE_DEPRECATED_OPENCL_1_0_APIS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS -DCL_USE_DEPRECATED_OPENCL_1_2_APIS -DCL_USE_DEPRECATED_OPENCL_2_0_APIS -DVEGA10_ONLY=false -DWITH_LIGHTNING_COMPILER)
add_definitions(-DLINUX -D__x86_64__ -D__AMD64__ -DUNIX_OS -DqLittleEndian -DOPENCL_MAJOR=2 -DOPENCL_MINOR=1 -DCL_TARGET_OPENCL_VERSION=220 -DWITH_AQL -DWITH_ONLINE_COMPILER -DATI_OS_LINUX -DATI_ARCH_X86 -DLITTLEENDIAN_CPU -DATI_BITS_64 -DATI_COMP_GCC -DWITH_TARGET_AMDGCN -DOPENCL_EXPORTS -DCL_USE_DEPRECATED_OPENCL_1_0_APIS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS -DCL_USE_DEPRECATED_OPENCL_1_2_APIS -DCL_USE_DEPRECATED_OPENCL_2_0_APIS -DVEGA10_ONLY=false -DWITH_LIGHTNING_COMPILER)
add_definitions(-DOPENCL_C_MAJOR=2 -DOPENCL_C_MINOR=0)

set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic -Wl,--unresolved-symbols=report-all")
Expand Down
2 changes: 1 addition & 1 deletion include/vdi_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct ParamInfo<char[N]>

} // namespace detail

struct PlatformIDS { const struct KHRicdVendorDispatchRec* dispatch_; };
struct PlatformIDS { const cl_icd_dispatch* dispatch_; };
class PlatformID {
public:
static PlatformIDS Platform;
Expand Down
8 changes: 4 additions & 4 deletions platform/object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ CL_TYPES_DO(DECLARE_CL_TYPES);

#undef DECLARE_CL_TYPES

struct KHRicdVendorDispatchRec;
typedef struct _cl_icd_dispatch cl_icd_dispatch;

#define DECLARE_CL_TYPES(CL, AMD) \
typedef struct _##CL { \
struct KHRicdVendorDispatchRec* dispatch; \
cl_icd_dispatch* dispatch; \
} * CL;

AMD_CL_TYPES_DO(DECLARE_CL_TYPES);
Expand Down Expand Up @@ -108,8 +108,8 @@ CL_TYPES_DO(DEFINE_CL_TRAITS);
//! \endcond

struct ICDDispatchedObject {
static struct KHRicdVendorDispatchRec icdVendorDispatch_[];
const struct KHRicdVendorDispatchRec* const dispatch_;
static cl_icd_dispatch icdVendorDispatch_[];
const cl_icd_dispatch* const dispatch_;

protected:
ICDDispatchedObject() : dispatch_(icdVendorDispatch_) {}
Expand Down