From: Brandon Potter Date: Fri, 17 Aug 2018 00:58:19 +0000 (-0400) Subject: hsail-x86: fix gpu dynamic instruction error X-Git-Tag: v19.0.0.0~1930 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=28d65f8075ddc024048062166c4ea0ccf6034f28;p=gem5.git 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 Reviewed-by: Anthony Gutierrez Maintainer: Anthony Gutierrez --- diff --git a/src/gpu-compute/gpu_dyn_inst.hh b/src/gpu-compute/gpu_dyn_inst.hh index 4b1c9fde9..0d357de38 100644 --- a/src/gpu-compute/gpu_dyn_inst.hh +++ b/src/gpu-compute/gpu_dyn_inst.hh @@ -54,6 +54,7 @@ class AtomicOpAnd : public TypedAtomicOpFunctor AtomicOpAnd(T _a) : a(_a) { } void execute(T *b) { *b &= a; } + AtomicOpFunctor* clone () { return new AtomicOpAnd(a); } }; template @@ -63,6 +64,7 @@ class AtomicOpOr : public TypedAtomicOpFunctor T a; AtomicOpOr(T _a) : a(_a) { } void execute(T *b) { *b |= a; } + AtomicOpFunctor* clone () { return new AtomicOpOr(a); } }; template @@ -72,6 +74,7 @@ class AtomicOpXor : public TypedAtomicOpFunctor T a; AtomicOpXor(T _a) : a(_a) {} void execute(T *b) { *b ^= a; } + AtomicOpFunctor* clone () { return new AtomicOpXor(a); } }; template @@ -101,6 +104,7 @@ class AtomicOpCAS : public TypedAtomicOpFunctor computeUnit->xactCasLoadMap.clear(); } } + AtomicOpFunctor* clone () { return new AtomicOpCAS(c, s, computeUnit); } }; template @@ -110,6 +114,7 @@ class AtomicOpExch : public TypedAtomicOpFunctor T a; AtomicOpExch(T _a) : a(_a) { } void execute(T *b) { *b = a; } + AtomicOpFunctor* clone () { return new AtomicOpExch(a); } }; template @@ -119,6 +124,7 @@ class AtomicOpAdd : public TypedAtomicOpFunctor T a; AtomicOpAdd(T _a) : a(_a) { } void execute(T *b) { *b += a; } + AtomicOpFunctor* clone () { return new AtomicOpAdd(a); } }; template @@ -128,6 +134,7 @@ class AtomicOpSub : public TypedAtomicOpFunctor T a; AtomicOpSub(T _a) : a(_a) { } void execute(T *b) { *b -= a; } + AtomicOpFunctor* clone () { return new AtomicOpSub(a); } }; template @@ -136,6 +143,7 @@ class AtomicOpInc : public TypedAtomicOpFunctor public: AtomicOpInc() { } void execute(T *b) { *b += 1; } + AtomicOpFunctor* clone () { return new AtomicOpInc(); } }; template @@ -144,6 +152,7 @@ class AtomicOpDec : public TypedAtomicOpFunctor public: AtomicOpDec() {} void execute(T *b) { *b -= 1; } + AtomicOpFunctor* clone () { return new AtomicOpDec(); } }; template @@ -159,6 +168,7 @@ class AtomicOpMax : public TypedAtomicOpFunctor if (a > *b) *b = a; } + AtomicOpFunctor* clone () { return new AtomicOpMax(a); } }; template @@ -174,6 +184,7 @@ class AtomicOpMin : public TypedAtomicOpFunctor if (a < *b) *b = a; } + AtomicOpFunctor* clone () { return new AtomicOpMin(a); } }; typedef enum