SWDEV-421102 - make clr compatible with c++20

Change-Id: Ia692817232caa3ee97dc0b2139645a0474b582e1
Este commit está contenido en:
Ajay
2023-09-14 11:40:53 -07:00
cometido por Ajay GunaShekar
padre bf88980e0a
commit 2bae1b1387
Se han modificado 7 ficheros con 18 adiciones y 6 borrados
+1 -1
Ver fichero
@@ -440,7 +440,7 @@ hipError_t CodeObject::ExtractCodeObjectFromFile(
std::vector<std::pair<const void*, size_t>>& code_objs) {
hipError_t hip_error = hipSuccess;
if (fdesc < 0) {
if (!amd::Os::isValidFileDesc(fdesc)) {
return hipErrorFileNotFound;
}
+2 -2
Ver fichero
@@ -78,7 +78,7 @@ FatBinaryInfo::~FatBinaryInfo() {
} else {
// Using Runtime Unbundler
if (fdesc_ > 0) {
if (amd::Os::isValidFileDesc(fdesc_)) {
if (fsize_ && !amd::Os::MemoryUnmapFile(image_, fsize_)) {
LogPrintfError("Cannot unmap file for fdesc: %d fsize: %d", fdesc_, fsize_);
assert(false);
@@ -183,7 +183,7 @@ hipError_t FatBinaryInfo::ExtractFatBinaryUsingCOMGR(const std::vector<hip::Devi
#if !defined(_WIN32)
// Using the file descriptor and file size, map the data object.
if (fdesc_ > 0) {
if (amd::Os::isValidFileDesc(fdesc_)) {
guarantee(fsize_ > 0, "Cannot have a file size of 0, fdesc: %d fname: %s \n",
fdesc_, fname_.c_str());
if ((comgr_status = amd_comgr_set_data_from_file_slice(data_object, fdesc_, foffset_,
+10
Ver fichero
@@ -37,6 +37,16 @@
namespace amd {
bool Os::isValidFileDesc(const amd::Os::FileDesc& desc) {
#if defined(_WIN32)
return reinterpret_cast<int>(desc) > 0;
#else
return static_cast<int>(desc) > 0;
#endif
return false;
}
void* Os::loadLibrary(const char* libraryname) {
void* handle;
+2
Ver fichero
@@ -292,6 +292,8 @@ class Os : AllStatic {
//
typedef bool (*SymbolCallback)(std::string, const void*, void*);
//! checks if file descriptor is valid
static bool isValidFileDesc(const amd::Os::FileDesc& desc);
//! Load the shared library named by \a filename
static void* loadLibrary(const char* filename);
//! Unload the shared library.
+1 -1
Ver fichero
@@ -123,7 +123,7 @@ public:
if(pQuery_) pQuery_->Release();
// Check if this resource has already been used for interop
if(resources_.size()) {
for(auto& it = resources_.cbegin(); it != resources_.cend(); it++) {
for(auto it = resources_.cbegin(); it != resources_.cend(); it++) {
if(((pD3D10ResOrig_ && (*it).first == (void*) pD3D10ResOrig_)
|| ((*it).first == (void*) pD3D10Res_))
&& (*it).second == subRes_) {
+1 -1
Ver fichero
@@ -122,7 +122,7 @@ public:
if(pQuery_) pQuery_->Release();
// Check if this resource has already been used for interop
if(resources_.size()) {
for(auto& it = resources_.cbegin(); it != resources_.cend(); it++) {
for(auto it = resources_.cbegin(); it != resources_.cend(); it++) {
if(((pD3D11ResOrig_ && (*it).first == (void*) pD3D11ResOrig_)
|| ((*it).first == (void*) pD3D11Res_))
&& (*it).second.first == subRes_
+1 -1
Ver fichero
@@ -119,7 +119,7 @@ public:
if(pQuery_) pQuery_->Release();
//if the resouce is being used
if(resources_.size()) {
for(auto& it = resources_.cbegin(); it != resources_.cend(); it++) {
for(auto it = resources_.cbegin(); it != resources_.cend(); it++) {
if( surfInfo_.resource &&
((*it).first.surfInfo.resource == surfInfo_.resource) &&
((*it).first.surfPlane == surfPlane_)) {