mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Updating files modified in 2018 only. Older files remain with old style copyright header Change-Id: Ic99f2e190ad74b4b7f2bd79dd7b9fa5fbe36ec92 Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
28 lines
937 B
C++
28 lines
937 B
C++
/*
|
|
* Copyright (C) 2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "gmm_client_context.h"
|
|
#include "runtime/gmm_helper/resource_info.h"
|
|
#include "runtime/gmm_helper/gmm_helper.h"
|
|
|
|
namespace OCLRT {
|
|
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 OCLRT
|