aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/generated/matmul_r4.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/matmul_r4.c')
-rw-r--r--libgfortran/generated/matmul_r4.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libgfortran/generated/matmul_r4.c b/libgfortran/generated/matmul_r4.c
index b1d3eb77c9d..74a4e1c23b9 100644
--- a/libgfortran/generated/matmul_r4.c
+++ b/libgfortran/generated/matmul_r4.c
@@ -48,15 +48,17 @@ Boston, MA 02110-1301, USA. */
C(I,J) = C(I,J)+A(I,K)*B(K,J)
*/
-extern void matmul_r4 (gfc_array_r4 * retarray, gfc_array_r4 * a, gfc_array_r4 * b);
+extern void matmul_r4 (gfc_array_r4 * const restrict retarray,
+ gfc_array_r4 * const restrict a, gfc_array_r4 * const restrict b);
export_proto(matmul_r4);
void
-matmul_r4 (gfc_array_r4 * retarray, gfc_array_r4 * a, gfc_array_r4 * b)
+matmul_r4 (gfc_array_r4 * const restrict retarray,
+ gfc_array_r4 * const restrict a, gfc_array_r4 * const restrict b)
{
- GFC_REAL_4 *abase;
- GFC_REAL_4 *bbase;
- GFC_REAL_4 *dest;
+ const GFC_REAL_4 * restrict abase;
+ const GFC_REAL_4 * restrict bbase;
+ GFC_REAL_4 * restrict dest;
index_type rxstride, rystride, axstride, aystride, bxstride, bystride;
index_type x, y, n, count, xcount, ycount;
@@ -105,12 +107,10 @@ matmul_r4 (gfc_array_r4 * retarray, gfc_array_r4 * a, gfc_array_r4 * b)
retarray->offset = 0;
}
- abase = a->data;
- bbase = b->data;
- dest = retarray->data;
-
if (retarray->dim[0].stride == 0)
retarray->dim[0].stride = 1;
+
+ /* This prevents constifying the input arguments. */
if (a->dim[0].stride == 0)
a->dim[0].stride = 1;
if (b->dim[0].stride == 0)
@@ -175,9 +175,9 @@ matmul_r4 (gfc_array_r4 * retarray, gfc_array_r4 * a, gfc_array_r4 * b)
if (rxstride == 1 && axstride == 1 && bxstride == 1)
{
- GFC_REAL_4 *bbase_y;
- GFC_REAL_4 *dest_y;
- GFC_REAL_4 *abase_n;
+ const GFC_REAL_4 * restrict bbase_y;
+ GFC_REAL_4 * restrict dest_y;
+ const GFC_REAL_4 * restrict abase_n;
GFC_REAL_4 bbase_yn;
if (rystride == ycount)