GreaterQueueDescriptor greaterQueueDescriptor;
greaterQueueDescriptor.m_Inputs = descriptor.m_Inputs;
greaterQueueDescriptor.m_Outputs = descriptor.m_Outputs;
-
- return MakeWorkload<ClGreaterFloat32Workload, ClGreaterUint8Workload>(greaterQueueDescriptor, info);
+ return MakeWorkload<ClGreaterWorkload>(greaterQueueDescriptor, info);
}
return MakeWorkload<NullWorkload, NullWorkload>(descriptor, info);
}
return aclStatus;
}
-template<DataType T>
-ClGreaterWorkload<T>::ClGreaterWorkload(const GreaterQueueDescriptor& descriptor,
- const WorkloadInfo& info)
- : MultiTypedWorkload<GreaterQueueDescriptor, T, DataType::Boolean>(descriptor, info)
+ClGreaterWorkload::ClGreaterWorkload(const GreaterQueueDescriptor& descriptor, const WorkloadInfo& info)
+ : BaseWorkload<GreaterQueueDescriptor>(descriptor, info)
{
m_Data.ValidateInputsOutputs("ClGreaterWorkload", 2, 1);
m_GreaterLayer.configure(&input0, &input1, &output, arm_compute::ComparisonOperation::Greater);
}
-template<DataType T>
-void ClGreaterWorkload<T>::Execute() const
+void ClGreaterWorkload::Execute() const
{
ARMNN_SCOPED_PROFILING_EVENT_CL("ClGreaterWorkload_Execute");
RunClFunction(m_GreaterLayer, CHECK_LOCATION());
}
-template class ClGreaterWorkload<DataType::Float32>;
-template class ClGreaterWorkload<DataType::QAsymmU8>;
-
} //namespace armnn
const TensorInfo& input1,
const TensorInfo& output);
-template<DataType T>
-class ClGreaterWorkload : public MultiTypedWorkload<GreaterQueueDescriptor, T, DataType::Boolean>
+class ClGreaterWorkload : public BaseWorkload<GreaterQueueDescriptor>
{
public:
ClGreaterWorkload(const GreaterQueueDescriptor& descriptor, const WorkloadInfo& info);
void Execute() const override;
private:
- using MultiTypedWorkload<GreaterQueueDescriptor, T, DataType::Boolean>::m_Data;
mutable arm_compute::CLComparison m_GreaterLayer;
};
-using ClGreaterFloat32Workload = ClGreaterWorkload<DataType::Float32>;
-using ClGreaterUint8Workload = ClGreaterWorkload<DataType::QAsymmU8>;
-
} //namespace armnn
GreaterQueueDescriptor greaterQueueDescriptor;
greaterQueueDescriptor.m_Inputs = descriptor.m_Inputs;
greaterQueueDescriptor.m_Outputs = descriptor.m_Outputs;
-
- return MakeWorkloadHelper<NeonGreaterFloat32Workload, NeonGreaterUint8Workload>(greaterQueueDescriptor, info);
+ return std::make_unique<NeonGreaterWorkload>(greaterQueueDescriptor, info);
}
return MakeWorkloadHelper<NullWorkload, NullWorkload>(descriptor, info);
}
&aclOutput);
}
-template <DataType T>
-NeonGreaterWorkload<T>::NeonGreaterWorkload(const GreaterQueueDescriptor& descriptor, const WorkloadInfo& info)
- : MultiTypedWorkload<GreaterQueueDescriptor, T, DataType::Boolean>(descriptor, info)
+NeonGreaterWorkload::NeonGreaterWorkload(const GreaterQueueDescriptor& descriptor, const WorkloadInfo& info)
+ : BaseWorkload<GreaterQueueDescriptor>(descriptor, info)
{
m_Data.ValidateInputsOutputs("NeonGreaterWorkload", 2, 1);
m_GreaterLayer.configure(&input0, &input1, &output);
}
-template <DataType T>
-void NeonGreaterWorkload<T>::Execute() const
+void NeonGreaterWorkload::Execute() const
{
ARMNN_SCOPED_PROFILING_EVENT_NEON("NeonGreaterWorkload_Execute");
m_GreaterLayer.run();
}
-template class NeonGreaterWorkload<DataType::Float32>;
-template class NeonGreaterWorkload<DataType::QAsymmU8>;
-
} //namespace armnn
\ No newline at end of file
const TensorInfo& input1,
const TensorInfo& output);
-template <DataType T>
-class NeonGreaterWorkload : public MultiTypedWorkload<GreaterQueueDescriptor, T, DataType::Boolean>
+class NeonGreaterWorkload : public BaseWorkload<GreaterQueueDescriptor>
{
public:
- using MultiTypedWorkload<GreaterQueueDescriptor, T, DataType::Boolean>::m_Data;
-
NeonGreaterWorkload(const GreaterQueueDescriptor& descriptor, const WorkloadInfo& info);
virtual void Execute() const override;
mutable arm_compute::NEGreater m_GreaterLayer;
};
-using NeonGreaterFloat32Workload = NeonGreaterWorkload<DataType::Float32>;
-using NeonGreaterUint8Workload = NeonGreaterWorkload<DataType::QAsymmU8>;
-
} //namespace armnn
\ No newline at end of file
Optional<std::string&> reasonIfUnsupported) const
{
IgnoreUnused(descriptor);
-
- std::array<DataType, 5> supportedInputTypes =
+ std::array<DataType, 7> supportedInputTypes =
{
+ DataType::Boolean,
DataType::BFloat16,
DataType::Float32,
DataType::Float16,
DataType::QAsymmU8,
- DataType::QSymmS16
+ DataType::QSymmS16,
+ DataType::Signed32
};
bool supported = true;
}
};
+class BooleanDecoder : public TypedIterator<const uint8_t, Decoder<float>>
+{
+public:
+ BooleanDecoder(const uint8_t* data)
+ : TypedIterator(data) {}
+
+ BooleanDecoder()
+ : BooleanDecoder(nullptr) {}
+
+ float Get() const override
+ {
+ return *m_Iterator;
+ }
+
+};
+
class QASymm8Encoder : public TypedIterator<uint8_t, Encoder<float>>
{
public:
info.GetQuantizationOffset());
}
}
+ case armnn::DataType::Boolean:
+ {
+ return std::make_unique<BooleanDecoder>(static_cast<const uint8_t*>(data));
+ }
default:
{
BOOST_ASSERT_MSG(false, "Unsupported Data Type!");