SWDEV-425248 - Fix Unit_ChannelDescriptor_Positive for long.

Limit checks for long based on __LP64__ macro.
Changes are required after below PR got merged.
https://gerrit-git.amd.com/c/compute/ec/clr/+/870326

Change-Id: I51cbaf087a7ba98a441348a13091b92dbb97df21
このコミットが含まれているのは:
Jaydeep Patel
2023-10-30 10:50:20 +00:00
committed by Rakesh Roy
コミット e5d82f128d
3個のファイルの変更、16行の追加、26行の削除
+16 -4
ファイルの表示
@@ -88,7 +88,9 @@ template <typename T> class ChannelDescriptorTest1D : public ChannelDescriptorTe
} else if (std::is_same_v<float, T> || std::is_same_v<float1, T>) {
this->size = static_cast<int>(sizeof(float) * 8);
this->kind = hipChannelFormatKindFloat;
} else if (std::is_same_v<unsigned long, T> || std::is_same_v<ulong1, T>) {
}
#if !defined(__LP64__)
else if (std::is_same_v<unsigned long, T> || std::is_same_v<ulong1, T>) {
this->size = static_cast<int>(sizeof(unsigned long) * 8);
this->kind = hipChannelFormatKindUnsigned;
} else if (std::is_same_v<long, T> || std::is_same_v<signed long, T> ||
@@ -96,6 +98,7 @@ template <typename T> class ChannelDescriptorTest1D : public ChannelDescriptorTe
this->size = static_cast<int>(sizeof(signed long) * 8);
this->kind = hipChannelFormatKindSigned;
}
#endif
}
};
@@ -126,13 +129,16 @@ template <typename T> class ChannelDescriptorTest2D : public ChannelDescriptorTe
} else if (std::is_same_v<float2, T>) {
this->size = static_cast<int>(sizeof(float) * 8);
this->kind = hipChannelFormatKindFloat;
} else if (std::is_same_v<ulong2, T>) {
}
#if !defined(__LP64__)
else if (std::is_same_v<ulong2, T>) {
this->size = static_cast<int>(sizeof(unsigned long) * 8);
this->kind = hipChannelFormatKindUnsigned;
} else if (std::is_same_v<long2, T>) {
this->size = static_cast<int>(sizeof(signed long) * 8);
this->kind = hipChannelFormatKindSigned;
}
#endif
}
};
@@ -164,13 +170,16 @@ template <typename T> class ChannelDescriptorTest3D : public ChannelDescriptorTe
} else if (std::is_same_v<float3, T>) {
this->size = static_cast<int>(sizeof(float) * 8);
this->kind = hipChannelFormatKindFloat;
} else if (std::is_same_v<ulong3, T>) {
}
#if !defined(__LP64__)
else if (std::is_same_v<ulong3, T>) {
this->size = static_cast<int>(sizeof(unsigned long) * 8);
this->kind = hipChannelFormatKindUnsigned;
} else if (std::is_same_v<long3, T>) {
this->size = static_cast<int>(sizeof(signed long) * 8);
this->kind = hipChannelFormatKindSigned;
}
#endif
}
};
#endif
@@ -202,13 +211,16 @@ template <typename T> class ChannelDescriptorTest4D : public ChannelDescriptorTe
} else if (std::is_same_v<float4, T>) {
this->size = static_cast<int>(sizeof(float) * 8);
this->kind = hipChannelFormatKindFloat;
} else if (std::is_same_v<ulong4, T>) {
}
#if !defined(__LP64__)
else if (std::is_same_v<ulong4, T>) {
this->size = static_cast<int>(sizeof(unsigned long) * 8);
this->kind = hipChannelFormatKindUnsigned;
} else if (std::is_same_v<long4, T>) {
this->size = static_cast<int>(sizeof(signed long) * 8);
this->kind = hipChannelFormatKindSigned;
}
#endif
}
};