aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Beck <david.beck@arm.com>2018-10-16 11:32:20 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-10-22 16:57:54 +0100
commite6488719f58b5dd0e8e23d40b8a4c1337d07e9fd (patch)
treed2430d30c9c79d45910897ac8c60e36ac5fc3c63
parentfbebcbdb589ce7627c578a34a8d05cdb92ccd3db (diff)
downloadarmnn-e6488719f58b5dd0e8e23d40b8a4c1337d07e9fd.tar.gz
IVGCVSW-1998 : indicate deprecated functions and types in the public API
Change-Id: I60644cead5087c2012b663512fb9448dd31523af
-rw-r--r--include/armnn/BackendId.hpp15
-rw-r--r--include/armnn/LayerSupport.hpp28
-rw-r--r--include/armnn/TypesUtils.hpp2
3 files changed, 44 insertions, 1 deletions
diff --git a/include/armnn/BackendId.hpp b/include/armnn/BackendId.hpp
index d1f06beba7..d2479ebb2c 100644
--- a/include/armnn/BackendId.hpp
+++ b/include/armnn/BackendId.hpp
@@ -14,7 +14,7 @@ namespace armnn
//
// The Compute enum is now deprecated and it is now
-// replaced by BackendId
+// being replaced by BackendId
//
enum class Compute
{
@@ -27,6 +27,8 @@ enum class Compute
Undefined = 5
};
+/// Deprecated function that will be removed together with
+/// the Compute enum
constexpr char const* GetComputeDeviceAsCString(Compute compute)
{
switch (compute)
@@ -38,6 +40,8 @@ constexpr char const* GetComputeDeviceAsCString(Compute compute)
}
}
+/// Deprecated function that will be removed together with
+/// the Compute enum
inline std::ostream& operator<<(std::ostream& os, const std::vector<Compute>& compute)
{
for (const Compute& comp : compute) {
@@ -46,6 +50,8 @@ inline std::ostream& operator<<(std::ostream& os, const std::vector<Compute>& co
return os;
}
+/// Deprecated function that will be removed together with
+/// the Compute enum
inline std::ostream& operator<<(std::ostream& os, const std::set<Compute>& compute)
{
for (const Compute& comp : compute) {
@@ -54,6 +60,8 @@ inline std::ostream& operator<<(std::ostream& os, const std::set<Compute>& compu
return os;
}
+/// Deprecated function that will be removed together with
+/// the Compute enum
inline std::ostream& operator<<(std::ostream& os, const Compute& compute)
{
os << GetComputeDeviceAsCString(compute);
@@ -65,6 +73,9 @@ class BackendId final
public:
BackendId(const std::string& id) : m_Id{id} {}
BackendId(const char* id) : m_Id{id} {}
+
+ /// Deprecated function that will be removed together with
+ /// the Compute enum
BackendId(Compute compute) : m_Id{GetComputeDeviceAsCString(compute)} {}
operator std::string() const { return m_Id; }
@@ -75,6 +86,8 @@ public:
return *this;
}
+ /// Deprecated function that will be removed together with
+ /// the Compute enum
BackendId& operator=(Compute compute)
{
BackendId temp{compute};
diff --git a/include/armnn/LayerSupport.hpp b/include/armnn/LayerSupport.hpp
index 8af8240f03..281807cf79 100644
--- a/include/armnn/LayerSupport.hpp
+++ b/include/armnn/LayerSupport.hpp
@@ -12,6 +12,7 @@
namespace armnn
{
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsActivationSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
@@ -19,6 +20,7 @@ bool IsActivationSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsAdditionSupported(const BackendId& backend,
const TensorInfo& input0,
const TensorInfo& input1,
@@ -26,6 +28,7 @@ bool IsAdditionSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsBatchNormalizationSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
@@ -37,23 +40,27 @@ bool IsBatchNormalizationSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsConstantSupported(const BackendId& backend,
const TensorInfo& output,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsConvertFp16ToFp32Supported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsConvertFp32ToFp16Supported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsConvolution2dSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
@@ -63,6 +70,7 @@ bool IsConvolution2dSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsDepthwiseConvolutionSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
@@ -72,6 +80,7 @@ bool IsDepthwiseConvolutionSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsDivisionSupported(const BackendId& backend,
const TensorInfo& input0,
const TensorInfo& input1,
@@ -79,6 +88,7 @@ bool IsDivisionSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsSubtractionSupported(const BackendId& backend,
const TensorInfo& input0,
const TensorInfo& input1,
@@ -86,11 +96,13 @@ bool IsSubtractionSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsInputSupported(const BackendId& backend,
const TensorInfo& input,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsFullyConnectedSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
@@ -100,6 +112,7 @@ bool IsFullyConnectedSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsL2NormalizationSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
@@ -107,6 +120,7 @@ bool IsL2NormalizationSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsLstmSupported(const BackendId& backend, const TensorInfo& input, const TensorInfo& outputStateIn,
const TensorInfo& cellStateIn, const TensorInfo& scratchBuffer,
const TensorInfo& outputStateOut, const TensorInfo& cellStateOut,
@@ -122,12 +136,14 @@ bool IsLstmSupported(const BackendId& backend, const TensorInfo& input, const Te
const TensorInfo* cellToOutputWeights, char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsMergerSupported(const BackendId& backend,
const std::vector<const TensorInfo*> inputs,
const OriginsDescriptor& descriptor,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsMultiplicationSupported(const BackendId& backend,
const TensorInfo& input0,
const TensorInfo& input1,
@@ -135,6 +151,7 @@ bool IsMultiplicationSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsNormalizationSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
@@ -142,11 +159,13 @@ bool IsNormalizationSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsOutputSupported(const BackendId& backend,
const TensorInfo& output,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsPermuteSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
@@ -154,6 +173,7 @@ bool IsPermuteSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsPooling2dSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
@@ -161,11 +181,13 @@ bool IsPooling2dSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsResizeBilinearSupported(const BackendId& backend,
const TensorInfo& input,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsSoftmaxSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
@@ -173,29 +195,34 @@ bool IsSoftmaxSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsSplitterSupported(const BackendId& backend,
const TensorInfo& input,
const ViewsDescriptor& descriptor,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsFakeQuantizationSupported(const BackendId& backend,
const TensorInfo& input,
const FakeQuantizationDescriptor& descriptor,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsReshapeSupported(const BackendId& backend,
const TensorInfo& input,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsFloorSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsMeanSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
@@ -203,6 +230,7 @@ bool IsMeanSupported(const BackendId& backend,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
+/// Deprecated in favor of IBackend and ILayerSupport interfaces
bool IsPadSupported(const BackendId& backend,
const TensorInfo& input,
const TensorInfo& output,
diff --git a/include/armnn/TypesUtils.hpp b/include/armnn/TypesUtils.hpp
index a9755bd112..c7dd856aad 100644
--- a/include/armnn/TypesUtils.hpp
+++ b/include/armnn/TypesUtils.hpp
@@ -98,6 +98,8 @@ constexpr bool StrEqual(const char* strA, const char (&strB)[N])
return isEqual;
}
+/// Deprecated function that will be removed together with
+/// the Compute enum
constexpr armnn::Compute ParseComputeDevice(const char* str)
{
if (armnn::StrEqual(str, "CpuAcc"))