You should have received a copy of the GNU General Public
License along with libgfortran; see the file COPYING. If not,
-write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
#include "config.h"
#include <stdlib.h>
#include "libgfortran.h"
-extern void sum_c4 (gfc_array_c4 *, gfc_array_c4 *, index_type *);
+#if defined (HAVE_GFC_COMPLEX_4) && defined (HAVE_GFC_COMPLEX_4)
+
+
+extern void sum_c4 (gfc_array_c4 * const restrict,
+ gfc_array_c4 * const restrict, const index_type * const restrict);
export_proto(sum_c4);
void
-sum_c4 (gfc_array_c4 *retarray, gfc_array_c4 *array, index_type *pdim)
+sum_c4 (gfc_array_c4 * const restrict retarray,
+ gfc_array_c4 * const restrict array,
+ const index_type * const restrict pdim)
{
index_type count[GFC_MAX_DIMENSIONS];
index_type extent[GFC_MAX_DIMENSIONS];
index_type sstride[GFC_MAX_DIMENSIONS];
index_type dstride[GFC_MAX_DIMENSIONS];
- GFC_COMPLEX_4 *base;
- GFC_COMPLEX_4 *dest;
+ const GFC_COMPLEX_4 * restrict base;
+ GFC_COMPLEX_4 * restrict dest;
index_type rank;
index_type n;
index_type len;
while (base)
{
- GFC_COMPLEX_4 *src;
+ const GFC_COMPLEX_4 * restrict src;
GFC_COMPLEX_4 result;
src = base;
{
}
-extern void msum_c4 (gfc_array_c4 *, gfc_array_c4 *, index_type *,
- gfc_array_l4 *);
+extern void msum_c4 (gfc_array_c4 * const restrict,
+ gfc_array_c4 * const restrict, const index_type * const restrict,
+ gfc_array_l4 * const restrict);
export_proto(msum_c4);
void
-msum_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array,
- index_type *pdim, gfc_array_l4 * mask)
+msum_c4 (gfc_array_c4 * const restrict retarray,
+ gfc_array_c4 * const restrict array,
+ const index_type * const restrict pdim,
+ gfc_array_l4 * const restrict mask)
{
index_type count[GFC_MAX_DIMENSIONS];
index_type extent[GFC_MAX_DIMENSIONS];
index_type sstride[GFC_MAX_DIMENSIONS];
index_type dstride[GFC_MAX_DIMENSIONS];
index_type mstride[GFC_MAX_DIMENSIONS];
- GFC_COMPLEX_4 *dest;
- GFC_COMPLEX_4 *base;
- GFC_LOGICAL_4 *mbase;
+ GFC_COMPLEX_4 * restrict dest;
+ const GFC_COMPLEX_4 * restrict base;
+ const GFC_LOGICAL_4 * restrict mbase;
int rank;
int dim;
index_type n;
while (base)
{
- GFC_COMPLEX_4 *src;
- GFC_LOGICAL_4 *msrc;
+ const GFC_COMPLEX_4 * restrict src;
+ const GFC_LOGICAL_4 * restrict msrc;
GFC_COMPLEX_4 result;
src = base;
msrc = mbase;
}
}
}
+
+#endif