Files
compute-runtime/runtime/command_stream/tbx_command_stream_receiver.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

33 lines
954 B
C++

/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_stream/tbx_command_stream_receiver.h"
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/helpers/hw_info.h"
#include "runtime/helpers/options.h"
#include <string>
namespace NEO {
TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE] = {};
CommandStreamReceiver *TbxCommandStreamReceiver::create(const std::string &baseName, bool withAubDump, ExecutionEnvironment &executionEnvironment) {
auto hwInfo = executionEnvironment.getHardwareInfo();
if (hwInfo->pPlatform->eRenderCoreFamily >= IGFX_MAX_CORE) {
DEBUG_BREAK_IF(!false);
return nullptr;
}
auto pCreate = tbxCommandStreamReceiverFactory[hwInfo->pPlatform->eRenderCoreFamily];
return pCreate ? pCreate(baseName, withAubDump, executionEnvironment) : nullptr;
}
} // namespace NEO