diff options
author | Brandon Potter <brandon.potter@amd.com> | 2018-08-16 20:58:19 -0400 |
---|---|---|
committer | Brandon Potter <Brandon.Potter@amd.com> | 2018-08-17 16:58:05 +0000 |
commit | 28d65f8075ddc024048062166c4ea0ccf6034f28 (patch) | |
tree | f6d4485b763a76b10c14a6dd583132c71f3e678e | |
parent | c5607563fbcc48d7f84ef41057947a18ebcbdeaf (diff) | |
download | gem5-28d65f8075ddc024048062166c4ea0ccf6034f28.tar.xz |
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 <jason@lowepower.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
-rw-r--r-- | src/gpu-compute/gpu_dyn_inst.hh | 11 |
1 files changed, 11 insertions, 0 deletions
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<T> AtomicOpAnd(T _a) : a(_a) { } void execute(T *b) { *b &= a; } + AtomicOpFunctor* clone () { return new AtomicOpAnd(a); } }; template<typename T> @@ -63,6 +64,7 @@ class AtomicOpOr : public TypedAtomicOpFunctor<T> 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 @@ class AtomicOpXor : public TypedAtomicOpFunctor<T> 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 @@ class AtomicOpCAS : public TypedAtomicOpFunctor<T> computeUnit->xactCasLoadMap.clear(); } } + AtomicOpFunctor* clone () { return new AtomicOpCAS(c, s, computeUnit); } }; template<typename T> @@ -110,6 +114,7 @@ class AtomicOpExch : public TypedAtomicOpFunctor<T> 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 @@ class AtomicOpAdd : public TypedAtomicOpFunctor<T> 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 @@ class AtomicOpSub : public TypedAtomicOpFunctor<T> 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 @@ class AtomicOpInc : public TypedAtomicOpFunctor<T> public: AtomicOpInc() { } void execute(T *b) { *b += 1; } + AtomicOpFunctor* clone () { return new AtomicOpInc(); } }; template<typename T> @@ -144,6 +152,7 @@ class AtomicOpDec : public TypedAtomicOpFunctor<T> public: AtomicOpDec() {} void execute(T *b) { *b -= 1; } + AtomicOpFunctor* clone () { return new AtomicOpDec(); } }; template<typename T> @@ -159,6 +168,7 @@ class AtomicOpMax : public TypedAtomicOpFunctor<T> if (a > *b) *b = a; } + AtomicOpFunctor* clone () { return new AtomicOpMax(a); } }; template<typename T> @@ -174,6 +184,7 @@ class AtomicOpMin : public TypedAtomicOpFunctor<T> if (a < *b) *b = a; } + AtomicOpFunctor* clone () { return new AtomicOpMin(a); } }; typedef enum |