From ca84ebfe4c27da05ff9403f6c3da27cf98c0a590 Mon Sep 17 00:00:00 2001 From: "Dunajski, Bartosz" Date: Mon, 20 Jan 2020 15:46:52 +0100 Subject: [PATCH] Add const suffix Change-Id: I128a710a889aa6a7ead7867400a8b1ec6e781729 Signed-off-by: Dunajski, Bartosz --- runtime/context/context.cpp | 2 +- runtime/context/context.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/context/context.cpp b/runtime/context/context.cpp index 14a8b22da9..c76530e0cd 100644 --- a/runtime/context/context.cpp +++ b/runtime/context/context.cpp @@ -257,7 +257,7 @@ size_t Context::getTotalNumDevices() const { return numAvailableDevices; } -ClDevice *Context::getDevice(size_t deviceOrdinal) { +ClDevice *Context::getDevice(size_t deviceOrdinal) const { return (ClDevice *)devices[deviceOrdinal]; } diff --git a/runtime/context/context.h b/runtime/context/context.h index 05c36fd316..9f6cc7d95e 100644 --- a/runtime/context/context.h +++ b/runtime/context/context.h @@ -75,9 +75,9 @@ class Context : public BaseObject<_cl_context> { size_t getNumDevices() const; size_t getTotalNumDevices() const; - ClDevice *getDevice(size_t deviceOrdinal); + ClDevice *getDevice(size_t deviceOrdinal) const; - MemoryManager *getMemoryManager() { + MemoryManager *getMemoryManager() const { return memoryManager; }