RESCALE and POW: remove rank restriction

Also be consistent to use the term 'rank'
rather than 'dims'.

Change-Id: Ica827fcfd44e9735da2d1a4ddb8cb1fa04c6479b
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
diff --git a/chapters/type_conversion.adoc b/chapters/type_conversion.adoc
index 90452a3..c3d986e 100644
--- a/chapters/type_conversion.adoc
+++ b/chapters/type_conversion.adoc
@@ -65,7 +65,7 @@
     ERROR_IF(!scale32 && double_round);
     int48_t value = tensor_read<in_t>(input, shape, index);
     value = value - input_zp;
-    int c = (per_channel) ? index[dims-1] : 0;
+    int c = (per_channel) ? index[rank(input) - 1] : 0;
     int32_t result = (scale32) ?
         apply_scale_32(value, multiplier[c], shift[c], double_round) :
         apply_scale_16(value, multiplier[c], shift[c]);
diff --git a/tosa.xml b/tosa.xml
index 6674ef0..bc86354 100644
--- a/tosa.xml
+++ b/tosa.xml
@@ -901,7 +901,7 @@
         <name>POW</name>
         <arguments>
           <argument category="input" name="input1" type="in_out_t*" shape="shape1">
-            <description>Input tensor from 1 to 4 dims</description>
+            <description>Input tensor</description>
           </argument>
           <argument category="input" name="input2" type="in_out_t*" shape="shape2">
             <description>Input tensor with the same rank as input1</description>
@@ -1650,7 +1650,7 @@
         <name>REVERSE</name>
         <arguments>
           <argument category="input" name="input" type="in_out_t*" shape="shape">
-            <description>Input tensor from 1 to 4 dims</description>
+            <description>Input tensor with rank from 1 to 4</description>
           </argument>
           <argument category="attribute" name="axis" type="int32_t" shape="-">
             <description>Axis to reverse, in range from 0 to rank(shape)-1</description>
@@ -2004,7 +2004,7 @@
         <name>RESCALE</name>
         <arguments>
           <argument category="input" name="input" type="in_t" shape="shape">
-            <description>Input tensor from 1 to 4 dims</description>
+            <description>Input tensor</description>
           </argument>
           <argument category="output" name="output" type="out_t" shape="shape">
             <description>Output tensor with the same shape as input</description>
@@ -2028,7 +2028,7 @@
             <description>Select double round mode</description>
           </argument>
           <argument category="attribute" name="per_channel" type="bool_t" shape="-">
-            <description>if (per_channel) NC=shape[dims-1] else NC=1</description>
+            <description>if (per_channel) NC=shape[rank(shape)-1] else NC=1</description>
           </argument>
         </arguments>
         <types>