summaryrefslogtreecommitdiff
path: root/include/opencl
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2015-01-07 16:24:06 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2015-01-07 16:39:38 -0500
commite12fcd050a6647232df3003d0a5cca01e564ac22 (patch)
treeffe6d35e27ee17567ba55cd358d7351603dc1f8f /include/opencl
parent37947afccda272295e7bb17ae6ec4de2c3775136 (diff)
Set up foundation for supporting multiple OpenCL command queues per device.
Change-Id: Ia63c8bd6552cdbc2b5eabadaa044b9f1eca5f664
Diffstat (limited to 'include/opencl')
-rw-r--r--include/opencl/openclwrapper.hxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/opencl/openclwrapper.hxx b/include/opencl/openclwrapper.hxx
index 412c00bd08ad..d86981926267 100644
--- a/include/opencl/openclwrapper.hxx
+++ b/include/opencl/openclwrapper.hxx
@@ -33,6 +33,7 @@ if( status != CL_SUCCESS ) \
}
#define MAX_CLFILE_NUM 50
+#define OPENCL_CMDQUEUE_SIZE 1 // number of command queues per OpenCL device.
#include <cstdio>
@@ -53,9 +54,10 @@ struct GPUEnv
cl_context mpContext;
cl_device_id *mpArryDevsID;
cl_device_id mpDevID;
- cl_command_queue mpCmdQueue;
+ cl_command_queue mpCmdQueue[OPENCL_CMDQUEUE_SIZE];
cl_program mpArryPrograms[MAX_CLFILE_NUM]; //one program object maps one kernel source file
int mnIsUserCreated; // 1: created , 0:no create and needed to create by opencl wrapper
+ int mnCmdQueuePos;
bool mnKhrFp64Flag;
bool mnAmdFp64Flag;
};
@@ -79,6 +81,12 @@ OPENCL_DLLPUBLIC bool switchOpenCLDevice(const OUString* pDeviceId, bool bAutoSe
OPENCL_DLLPUBLIC void getOpenCLDeviceInfo(size_t& rDeviceId, size_t& rPlatformId);
+/**
+ * Set the current command queue position in case of multiple command queues
+ * for a given device.
+ */
+OPENCL_DLLPUBLIC void setOpenCLCmdQueuePosition( int nPos );
+
}
#endif