Files
rocm-systems/rocclr/runtime/device/rocm/rocbinary.hpp
T
foreman 0c526a2e0d P4 to Git Change 1409878 by lmoriche@lmoriche_palamida on 2017/05/15 19:30:18
SWDEV-121585 - [OCL-LC-ROCm] Merge GitHub pull requests
	- Merged https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/pull/4

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_gl.cpp#55 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/appprofile.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocbinary.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#18 edit
... //depot/stg/opencl/drivers/opencl/runtime/os/os_win32.cpp#48 edit
2017-05-15 19:42:30 -04:00

46 líneas
1.1 KiB
C++

//
// Copyright (c) 2009 Advanced Micro Devices, Inc. All rights reserved.
//
#pragma once
#include "top.hpp"
#include "rocdevice.hpp"
#ifndef WITHOUT_HSA_BACKEND
namespace roc {
typedef std::map<std::string, device::Kernel*> NameKernelMap;
class ClBinary : public device::ClBinary {
public:
ClBinary(const Device& dev, BinaryImageFormat bifVer = BIF_VERSION3)
: device::ClBinary(dev, bifVer) {}
//! Destructor
~ClBinary() {}
protected:
bool setElfTarget() {
uint32_t target = static_cast<uint32_t>(21); // dev().calTarget());
assert(((0xFFFF8000 & target) == 0) && "ASIC target ID >= 2^15");
uint16_t elf_target = (uint16_t)(0x7FFF & target);
return elfOut()->setTarget(elf_target, amd::OclElf::CAL_PLATFORM);
}
private:
//! Disable default copy constructor
ClBinary(const ClBinary&);
//! Disable default operator=
ClBinary& operator=(const ClBinary&);
//! Returns the HSA device for this object
const Device& dev() const { return static_cast<const Device&>(dev_); }
};
} // namespace roc
#endif // WITHOUT_HSA_BACKEND