aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/ops/reduction.h
diff options
context:
space:
mode:
Diffstat (limited to 'reference_model/src/ops/reduction.h')
-rw-r--r--reference_model/src/ops/reduction.h38
1 files changed, 29 insertions, 9 deletions
diff --git a/reference_model/src/ops/reduction.h b/reference_model/src/ops/reduction.h
index 6e98a76..aeb9f1d 100644
--- a/reference_model/src/ops/reduction.h
+++ b/reference_model/src/ops/reduction.h
@@ -1,5 +1,5 @@
-// Copyright (c) 2020, ARM Limited.
+// Copyright (c) 2020-2023, ARM Limited.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@ using namespace tosa;
namespace TosaReference
{
-template <int Rank, DType Dtype>
+template <int Rank, TOSA_REF_TYPE Dtype>
class ReduceNode : public GraphNode
{
public:
@@ -44,7 +44,7 @@ protected:
TosaAxisAttribute* attribute;
};
-template <int Rank, DType Dtype>
+template <int Rank, TOSA_REF_TYPE Dtype>
class OpReduceAll : public ReduceNode<Rank, Dtype>
{
public:
@@ -54,7 +54,7 @@ public:
virtual int eval();
};
-template <int Rank, DType Dtype>
+template <int Rank, TOSA_REF_TYPE Dtype>
class OpReduceAny : public ReduceNode<Rank, Dtype>
{
public:
@@ -64,7 +64,7 @@ public:
virtual int eval();
};
-template <int Rank, DType Dtype>
+template <int Rank, TOSA_REF_TYPE Dtype>
class OpReduceMax : public ReduceNode<Rank, Dtype>
{
public:
@@ -74,7 +74,7 @@ public:
virtual int eval();
};
-template <int Rank, DType Dtype>
+template <int Rank, TOSA_REF_TYPE Dtype>
class OpReduceMin : public ReduceNode<Rank, Dtype>
{
public:
@@ -84,7 +84,7 @@ public:
virtual int eval();
};
-template <int Rank, DType Dtype>
+template <int Rank, TOSA_REF_TYPE Dtype>
class OpReduceProduct : public ReduceNode<Rank, Dtype>
{
public:
@@ -94,7 +94,17 @@ public:
virtual int eval();
};
-template <int Rank, DType Dtype>
+template <int Rank, TOSA_REF_TYPE Dtype>
+class OpReduceProductDouble : public ReduceNode<Rank, Dtype>
+{
+public:
+ OpReduceProductDouble(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, uint64_t id_)
+ : ReduceNode<Rank, Dtype>(sgt_, Op_REDUCE_PRODUCT, attribute_, id_)
+ {}
+ virtual int eval();
+};
+
+template <int Rank, TOSA_REF_TYPE Dtype>
class OpReduceSum : public ReduceNode<Rank, Dtype>
{
public:
@@ -104,7 +114,7 @@ public:
virtual int eval();
};
-template <int Rank, DType Dtype>
+template <int Rank, TOSA_REF_TYPE Dtype>
class OpReduceSumInt : public ReduceNode<Rank, Dtype>
{
public:
@@ -114,6 +124,16 @@ public:
virtual int eval();
};
+template <int Rank, TOSA_REF_TYPE Dtype>
+class OpReduceSumDouble : public ReduceNode<Rank, Dtype>
+{
+public:
+ OpReduceSumDouble(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, uint64_t id_)
+ : ReduceNode<Rank, Dtype>(sgt_, Op_REDUCE_SUM, attribute_, id_)
+ {}
+ virtual int eval();
+};
+
}; // namespace TosaReference
#endif