RFFT2D, refmodel. Correct code when size is one

When width or height are one then H/2 or W/2
are not integral.

Signed-off-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Change-Id: I1a849bec7cbb1d55fd5f085ebe58be45ea0b508e
diff --git a/reference_model/src/ops/tensor_ops.cc b/reference_model/src/ops/tensor_ops.cc
index afd20e9..edc1793 100644
--- a/reference_model/src/ops/tensor_ops.cc
+++ b/reference_model/src/ops/tensor_ops.cc
@@ -1892,7 +1892,8 @@
                         // Imaginary values with locations (0,0), (0,W/2), (H/2,0) and (H/2,W/2) are zero.
                         // But due to sin(M_PI) not returning 0 because of M_PI being approximate, only
                         // add to the imaginary sum when not processing these locations.
-                        if ((ay % (half_in_height)) + (ax % (half_in_width)) > 0)
+                        if ((in_height > 1 && (ay % (half_in_height)) > 0) ||
+                            (in_width > 1 && (ax % (half_in_width)) > 0))
                         {
                             sum_imag += v_ir * a_sin;
                         }