From e3f3940e08962397988a483f5b96b68ea22cb760 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Thu, 24 May 2018 17:00:16 +0200 Subject: [PATCH] Define Nvidia device props if not available in system ext header --- src/c_wrapper/pyopencl_ext.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/c_wrapper/pyopencl_ext.h b/src/c_wrapper/pyopencl_ext.h index cd5d7112..b9b7782d 100644 --- a/src/c_wrapper/pyopencl_ext.h +++ b/src/c_wrapper/pyopencl_ext.h @@ -26,9 +26,33 @@ typedef union } cl_device_topology_amd; #endif +/* {{{ these NV defines are often missing from the system headers */ + +#ifndef CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV +#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005 +#endif +#ifndef CL_DEVICE_INTEGRATED_MEMORY_NV +#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006 +#endif + +#ifndef CL_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT_NV +#define CL_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT_NV 0x4007 +#endif + +#ifndef CL_DEVICE_PCI_BUS_ID_NV +#define CL_DEVICE_PCI_BUS_ID_NV 0x4008 +#endif + +#ifndef CL_DEVICE_PCI_SLOT_ID_NV +#define CL_DEVICE_PCI_SLOT_ID_NV 0x4009 +#endif + +/* }}} */ + #endif #endif #endif +/* vim: foldmethod=marker */ -- GitLab