2018-05-05 21:30:37 +02:00
|
|
|
/*
|
2019-02-27 11:39:32 +01:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-09-18 09:11:08 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
2018-05-05 21:30:37 +02:00
|
|
|
|
|
|
|
|
#include "runtime/gmm_helper/gmm_helper.h"
|
|
|
|
|
#include "runtime/gmm_helper/page_table_mngr.h"
|
|
|
|
|
|
2019-02-27 11:39:32 +01:00
|
|
|
#include "gmm_client_context.h"
|
|
|
|
|
|
2018-05-05 21:30:37 +02:00
|
|
|
namespace OCLRT {
|
2018-07-03 10:00:12 +02:00
|
|
|
GmmPageTableMngr::~GmmPageTableMngr() {
|
|
|
|
|
if (clientContext) {
|
|
|
|
|
clientContext->DestroyPageTblMgrObject(pageTableManager);
|
|
|
|
|
}
|
2018-05-05 21:30:37 +02:00
|
|
|
}
|
|
|
|
|
|
2018-05-17 11:47:35 +02:00
|
|
|
GmmPageTableMngr::GmmPageTableMngr(GMM_DEVICE_CALLBACKS_INT *deviceCb, unsigned int translationTableFlags, GMM_TRANSLATIONTABLE_CALLBACKS *translationTableCb) {
|
2018-07-23 12:23:48 +02:00
|
|
|
clientContext = GmmHelper::getClientContext()->getHandle();
|
2018-07-03 10:00:12 +02:00
|
|
|
pageTableManager = clientContext->CreatePageTblMgrObject(deviceCb, translationTableCb, translationTableFlags);
|
2018-05-05 21:30:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace OCLRT
|