Files
compute-runtime/runtime/gmm_helper/client_context/gmm_client_context_base.cpp
Maciej Plewka 9e52684f5b Change namespace from OCLRT to NEO
Change-Id: If965c79d70392db26597aea4c2f3b7ae2820fe96
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2019-03-26 15:48:19 +01:00

38 lines
1.2 KiB
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/gmm_helper/client_context/gmm_client_context_base.h"
namespace NEO {
GmmClientContextBase::GmmClientContextBase(GMM_CLIENT clientType, GmmExportEntries &gmmEntries) : gmmEntries(gmmEntries) {
clientContext = gmmEntries.pfnCreateClientContext(clientType);
}
GmmClientContextBase::~GmmClientContextBase() {
gmmEntries.pfnDeleteClientContext(clientContext);
};
MEMORY_OBJECT_CONTROL_STATE GmmClientContextBase::cachePolicyGetMemoryObject(GMM_RESOURCE_INFO *pResInfo, GMM_RESOURCE_USAGE_TYPE usage) {
return clientContext->CachePolicyGetMemoryObject(pResInfo, usage);
}
GMM_RESOURCE_INFO *GmmClientContextBase::createResInfoObject(GMM_RESCREATE_PARAMS *pCreateParams) {
return clientContext->CreateResInfoObject(pCreateParams);
}
GMM_RESOURCE_INFO *GmmClientContextBase::copyResInfoObject(GMM_RESOURCE_INFO *pSrcRes) {
return clientContext->CopyResInfoObject(pSrcRes);
}
void GmmClientContextBase::destroyResInfoObject(GMM_RESOURCE_INFO *pResInfo) {
return clientContext->DestroyResInfoObject(pResInfo);
}
GMM_CLIENT_CONTEXT *GmmClientContextBase::getHandle() const {
return clientContext;
}
} // namespace NEO