]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/matmul_i4.c
Update copyright years.
[thirdparty/gcc.git] / libgfortran / generated / matmul_i4.c
index ab14a0a3ff3c8a9bafd381a01fd0f365d95cc158..d09276a227e689dff753f11ef83ffdcc11d4b820 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the MATMUL intrinsic
-   Copyright (C) 2002-2020 Free Software Foundation, Inc.
+   Copyright (C) 2002-2023 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
 This file is part of the GNU Fortran runtime library (libgfortran).
@@ -276,7 +276,8 @@ matmul_i4_avx (gfc_array_i4 * const restrict retarray,
        }
     }
 
-  if (rxstride == 1 && axstride == 1 && bxstride == 1)
+  if (rxstride == 1 && axstride == 1 && bxstride == 1
+      && GFC_DESCRIPTOR_RANK (b) != 1)
     {
       /* This block of code implements a tuned matmul, derived from
          Superscalar GEMM-based level 3 BLAS,  Beta version 0.1
@@ -590,20 +591,6 @@ matmul_i4_avx (gfc_array_i4 * const restrict retarray,
            }
        }
     }
-  else if (axstride < aystride)
-    {
-      for (y = 0; y < ycount; y++)
-       for (x = 0; x < xcount; x++)
-         dest[x*rxstride + y*rystride] = (GFC_INTEGER_4)0;
-
-      for (y = 0; y < ycount; y++)
-       for (n = 0; n < count; n++)
-         for (x = 0; x < xcount; x++)
-           /* dest[x,y] += a[x,n] * b[n,y] */
-           dest[x*rxstride + y*rystride] +=
-                                       abase[x*axstride + n*aystride] *
-                                       bbase[n*bxstride + y*bystride];
-    }
   else if (GFC_DESCRIPTOR_RANK (a) == 1)
     {
       const GFC_INTEGER_4 *restrict bbase_y;
@@ -618,6 +605,20 @@ matmul_i4_avx (gfc_array_i4 * const restrict retarray,
          dest[y*rxstride] = s;
        }
     }
+  else if (axstride < aystride)
+    {
+      for (y = 0; y < ycount; y++)
+       for (x = 0; x < xcount; x++)
+         dest[x*rxstride + y*rystride] = (GFC_INTEGER_4)0;
+
+      for (y = 0; y < ycount; y++)
+       for (n = 0; n < count; n++)
+         for (x = 0; x < xcount; x++)
+           /* dest[x,y] += a[x,n] * b[n,y] */
+           dest[x*rxstride + y*rystride] +=
+                                       abase[x*axstride + n*aystride] *
+                                       bbase[n*bxstride + y*bystride];
+    }
   else
     {
       const GFC_INTEGER_4 *restrict abase_x;
@@ -844,7 +845,8 @@ matmul_i4_avx2 (gfc_array_i4 * const restrict retarray,
        }
     }
 
-  if (rxstride == 1 && axstride == 1 && bxstride == 1)
+  if (rxstride == 1 && axstride == 1 && bxstride == 1
+      && GFC_DESCRIPTOR_RANK (b) != 1)
     {
       /* This block of code implements a tuned matmul, derived from
          Superscalar GEMM-based level 3 BLAS,  Beta version 0.1
@@ -1158,20 +1160,6 @@ matmul_i4_avx2 (gfc_array_i4 * const restrict retarray,
            }
        }
     }
-  else if (axstride < aystride)
-    {
-      for (y = 0; y < ycount; y++)
-       for (x = 0; x < xcount; x++)
-         dest[x*rxstride + y*rystride] = (GFC_INTEGER_4)0;
-
-      for (y = 0; y < ycount; y++)
-       for (n = 0; n < count; n++)
-         for (x = 0; x < xcount; x++)
-           /* dest[x,y] += a[x,n] * b[n,y] */
-           dest[x*rxstride + y*rystride] +=
-                                       abase[x*axstride + n*aystride] *
-                                       bbase[n*bxstride + y*bystride];
-    }
   else if (GFC_DESCRIPTOR_RANK (a) == 1)
     {
       const GFC_INTEGER_4 *restrict bbase_y;
@@ -1186,6 +1174,20 @@ matmul_i4_avx2 (gfc_array_i4 * const restrict retarray,
          dest[y*rxstride] = s;
        }
     }
