9b99d758cd
SWDEV-86035 - Add PAL backend to OpenCL - Switch #pragma once Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palappprofile.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbinary.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palconstbuf.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcounters.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldebugger.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldebugmanager.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#4 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#3 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#3 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprintf.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#3 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsched.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palthreadtrace.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paltimestamp.hpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.hpp#3 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palwavelimiter.hpp#2 edit
46 строки
1.1 KiB
C++
46 строки
1.1 KiB
C++
//
|
|
// Copyright (c) 2015 Advanced Micro Devices, Inc. All rights reserved.
|
|
//
|
|
#pragma once
|
|
|
|
#include "top.hpp"
|
|
#include "device/pal/paldevice.hpp"
|
|
#include "device/pal/palkernel.hpp"
|
|
|
|
namespace pal {
|
|
|
|
class ClBinaryHsa : public device::ClBinary
|
|
{
|
|
public:
|
|
ClBinaryHsa(const Device& dev, BinaryImageFormat bifVer = BIF_VERSION3)
|
|
: device::ClBinary(dev, bifVer)
|
|
{}
|
|
|
|
//! Destructor
|
|
~ClBinaryHsa() {}
|
|
|
|
|
|
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);
|
|
return true;
|
|
}
|
|
|
|
private:
|
|
//! Disable default copy constructor
|
|
ClBinaryHsa(const ClBinaryHsa&);
|
|
|
|
//! Disable default operator=
|
|
ClBinaryHsa& operator=(const ClBinaryHsa&);
|
|
|
|
//! Returns the HSA device for this object
|
|
const Device& dev() const { return static_cast<const Device&>(dev_); }
|
|
|
|
};
|
|
|
|
} // namespace pal
|
|
|