mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Move function definitions to cpp file.
Change-Id: I5e4d41d9ccb5ee0502fd628be16a8a810f9534a3
This commit is contained in:
committed by
sys_ocldev
parent
6674e93b69
commit
bdfd90bcf1
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, Intel Corporation
|
* Copyright (c) 2017 - 2018, Intel Corporation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
#include "runtime/built_ins/sip.h"
|
#include "runtime/built_ins/sip.h"
|
||||||
#include "runtime/device/device.h"
|
#include "runtime/device/device.h"
|
||||||
|
#include "runtime/helpers/ptr_math.h"
|
||||||
|
#include "runtime/program/program.h"
|
||||||
#include "runtime/helpers/debug_helpers.h"
|
#include "runtime/helpers/debug_helpers.h"
|
||||||
#include "runtime/helpers/string.h"
|
#include "runtime/helpers/string.h"
|
||||||
|
|
||||||
@@ -76,4 +78,12 @@ SipKernel::SipKernel(SipKernelType type, Program *sipProgram)
|
|||||||
: type(type) {
|
: type(type) {
|
||||||
program.reset(sipProgram);
|
program.reset(sipProgram);
|
||||||
}
|
}
|
||||||
|
const char *SipKernel::getBinary() const {
|
||||||
|
auto kernelInfo = program->getKernelInfo(size_t{0});
|
||||||
|
return reinterpret_cast<const char *>(ptrOffset(kernelInfo->heapInfo.pKernelHeap, kernelInfo->systemKernelOffset));
|
||||||
|
}
|
||||||
|
size_t SipKernel::getBinarySize() const {
|
||||||
|
auto kernelInfo = program->getKernelInfo(size_t{0});
|
||||||
|
return kernelInfo->heapInfo.pKernelHeader->KernelHeapSize - kernelInfo->systemKernelOffset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, Intel Corporation
|
* Copyright (c) 2017 - 2018, Intel Corporation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -24,12 +24,11 @@
|
|||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "runtime/helpers/ptr_math.h"
|
|
||||||
#include "runtime/program/program.h"
|
|
||||||
|
|
||||||
namespace OCLRT {
|
namespace OCLRT {
|
||||||
|
|
||||||
class Device;
|
class Device;
|
||||||
|
class Program;
|
||||||
|
|
||||||
enum class SipKernelType : std::uint32_t {
|
enum class SipKernelType : std::uint32_t {
|
||||||
Csr = 0,
|
Csr = 0,
|
||||||
@@ -50,15 +49,9 @@ class SipKernel {
|
|||||||
SipKernel(SipKernel &&) = default;
|
SipKernel(SipKernel &&) = default;
|
||||||
SipKernel &operator=(SipKernel &&) = default;
|
SipKernel &operator=(SipKernel &&) = default;
|
||||||
|
|
||||||
const char *getBinary() const {
|
const char *getBinary() const;
|
||||||
auto kernelInfo = program->getKernelInfo(size_t{0});
|
|
||||||
return reinterpret_cast<const char *>(ptrOffset(kernelInfo->heapInfo.pKernelHeap, kernelInfo->systemKernelOffset));
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t getBinarySize() const {
|
size_t getBinarySize() const;
|
||||||
auto kernelInfo = program->getKernelInfo(size_t{0});
|
|
||||||
return kernelInfo->heapInfo.pKernelHeader->KernelHeapSize - kernelInfo->systemKernelOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
SipKernelType getType() const {
|
SipKernelType getType() const {
|
||||||
return type;
|
return type;
|
||||||
|
|||||||
Reference in New Issue
Block a user