Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/compositor/intern/COM_OpenCLDevice.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/compositor/intern/COM_OpenCLDevice.h')
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.h174
1 files changed, 99 insertions, 75 deletions
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.h b/source/blender/compositor/intern/COM_OpenCLDevice.h
index 8cd0c31e658..7a83bda162c 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.h
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.h
@@ -33,81 +33,105 @@ using std::list;
* an instance of this class represents a single cl_device
*/
class OpenCLDevice : public Device {
-private:
- /**
- * \brief opencl context
- */
- cl_context m_context;
-
- /**
- * \brief opencl device
- */
- cl_device_id m_device;
-
- /**
- * \brief opencl program
- */
- cl_program m_program;
-
- /**
- * \brief opencl command queue
- */
- cl_command_queue m_queue;
-
- /**
- * \brief opencl vendor ID
- */
- cl_int m_vendorID;
-
-public:
- /**
- * \brief constructor with opencl device
- * \param context:
- * \param device:
- * \param program:
- * \param vendorID:
- */
- OpenCLDevice(cl_context context, cl_device_id device, cl_program program, cl_int vendorId);
-
-
- /**
- * \brief initialize the device
- * During initialization the OpenCL cl_command_queue is created
- * the command queue is stored in the field queue.
- * \see queue
- */
- bool initialize();
-
- /**
- * \brief deinitialize the device
- * During deintiialization the command queue is cleared
- */
- void deinitialize();
-
- /**
- * \brief execute a WorkPackage
- * \param work: the WorkPackage to execute
- */
- void execute(WorkPackage *work);
-
- /**
- * \brief determine an image format
- * \param memorybuffer:
- */
- static const cl_image_format *determineImageFormat(MemoryBuffer *memoryBuffer);
-
- cl_context getContext() { return this->m_context; }
-
- cl_command_queue getQueue() { return this->m_queue; }
-
- cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, SocketReader *reader);
- cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, ReadBufferOperation *reader);
- void COM_clAttachMemoryBufferOffsetToKernelParameter(cl_kernel kernel, int offsetIndex, MemoryBuffer *memoryBuffers);
- void COM_clAttachOutputMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, cl_mem clOutputMemoryBuffer);
- void COM_clAttachSizeToKernelParameter(cl_kernel kernel, int offsetIndex, NodeOperation *operation);
- void COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemoryBuffer);
- void COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemoryBuffer, int offsetIndex, NodeOperation *operation);
- cl_kernel COM_clCreateKernel(const char *kernelname, list<cl_kernel> *clKernelsToCleanUp);
+ private:
+ /**
+ * \brief opencl context
+ */
+ cl_context m_context;
+
+ /**
+ * \brief opencl device
+ */
+ cl_device_id m_device;
+
+ /**
+ * \brief opencl program
+ */
+ cl_program m_program;
+
+ /**
+ * \brief opencl command queue
+ */
+ cl_command_queue m_queue;
+
+ /**
+ * \brief opencl vendor ID
+ */
+ cl_int m_vendorID;
+
+ public:
+ /**
+ * \brief constructor with opencl device
+ * \param context:
+ * \param device:
+ * \param program:
+ * \param vendorID:
+ */
+ OpenCLDevice(cl_context context, cl_device_id device, cl_program program, cl_int vendorId);
+
+ /**
+ * \brief initialize the device
+ * During initialization the OpenCL cl_command_queue is created
+ * the command queue is stored in the field queue.
+ * \see queue
+ */
+ bool initialize();
+
+ /**
+ * \brief deinitialize the device
+ * During deintiialization the command queue is cleared
+ */
+ void deinitialize();
+
+ /**
+ * \brief execute a WorkPackage
+ * \param work: the WorkPackage to execute
+ */
+ void execute(WorkPackage *work);
+
+ /**
+ * \brief determine an image format
+ * \param memorybuffer:
+ */
+ static const cl_image_format *determineImageFormat(MemoryBuffer *memoryBuffer);
+
+ cl_context getContext()
+ {
+ return this->m_context;
+ }
+
+ cl_command_queue getQueue()
+ {
+ return this->m_queue;
+ }
+
+ cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel,
+ int parameterIndex,
+ int offsetIndex,
+ list<cl_mem> *cleanup,
+ MemoryBuffer **inputMemoryBuffers,
+ SocketReader *reader);
+ cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel,
+ int parameterIndex,
+ int offsetIndex,
+ list<cl_mem> *cleanup,
+ MemoryBuffer **inputMemoryBuffers,
+ ReadBufferOperation *reader);
+ void COM_clAttachMemoryBufferOffsetToKernelParameter(cl_kernel kernel,
+ int offsetIndex,
+ MemoryBuffer *memoryBuffers);
+ void COM_clAttachOutputMemoryBufferToKernelParameter(cl_kernel kernel,
+ int parameterIndex,
+ cl_mem clOutputMemoryBuffer);
+ void COM_clAttachSizeToKernelParameter(cl_kernel kernel,
+ int offsetIndex,
+ NodeOperation *operation);
+ void COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemoryBuffer);
+ void COM_clEnqueueRange(cl_kernel kernel,
+ MemoryBuffer *outputMemoryBuffer,
+ int offsetIndex,
+ NodeOperation *operation);
+ cl_kernel COM_clCreateKernel(const char *kernelname, list<cl_kernel> *clKernelsToCleanUp);
};
#endif