From 3ef2513a1d3a2497773f9aa37ac1242e88df8652 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Fri, 21 Mar 2008 14:37:03 +0000 Subject: re PR libfortran/32972 (performance of pack/unpack) 2008-03-21 Thomas Koenig PR libfortran/32972 * Makefile.am: Add new variable, i_pack_c, containing pack_i1.c, pack_i2.c, pack_i4.c, pack_i8.c, pack_i16.c, pack_r4.c, pack_r8.c, pack_r10.c, pack_r16.c, pack_c4.c, pack_c8.c, pack_c10.c, pack_c16.c. Add m4/pack.m4 to m4_files. Add i_pack_c to gfor_built_src. Add rule to generate i_pack_c from m4/pack.m4. * Makefile.in: Regenerated. * libgfortran.h: Add prototypes for pack_i1, pack_i2, pack_i4, pack_i8, pack_i16, pack_r4, pack_r8, pack_c4, pack_c8, pack_c10, pack_c16. * intrinsics/pack_generic.c: Add calls to specific pack functions. * m4/pack.m4: New file. * generated/pack_i1.c: New file. * generated/pack_i2.c: New file. * generated/pack_i4.c: New file. * generated/pack_i8.c: New file. * generated/pack_i16.c: New file. * generated/pack_r4.c: New file. * generated/pack_r8.c: New file. * generated/pack_r10.c: New file. * generated/pack_r16.c: New file. * generated/pack_c4.c: New file. * generated/pack_c8.c: New file. * generated/pack_c10.c: New file. * generated/pack_c16.c: New file. 2008-03-21 Thomas Koenig PR libfortran/32972 * internal_pack_1.f90: New test case. * internal_pack_2.f90: New test case. * internal_pack_3.f90: New test case. From-SVN: r133427 --- libgfortran/libgfortran.h | 64 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'libgfortran/libgfortran.h') diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index 98af40e..a2b023b 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -710,6 +710,70 @@ extern void internal_unpack_c16 (gfc_array_c16 *, const GFC_COMPLEX_16 *); internal_proto(internal_unpack_c16); #endif +/* Internal auxiliary functions for the pack intrinsic. */ + +extern void pack_i1 (gfc_array_i1 *, const gfc_array_i1 *, + const gfc_array_l1 *, const gfc_array_i1 *); +internal_proto(pack_i1); + +extern void pack_i2 (gfc_array_i2 *, const gfc_array_i2 *, + const gfc_array_l1 *, const gfc_array_i2 *); +internal_proto(pack_i2); + +extern void pack_i4 (gfc_array_i4 *, const gfc_array_i4 *, + const gfc_array_l1 *, const gfc_array_i4 *); +internal_proto(pack_i4); + +extern void pack_i8 (gfc_array_i8 *, const gfc_array_i8 *, + const gfc_array_l1 *, const gfc_array_i8 *); +internal_proto(pack_i8); + +#ifdef HAVE_GFC_INTEGER_16 +extern void pack_i16 (gfc_array_i16 *, const gfc_array_i16 *, + const gfc_array_l1 *, const gfc_array_i16 *); +internal_proto(pack_i16); +#endif + +extern void pack_r4 (gfc_array_r4 *, const gfc_array_r4 *, + const gfc_array_l1 *, const gfc_array_r4 *); +internal_proto(pack_r4); + +extern void pack_r8 (gfc_array_r8 *, const gfc_array_r8 *, + const gfc_array_l1 *, const gfc_array_r8 *); +internal_proto(pack_r8); + +#ifdef HAVE_GFC_REAL_10 +extern void pack_r10 (gfc_array_r10 *, const gfc_array_r10 *, + const gfc_array_l1 *, const gfc_array_r10 *); +internal_proto(pack_r10); +#endif + +#ifdef HAVE_GFC_REAL_16 +extern void pack_r16 (gfc_array_r16 *, const gfc_array_r16 *, + const gfc_array_l1 *, const gfc_array_r16 *); +internal_proto(pack_r16); +#endif + +extern void pack_c4 (gfc_array_c4 *, const gfc_array_c4 *, + const gfc_array_l1 *, const gfc_array_c4 *); +internal_proto(pack_c4); + +extern void pack_c8 (gfc_array_c8 *, const gfc_array_c8 *, + const gfc_array_l1 *, const gfc_array_c8 *); +internal_proto(pack_c8); + +#ifdef HAVE_GFC_REAL_10 +extern void pack_c10 (gfc_array_c10 *, const gfc_array_c10 *, + const gfc_array_l1 *, const gfc_array_c10 *); +internal_proto(pack_c10); +#endif + +#ifdef HAVE_GFC_REAL_16 +extern void pack_c16 (gfc_array_c16 *, const gfc_array_c16 *, + const gfc_array_l1 *, const gfc_array_c16 *); +internal_proto(pack_c16); +#endif + /* string_intrinsics.c */ extern int compare_string (GFC_INTEGER_4, const char *, -- cgit v1.1