IVGCVSW-4038 Convert Strided_Slice Shrink_Axis_Mask Parameter to ACL format

 * Add conversion method to reverse bits in Shrink_Axis_Mask
 * Add Unit tests for Neon, CL and Reference backends
 * Fix supportedness of constant layer which is causing error
   in DeepSpeech Uint8
 * Also convert the Begin_Mask and End_Mask

Change-Id: I448b083c3463558e8fb5204923ab554cd43264ba
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
diff --git a/src/backends/backendsCommon/WorkloadUtils.cpp b/src/backends/backendsCommon/WorkloadUtils.cpp
index 9e008ca..385d970 100644
--- a/src/backends/backendsCommon/WorkloadUtils.cpp
+++ b/src/backends/backendsCommon/WorkloadUtils.cpp
@@ -184,4 +184,18 @@
     return weightPermuted;
 }
 
+int32_t ConvertMaskToACLFormat(int32_t mask, int32_t numDim)
+{
+    int32_t reversedMask = 0;
+    for (unsigned int i = 0; i < boost::numeric_cast<unsigned int>(numDim); ++i)
+    {
+        // Check if bit set in mask for each dimension
+        int32_t bit = (mask & 1 << i) != 0;
+        // Increment the new mask with the bits reversed
+        reversedMask += (bit << std::max(numDim-(boost::numeric_cast<int>(i)+1), 0));
+    }
+
+    return reversedMask;
+}
+
 } // namespace armnn