mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 00:03:14 +08:00
Change-Id: If965c79d70392db26597aea4c2f3b7ae2820fe96 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
29 lines
939 B
C++
29 lines
939 B
C++
/*
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "runtime/gmm_helper/gmm_helper.h"
|
|
#include "runtime/gmm_helper/resource_info.h"
|
|
|
|
#include "gmm_client_context.h"
|
|
|
|
namespace NEO {
|
|
void GmmResourceInfo::customDeleter(GMM_RESOURCE_INFO *gmmResourceInfo) {
|
|
GmmHelper::getClientContext()->destroyResInfoObject(gmmResourceInfo);
|
|
}
|
|
|
|
GmmResourceInfo::GmmResourceInfo(GMM_RESCREATE_PARAMS *resourceCreateParams) {
|
|
auto resourceInfoPtr = GmmHelper::getClientContext()->createResInfoObject(resourceCreateParams);
|
|
this->resourceInfo = UniquePtrType(resourceInfoPtr, GmmResourceInfo::customDeleter);
|
|
}
|
|
|
|
GmmResourceInfo::GmmResourceInfo(GMM_RESOURCE_INFO *inputGmmResourceInfo) {
|
|
auto resourceInfoPtr = GmmHelper::getClientContext()->copyResInfoObject(inputGmmResourceInfo);
|
|
this->resourceInfo = UniquePtrType(resourceInfoPtr, GmmResourceInfo::customDeleter);
|
|
}
|
|
|
|
} // namespace NEO
|