• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2021 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // CLKernelCL.h: Defines the class interface for CLKernelCL, implementing CLKernelImpl.
7 
8 #ifndef LIBANGLE_RENDERER_CL_CLKERNELCL_H_
9 #define LIBANGLE_RENDERER_CL_CLKERNELCL_H_
10 
11 #include "libANGLE/renderer/cl/cl_types.h"
12 
13 #include "libANGLE/renderer/CLKernelImpl.h"
14 
15 namespace rx
16 {
17 
18 class CLKernelCL : public CLKernelImpl
19 {
20   public:
21     CLKernelCL(const cl::Kernel &kernel, cl_kernel native);
22     ~CLKernelCL() override;
23 
24     cl_kernel getNative() const;
25 
26     cl_int setArg(cl_uint argIndex, size_t argSize, const void *argValue) override;
27 
28     Info createInfo(cl_int &errorCode) const override;
29 
30   private:
31     const cl_kernel mNative;
32 };
33 
getNative()34 inline cl_kernel CLKernelCL::getNative() const
35 {
36     return mNative;
37 }
38 
39 }  // namespace rx
40 
41 #endif  // LIBANGLE_RENDERER_CL_CLKERNELCL_H_
42