Free Electron
OpenCLOp.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __opencl_OpenCLOp_h__
8 #define __opencl_OpenCLOp_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief test OpenCL
17 
18  @ingroup opencl
19 *//***************************************************************************/
20 class FE_DL_EXPORT OpenCLOp:
21  public OperatorSurfaceCommon,
22  public Initialize<OpenCLOp>
23 {
24  public:
25  OpenCLOp(void);
26 virtual ~OpenCLOp(void);
27 
28  void initialize(void);
29 
30  //* As HandlerI
31 virtual void handle(Record& a_rSignal);
32 
33 static
34 const char* clErrorString(cl_int a_error);
35 
36  protected:
37 
38  BWORD startup(void);
39 
40  BWORD paramContextIsCurrent(String a_key);
41 
42  sp<SurfaceAccessibleI> accessOpenCL(String a_key);
43 
44  BWORD m_started;
45  cl_device_id m_deviceId;
46  cl_context m_clContext;
47  cl_program m_clProgram;
48  cl_command_queue m_clCommandQueue;
49  cl_kernel m_clKernel;
50 };
51 
52 } /* namespace ext */
53 } /* namespace fe */
54 
55 #endif /* __opencl_OpenCLOp_h__ */
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Automatically reference-counted string container.
Definition: String.h:128
Partial Generic SurfaceI Implemention.
Definition: OperatorSurfaceCommon.h:20
test OpenCL
Definition: OpenCLOp.h:20
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53