From cf072968de151ec0f754470eda82b50ffbfafec6 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 14 Jan 2020 17:56:39 -0500
Subject: [PATCH] P4 to Git Change 2056728 by vsytchen@vsytchen-ocl-win10-2 on
2020/01/14 17:54:16
SWDEV-79445 - OCL generic changes and code clean-up
Alllow amd::Coord3D to decay into size_t*. This allows creating an amd::BufferRect obect without the need of explicitly passing size_t[3] arguments.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/18473/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/object.hpp#20 edit
[ROCm/clr commit: a9b467ba7b922c10f77ed7d86f3a245b30bda9f4]
---
projects/clr/rocclr/runtime/platform/object.hpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/projects/clr/rocclr/runtime/platform/object.hpp b/projects/clr/rocclr/runtime/platform/object.hpp
index e71948f0f2..aa1fb9ba3c 100644
--- a/projects/clr/rocclr/runtime/platform/object.hpp
+++ b/projects/clr/rocclr/runtime/platform/object.hpp
@@ -205,6 +205,9 @@ struct Coord3D {
bool operator==(const Coord3D& rhs) const {
return c[0] == rhs.c[0] && c[1] == rhs.c[1] && c[2] == rhs.c[2];
}
+ operator size_t*() {
+ return &c[0];
+ }
};
} // namespace amd