Brandon Potter has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/12108 )

Change subject: hsail-x86: fix gpu dynamic instruction error
......................................................................

hsail-x86: fix gpu dynamic instruction error

The gpu_dyn_inst.hh file was missing a clone method from
inherited classes. (The clone method is the way to implement
the prototype design pattern.) Because the inherited clone
method was declare as pure virtual, the method needed to
be implemented. Otherwise, the compiler complains that the
class is abstract.

Change-Id: I38782d5f7379f32be886401f7c127fe60d2f8811
Reviewed-on: https://gem5-review.googlesource.com/12108
Reviewed-by: Jason Lowe-Power <[email protected]>
Reviewed-by: Anthony Gutierrez <[email protected]>
Maintainer: Anthony Gutierrez <[email protected]>
---
M src/gpu-compute/gpu_dyn_inst.hh
1 file changed, 11 insertions(+), 0 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Anthony Gutierrez: Looks good to me, approved; Looks good to me, approved



diff --git a/src/gpu-compute/gpu_dyn_inst.hh b/src/gpu-compute/gpu_dyn_inst.hh
index 4b1c9fd..0d357de 100644
--- a/src/gpu-compute/gpu_dyn_inst.hh
+++ b/src/gpu-compute/gpu_dyn_inst.hh
@@ -54,6 +54,7 @@

     AtomicOpAnd(T _a) : a(_a) { }
     void execute(T *b) { *b &= a; }
+    AtomicOpFunctor* clone () { return new AtomicOpAnd(a); }
 };

 template<typename T>
@@ -63,6 +64,7 @@
     T a;
     AtomicOpOr(T _a) : a(_a) { }
     void execute(T *b) { *b |= a; }
+    AtomicOpFunctor* clone () { return new AtomicOpOr(a); }
 };

 template<typename T>
@@ -72,6 +74,7 @@
     T a;
     AtomicOpXor(T _a) : a(_a) {}
     void execute(T *b) { *b ^= a; }
+    AtomicOpFunctor* clone () { return new AtomicOpXor(a); }
 };

 template<typename T>
@@ -101,6 +104,7 @@
             computeUnit->xactCasLoadMap.clear();
         }
     }
+ AtomicOpFunctor* clone () { return new AtomicOpCAS(c, s, computeUnit); }
 };

 template<typename T>
@@ -110,6 +114,7 @@
     T a;
     AtomicOpExch(T _a) : a(_a) { }
     void execute(T *b) { *b = a; }
+    AtomicOpFunctor* clone () { return new AtomicOpExch(a); }
 };

 template<typename T>
@@ -119,6 +124,7 @@
     T a;
     AtomicOpAdd(T _a) : a(_a) { }
     void execute(T *b) { *b += a; }
+    AtomicOpFunctor* clone () { return new AtomicOpAdd(a); }
 };

 template<typename T>
@@ -128,6 +134,7 @@
     T a;
     AtomicOpSub(T _a) : a(_a) { }
     void execute(T *b) { *b -= a; }
+    AtomicOpFunctor* clone () { return new AtomicOpSub(a); }
 };

 template<typename T>
@@ -136,6 +143,7 @@
   public:
     AtomicOpInc() { }
     void execute(T *b) { *b += 1; }
+    AtomicOpFunctor* clone () { return new AtomicOpInc(); }
 };

 template<typename T>
@@ -144,6 +152,7 @@
   public:
     AtomicOpDec() {}
     void execute(T *b) { *b -= 1; }
+    AtomicOpFunctor* clone () { return new AtomicOpDec(); }
 };

 template<typename T>
@@ -159,6 +168,7 @@
         if (a > *b)
             *b = a;
     }
+    AtomicOpFunctor* clone () { return new AtomicOpMax(a); }
 };

 template<typename T>
@@ -174,6 +184,7 @@
         if (a < *b)
             *b = a;
     }
+    AtomicOpFunctor* clone () { return new AtomicOpMin(a); }
 };

 typedef enum

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12108
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I38782d5f7379f32be886401f7c127fe60d2f8811
Gerrit-Change-Number: 12108
Gerrit-PatchSet: 2
Gerrit-Owner: Brandon Potter <[email protected]>
Gerrit-Reviewer: Anthony Gutierrez <[email protected]>
Gerrit-Reviewer: Brandon Potter <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to