+  else if (axstride < aystride)
+    {
+      for (y = 0; y < ycount; y++)
+       for (x = 0; x < xcount; x++)
+         dest[x*rxstride + y*rystride] = (GFC_INTEGER_4)0;
+
+      for (y = 0; y < ycount; y++)
+       for (n = 0; n < count; n++)
+         for (x = 0; x < xcount; x++)
+           /* dest[x,y] += a[x,n] * b[n,y] */
+           dest[x*rxstride + y*rystride] +=
+                                       abase[x*axstride + n*aystride] *
+                                       bbase[n*bxstride + y*bystride];
+    }
   else
     {
       const GFC_INTEGER_4 *restrict abase_x;
@@ -1412,7 +1414,8 @@ matmul_i4_avx512f (gfc_array_i4 * const restrict retarray,
        }
     }
 
-  if (rxstride == 1 && axstride == 1 && bxstride == 1)
+  if (rxstride == 1 && axstride == 1 && bxstride == 1
+      && GFC_DESCRIPTOR_RANK (b) != 1)
     {
       /* This block of code implements a tuned matmul, derived from
          Superscalar GEMM-based level 3 BLAS,  Beta version 0.1
@@ -1726,20 +1729,6 @@ matmul_i4_avx512f (gfc_array_i4 * const restrict retarray,
            }
        }
     }
-  else if (axstride < aystride)
-    {
-      for (y = 0; y < ycount; y++)
-       for (x = 0; x < xcount; x++)
-         dest[x*rxstride + y*rystride] = (GFC_INTEGER_4)0;
-
-      for (y = 0; y < ycount; y++)
-       for (n = 0; n < count; n++)
-         for (x = 0; x < xcount; x++)
-           /* dest[x,y] += a[x,n] * b[n,y] */
-           dest[x*rxstride + y*rystride] +=
-                                       abase[x*axstride + n*aystride] *
-                                       bbase[n*bxstride + y*bystride];
-    }
   else if (GFC_DESCRIPTOR_RANK (a) == 1)
     {
       const GFC_INTEGER_4 *restrict bbase_y;
@@ -1754,6 +1743,20 @@ matmul_i4_avx512f (gfc_array_i4 * const restrict retarray,
          dest[y*rxstride] = s;
        }
     }
+  else if (axstride < aystride)
+    {
+      for (y = 0; y < ycount; y++)
+       for (x = 0; x < xcount; x++)
+         dest[x*rxstride + y*rystride] = (GFC_INTEGER_4)0;
+
+      for (y = 0; y < ycount; y++)
+       for (n = 0; n < count; n++)
+         for (x = 0; x < xcount; x++)
+           /* dest[x,y] += a[x,n] * b[n,y] */
+           dest[x*rxstride + y*rystride] +=
+                                       abase[x*axstride + n*aystride] *
+                                       bbase[n*bxstride + y*bystride];
+    }
   else
     {
       const GFC_INTEGER_4 *restrict abase_x;
@@ -1994,7 +1997,8 @@ matmul_i4_vanilla (gfc_array_i4 * const restrict retarray,
        }
     }
 
