Compute Library
 21.05
CLCoreRuntimeContext Class Referencefinal

Core runtime context for OpenCL. More...

#include <CLCoreRuntimeContext.h>

Public Member Functions

 CLCoreRuntimeContext ()
 Legacy constructor. More...
 
 CLCoreRuntimeContext (CLKernelLibrary *kernel_lib, cl::Context ctx, cl::CommandQueue queue)
 Constructor. More...
 
 ~CLCoreRuntimeContext ()=default
 Destructor. More...
 
 CLCoreRuntimeContext (const CLCoreRuntimeContext &)=default
 Default copy constructor. More...
 
 CLCoreRuntimeContext (CLCoreRuntimeContext &&)=default
 Default move constructor. More...
 
CLCoreRuntimeContextoperator= (const CLCoreRuntimeContext &)=default
 Default copy assignment. More...
 
CLCoreRuntimeContextoperator= (CLCoreRuntimeContext &&)=default
 Default move assignment operator. More...
 
CLKernelLibrarykernel_library () const
 Kernel Library accessor. More...
 
cl::Context context ()
 OpenCL context accessor. More...
 
cl::CommandQueue queue ()
 OpenCL command queue accessor. More...
 

Detailed Description

Core runtime context for OpenCL.

Definition at line 35 of file CLCoreRuntimeContext.h.

Constructor & Destructor Documentation

◆ CLCoreRuntimeContext() [1/4]

Legacy constructor.

Definition at line 38 of file CLCoreRuntimeContext.cpp.

39  : _kernel_lib(nullptr), _ctx(), _queue()
40 {
41 }

◆ CLCoreRuntimeContext() [2/4]

CLCoreRuntimeContext ( CLKernelLibrary kernel_lib,
cl::Context  ctx,
cl::CommandQueue  queue 
)

Constructor.

Definition at line 43 of file CLCoreRuntimeContext.cpp.

44  : _kernel_lib(kernel_lib), _ctx(ctx), _queue(queue)
45 {
46 }
cl::CommandQueue queue()
OpenCL command queue accessor.

◆ ~CLCoreRuntimeContext()

~CLCoreRuntimeContext ( )
default

Destructor.

◆ CLCoreRuntimeContext() [3/4]

Default copy constructor.

◆ CLCoreRuntimeContext() [4/4]

Default move constructor.

Member Function Documentation

◆ context()

cl::Context context ( )

OpenCL context accessor.

Returns
The OpenCL context used by the core context

Definition at line 28 of file CLCoreRuntimeContext.cpp.

29 {
30  return _ctx;
31 }

Referenced by CLBufferAllocator::allocate(), and CLBufferMemoryRegion::CLBufferMemoryRegion().

◆ kernel_library()

CLKernelLibrary * kernel_library ( ) const

Kernel Library accessor.

Returns
The kernel library instance used by the core context

Definition at line 48 of file CLCoreRuntimeContext.cpp.

49 {
50  return _kernel_lib;
51 }

Referenced by arm_compute::create_opencl_kernel().

◆ operator=() [1/2]

CLCoreRuntimeContext& operator= ( const CLCoreRuntimeContext )
default

Default copy assignment.

◆ operator=() [2/2]

CLCoreRuntimeContext& operator= ( CLCoreRuntimeContext &&  )
default

Default move assignment operator.

◆ queue()

cl::CommandQueue queue ( )

OpenCL command queue accessor.

Returns
The OpenCL queue used by the core context

Definition at line 33 of file CLCoreRuntimeContext.cpp.

34 {
35  return _queue;
36 }

The documentation for this class was generated from the following files: