diff options
author | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-14 19:48:31 +0000 |
---|---|---|
committer | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-14 19:48:31 +0000 |
commit | 02013060b6833482f7f0f191caea397cbbae8758 (patch) | |
tree | ea9d35216d30a0f95f4bdaf4358cdd30d1cf0613 /libgfortran/generated/matmul_i8.c | |
parent | c18d1f2a333abb4617c85222ac42d91a11af5f83 (diff) | |
download | gcc-02013060b6833482f7f0f191caea397cbbae8758.tar.gz |
2005-11-14 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/21468
* Makefile.am: Add -ftree-vectorize for compiling matmul.
* m4/matmul.m4: Add const and restrict to type declarations as
appropriate.
* m4/matmull.m4: Likewise.
* Makefile.in: Regenerated.
* generated/matmul_*.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106898 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/generated/matmul_i8.c')
-rw-r--r-- | libgfortran/generated/matmul_i8.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libgfortran/generated/matmul_i8.c b/libgfortran/generated/matmul_i8.c index 9820e405cd0..ceadbe3c801 100644 --- a/libgfortran/generated/matmul_i8.c +++ b/libgfortran/generated/matmul_i8.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_i8 (gfc_array_i8 * retarray, gfc_array_i8 * a, gfc_array_i8 * b); +extern void matmul_i8 (gfc_array_i8 * const restrict retarray, + gfc_array_i8 * const restrict a, gfc_array_i8 * const restrict b); export_proto(matmul_i8); void -matmul_i8 (gfc_array_i8 * retarray, gfc_array_i8 * a, gfc_array_i8 * b) +matmul_i8 (gfc_array_i8 * const restrict retarray, + gfc_array_i8 * const restrict a, gfc_array_i8 * const restrict b) { - GFC_INTEGER_8 *abase; - GFC_INTEGER_8 *bbase; - GFC_INTEGER_8 *dest; + const GFC_INTEGER_8 * restrict abase; + const GFC_INTEGER_8 * restrict bbase; + GFC_INTEGER_8 * restrict dest; index_type rxstride, rystride, axstride, aystride, bxstride, bystride; index_type x, y, n, count, xcount, ycount; @@ -105,12 +107,10 @@ matmul_i8 (gfc_array_i8 * retarray, gfc_array_i8 * a, gfc_array_i8 * 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_i8 (gfc_array_i8 * retarray, gfc_array_i8 * a, gfc_array_i8 * b) if (rxstride == 1 && axstride == 1 && bxstride == 1) { - GFC_INTEGER_8 *bbase_y; - GFC_INTEGER_8 *dest_y; - GFC_INTEGER_8 *abase_n; + const GFC_INTEGER_8 * restrict bbase_y; + GFC_INTEGER_8 * restrict dest_y; + const GFC_INTEGER_8 * restrict abase_n; GFC_INTEGER_8 bbase_yn; if (rystride == ycount) |