aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/CL/CLCoreRuntimeContext.h75
-rw-r--r--arm_compute/runtime/CL/CLBufferAllocator.h17
-rw-r--r--arm_compute/runtime/CL/CLMemoryRegion.h21
-rw-r--r--arm_compute/runtime/CL/CLRuntimeContext.h7
4 files changed, 10 insertions, 110 deletions
diff --git a/arm_compute/core/CL/CLCoreRuntimeContext.h b/arm_compute/core/CL/CLCoreRuntimeContext.h
deleted file mode 100644
index 23f282354c..0000000000
--- a/arm_compute/core/CL/CLCoreRuntimeContext.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2019 Arm Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_CLCORERUNTIME_CONTEXT_H
-#define ARM_COMPUTE_CLCORERUNTIME_CONTEXT_H
-
-#include "arm_compute/core/CL/OpenCL.h"
-
-namespace arm_compute
-{
-// Forward declarations
-class CLKernelLibrary;
-
-/** Core runtime context for OpenCL */
-class CLCoreRuntimeContext final
-{
-public:
- /** Legacy constructor */
- CLCoreRuntimeContext();
-
- /** Constructor */
- CLCoreRuntimeContext(CLKernelLibrary *kernel_lib, cl::Context ctx, cl::CommandQueue queue);
- /** Destructor */
- ~CLCoreRuntimeContext() = default;
- /** Default copy constructor */
- CLCoreRuntimeContext(const CLCoreRuntimeContext &) = default;
- /** Default move constructor */
- CLCoreRuntimeContext(CLCoreRuntimeContext &&) = default;
- /** Default copy assignment */
- CLCoreRuntimeContext &operator=(const CLCoreRuntimeContext &) = default;
- /** Default move assignment operator */
- CLCoreRuntimeContext &operator=(CLCoreRuntimeContext &&) = default;
- /** Kernel Library accessor
- *
- * @return The kernel library instance used by the core context
- */
- CLKernelLibrary *kernel_library() const;
- /** OpenCL context accessor
- *
- * @return The OpenCL context used by the core context
- */
- cl::Context context();
- /** OpenCL command queue accessor
- *
- * @return The OpenCL queue used by the core context
- */
- cl::CommandQueue queue();
-
-private:
- CLKernelLibrary *_kernel_lib{ nullptr };
- cl::Context _ctx{};
- cl::CommandQueue _queue{};
-};
-} // namespace arm_compute
-#endif /*ARM_COMPUTE_CLCORERUNTIME_CONTEXT_H */
diff --git a/arm_compute/runtime/CL/CLBufferAllocator.h b/arm_compute/runtime/CL/CLBufferAllocator.h
index 69eac21ec2..7467e9d1c6 100644
--- a/arm_compute/runtime/CL/CLBufferAllocator.h
+++ b/arm_compute/runtime/CL/CLBufferAllocator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 Arm Limited.
+ * Copyright (c) 2017-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -30,29 +30,14 @@
namespace arm_compute
{
-class CLCoreRuntimeContext;
/** Default OpenCL cl buffer allocator implementation */
class CLBufferAllocator final : public IAllocator
{
public:
- /** Default constructor
- *
- * @param[in] ctx A runtime context.
- */
- CLBufferAllocator(CLCoreRuntimeContext *ctx = nullptr);
-
- /** Default copy constructor */
- CLBufferAllocator(const CLBufferAllocator &) = default;
- /** Default copy assignment operator */
- CLBufferAllocator &operator=(const CLBufferAllocator &) = default;
-
// Inherited methods overridden:
void *allocate(size_t size, size_t alignment) override;
void free(void *ptr) override;
std::unique_ptr<IMemoryRegion> make_region(size_t size, size_t alignment) override;
-
-private:
- CLCoreRuntimeContext *_ctx;
};
} // arm_compute
#endif /*ARM_COMPUTE_CLBUFFERALLOCATOR_H */
diff --git a/arm_compute/runtime/CL/CLMemoryRegion.h b/arm_compute/runtime/CL/CLMemoryRegion.h
index 9d08f197c9..1fd8fdb79e 100644
--- a/arm_compute/runtime/CL/CLMemoryRegion.h
+++ b/arm_compute/runtime/CL/CLMemoryRegion.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -31,17 +31,15 @@
namespace arm_compute
{
-class CLCoreRuntimeContext;
/** OpenCL memory region interface */
class ICLMemoryRegion : public IMemoryRegion
{
public:
/** Constructor
*
- * @param[in] ctx Runtime context
* @param[in] size Region size
*/
- ICLMemoryRegion(CLCoreRuntimeContext *ctx, size_t size);
+ ICLMemoryRegion(size_t size);
/** Default Destructor */
virtual ~ICLMemoryRegion() = default;
/** Prevent instances of this class from being copied (As this class contains pointers) */
@@ -99,17 +97,15 @@ class CLBufferMemoryRegion final : public ICLMemoryRegion
public:
/** Constructor
*
- * @param[in] ctx Runtime context
* @param[in] flags Memory flags
* @param[in] size Region size
*/
- CLBufferMemoryRegion(CLCoreRuntimeContext *ctx, cl_mem_flags flags, size_t size);
+ CLBufferMemoryRegion(cl_mem_flags flags, size_t size);
/** Constructor
*
* @param[in] buffer Buffer to be used as a memory region
- * @param[in] ctx Runtime context
*/
- CLBufferMemoryRegion(const cl::Buffer &buffer, CLCoreRuntimeContext *ctx);
+ CLBufferMemoryRegion(const cl::Buffer &buffer);
// Inherited methods overridden :
void *ptr() final;
@@ -123,12 +119,11 @@ class ICLSVMMemoryRegion : public ICLMemoryRegion
protected:
/** Constructor
*
- * @param[in] ctx Runtime context
* @param[in] flags Memory flags
* @param[in] size Region size
* @param[in] alignment Alignment
*/
- ICLSVMMemoryRegion(CLCoreRuntimeContext *ctx, cl_mem_flags flags, size_t size, size_t alignment);
+ ICLSVMMemoryRegion(cl_mem_flags flags, size_t size, size_t alignment);
/** Destructor */
virtual ~ICLSVMMemoryRegion();
/** Prevent instances of this class from being copied (As this class contains pointers) */
@@ -153,12 +148,11 @@ class CLCoarseSVMMemoryRegion final : public ICLSVMMemoryRegion
public:
/** Constructor
*
- * @param[in] ctx Runtime context
* @param[in] flags Memory flags
* @param[in] size Region size
* @param[in] alignment Alignment
*/
- CLCoarseSVMMemoryRegion(CLCoreRuntimeContext *ctx, cl_mem_flags flags, size_t size, size_t alignment);
+ CLCoarseSVMMemoryRegion(cl_mem_flags flags, size_t size, size_t alignment);
// Inherited methods overridden :
void *map(cl::CommandQueue &q, bool blocking) final;
@@ -171,12 +165,11 @@ class CLFineSVMMemoryRegion final : public ICLSVMMemoryRegion
public:
/** Constructor
*
- * @param[in] ctx Runtime context
* @param[in] flags Memory flags
* @param[in] size Region size
* @param[in] alignment Alignment
*/
- CLFineSVMMemoryRegion(CLCoreRuntimeContext *ctx, cl_mem_flags flags, size_t size, size_t alignment);
+ CLFineSVMMemoryRegion(cl_mem_flags flags, size_t size, size_t alignment);
// Inherited methods overridden :
void *map(cl::CommandQueue &q, bool blocking) final;
diff --git a/arm_compute/runtime/CL/CLRuntimeContext.h b/arm_compute/runtime/CL/CLRuntimeContext.h
index 4ab8f70887..dd17645fa7 100644
--- a/arm_compute/runtime/CL/CLRuntimeContext.h
+++ b/arm_compute/runtime/CL/CLRuntimeContext.h
@@ -24,7 +24,6 @@
#ifndef ARM_COMPUTE_CLRUNTIME_CONTEXT_H
#define ARM_COMPUTE_CLRUNTIME_CONTEXT_H
-#include "arm_compute/core/CL/CLCoreRuntimeContext.h"
#include "arm_compute/core/CL/CLKernelLibrary.h"
#include "arm_compute/core/CL/OpenCL.h"
#include "arm_compute/runtime/CL/CLScheduler.h"
@@ -51,16 +50,14 @@ public:
void set_gpu_scheduler(CLScheduler *scheduler);
// Inherited overridden methods
- CLScheduler *gpu_scheduler();
- CLKernelLibrary &kernel_library();
- CLCoreRuntimeContext *core_runtime_context();
+ CLScheduler *gpu_scheduler();
+ CLKernelLibrary &kernel_library();
private:
std::unique_ptr<CLScheduler> _gpu_owned_scheduler{ nullptr };
CLScheduler *_gpu_scheduler{ nullptr };
CLTuner _tuner{ false };
CLSymbols _symbols{};
- CLCoreRuntimeContext _core_context{};
CLBackendType _backend_type{ CLBackendType::Native };
};
} // namespace arm_compute