-  if (rxstride == 1 && axstride == 1 && bxstride == 1)
+  if (rxstride == 1 && axstride == 1 && bxstride == 1
+      && GFC_DESCRIPTOR_RANK (b) != 1)
     {
       /* This block of code implements a tuned matmul, derived from
          Superscalar GEMM-based level 3 BLAS,  Beta version 0.1
@@ -2308,20 +2312,6 @@ matmul_i4_vanilla (gfc_array_i4 * const restrict retarray,
            }
        }
     }
-  else if (axstride < aystride)
-    {
-      for (y = 0; y < ycount; y++)
-       for (x = 0; x < xcount; x++)
-         dest[x*rxstride + y*rystride] = (GFC_INTEGER_4)0;
-
-      for (y = 0; y < ycount; y++)
-       for (n = 0; n < count; n++)
-         for (x = 0; x < xcount; x++)
-           /* dest[x,y] += a[x,n] * b[n,y] */
-           dest[x*rxstride + y*rystride] +=
-                                       abase[x*axstride + n*aystride] *
-                                       bbase[n*bxstride + y*bystride];
-    }
   else if (GFC_DESCRIPTOR_RANK (a) == 1)
     {
       const GFC_INTEGER_4 *restrict bbase_y;
@@ -2336,6 +2326,20 @@ matmul_i4_vanilla (gfc_array_i4 * const restrict retarray,
          dest[y*rxstride] = s;
        }
     }
+  else if (axstride < aystride)
+    {
+      for (y = 0; y < ycount; y++)
+       for (x = 0; x < xcount; x++)
+         dest[x*rxstride + y*rystride] = (GFC_INTEGER_4)0;
+
+      for (y = 0; y < ycount; y++)
+       for (n = 0; n < count; n++)
+         for (x = 0; x < xcount; x++)
+           /* dest[x,y] += a[x,n] * b[n,y] */
+           dest[x*rxstride + y*rystride] +=
+                                       abase[x*axstride + n*aystride] *
+                                       bbase[n*bxstride + y*bystride];
+    }
   else
     {
       const GFC_INTEGER_4 *restrict abase_x;
@@ -2635,7 +2639,8 @@ matmul_i4 (gfc_array_i4 * const restrict retarray,
        }
     }
 
-  if (rxstride == 1 && axstride == 1 && bxstride == 1)
+  if (rxstride == 1 && axstride == 1 && bxstride == 1
+      && GFC_DESCRIPTOR_RANK (b) != 1)
     {
       /* This block of code implements a tuned matmul, derived from
          Superscalar GEMM-based level 3 BLAS,  Beta version 0.1
@@ -2949,20 +2954,6 @@ matmul_i4 (gfc_array_i4 * const restrict retarray,
            }
        }
     }
-  else if (axstride < aystride)
-    {
-      for (y = 0; y < ycount; y++)
-       for (x = 0; x < xcount; x++)
-         dest[x*rxstride + y*rystride] = (GFC_INTEGER_4)0;
-
-      for (y = 0; y < ycount; y++)
-       for (n = 0; n < count; n++)
-         for (x = 0; x < xcount; x++)
-           /* dest[x,y] += a[x,n] * b[n,y] */
-           dest[x*rxstride + y*rystride] +=
-                                       abase[x*axstride + n*aystride] *
-                                       bbase[n*bxstride + y*bystride];
-    }
   else if (GFC_DESCRIPTOR_RANK (a) == 1)
     {
       const GFC_INTEGER_4 *restrict bbase_y;
@@ -2977,6 +2968,20 @@ matmul_i4 (gfc_array_i4 * const restrict retarray,
          dest[y*rxstride] = s;
        }
     }
+  else if (axstride < aystride)
+    {
+      for (y = 0; y < ycount; y++)
+       for (x = 0; x < xcount; x++)
+         dest[x*rxstride + y*rystride] = (GFC_INTEGER_4)0;
+
+      for (y = 0; y < ycount; y++)
+       for (n = 0; n < count; n++)
+         for (x = 0; x < xcount; x++)
+           /* dest[x,y] += a[x,n] * b[n,y] */
+           dest[x*rxstride + y*rystride] +=
+                                       abase[x*axstride + n*aystride] *
+                                       bbase[n*bxstride + y*bystride];
+    }
   else
     {
       const GFC_INTEGER_4 *restrict abase_x;