mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
Implement SUM and PRODUCT for unsigned.
gcc/fortran/ChangeLog: * gfortran.texi: Document SUM and PRODUCT. * iresolve.cc (resolve_transformational): New argument, use_integer, to translate calls to unsigned to calls to integer. (gfc_resolve_product): Use it (gfc_resolve_sum): Use it. * simplify.cc (init_result_expr): Handle BT_UNSIGNED. libgfortran/ChangeLog: * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c17.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenarated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r17.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenarated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c17.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r17.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. * m4/ifunction.m4: Whitespace fix. * m4/product.m4: If type is integer, change to unsigned. * m4/sum.m4: Likewise.
This commit is contained in:
parent
5d98fe096b
commit
5e918a4db9
@ -2788,7 +2788,7 @@ As of now, the following intrinsics take unsigned arguments:
|
|||||||
@item @code{MVBITS}
|
@item @code{MVBITS}
|
||||||
@item @code{RANGE}
|
@item @code{RANGE}
|
||||||
@item @code{TRANSFER}
|
@item @code{TRANSFER}
|
||||||
@item @code{MATMUL} and @code{DOT_PRODUCT}
|
@item @code{SUM}, @code{PRODUCT}, @code{MATMUL} and @code{DOT_PRODUCT}
|
||||||
@end itemize
|
@end itemize
|
||||||
This list will grow in the near future.
|
This list will grow in the near future.
|
||||||
@c ---------------------------------------------------------------------
|
@c ---------------------------------------------------------------------
|
||||||
|
@ -175,9 +175,11 @@ resolve_bound (gfc_expr *f, gfc_expr *array, gfc_expr *dim, gfc_expr *kind,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
resolve_transformational (const char *name, gfc_expr *f, gfc_expr *array,
|
resolve_transformational (const char *name, gfc_expr *f, gfc_expr *array,
|
||||||
gfc_expr *dim, gfc_expr *mask)
|
gfc_expr *dim, gfc_expr *mask,
|
||||||
|
bool use_integer = false)
|
||||||
{
|
{
|
||||||
const char *prefix;
|
const char *prefix;
|
||||||
|
bt type;
|
||||||
|
|
||||||
f->ts = array->ts;
|
f->ts = array->ts;
|
||||||
|
|
||||||
@ -200,9 +202,18 @@ resolve_transformational (const char *name, gfc_expr *f, gfc_expr *array,
|
|||||||
gfc_resolve_dim_arg (dim);
|
gfc_resolve_dim_arg (dim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* For those intrinsic like SUM where we use the integer version
|
||||||
|
actually uses unsigned, but we call it as the integer
|
||||||
|
version. */
|
||||||
|
|
||||||
|
if (use_integer && array->ts.type == BT_UNSIGNED)
|
||||||
|
type = BT_INTEGER;
|
||||||
|
else
|
||||||
|
type = array->ts.type;
|
||||||
|
|
||||||
f->value.function.name
|
f->value.function.name
|
||||||
= gfc_get_string (PREFIX ("%s%s_%c%d"), prefix, name,
|
= gfc_get_string (PREFIX ("%s%s_%c%d"), prefix, name,
|
||||||
gfc_type_letter (array->ts.type),
|
gfc_type_letter (type),
|
||||||
gfc_type_abi_kind (&array->ts));
|
gfc_type_abi_kind (&array->ts));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2333,7 +2344,7 @@ void
|
|||||||
gfc_resolve_product (gfc_expr *f, gfc_expr *array, gfc_expr *dim,
|
gfc_resolve_product (gfc_expr *f, gfc_expr *array, gfc_expr *dim,
|
||||||
gfc_expr *mask)
|
gfc_expr *mask)
|
||||||
{
|
{
|
||||||
resolve_transformational ("product", f, array, dim, mask);
|
resolve_transformational ("product", f, array, dim, mask, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2881,7 +2892,7 @@ gfc_resolve_storage_size (gfc_expr *f, gfc_expr *a ATTRIBUTE_UNUSED,
|
|||||||
void
|
void
|
||||||
gfc_resolve_sum (gfc_expr *f, gfc_expr *array, gfc_expr *dim, gfc_expr *mask)
|
gfc_resolve_sum (gfc_expr *f, gfc_expr *array, gfc_expr *dim, gfc_expr *mask)
|
||||||
{
|
{
|
||||||
resolve_transformational ("sum", f, array, dim, mask);
|
resolve_transformational ("sum", f, array, dim, mask, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -359,7 +359,16 @@ init_result_expr (gfc_expr *e, int init, gfc_expr *array)
|
|||||||
mpz_set_si (e->value.integer, init);
|
mpz_set_si (e->value.integer, init);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BT_REAL:
|
case BT_UNSIGNED:
|
||||||
|
if (init == INT_MIN)
|
||||||
|
mpz_set_ui (e->value.integer, 0);
|
||||||
|
else if (init == INT_MAX)
|
||||||
|
mpz_set (e->value.integer, gfc_unsigned_kinds[i].huge);
|
||||||
|
else
|
||||||
|
mpz_set_ui (e->value.integer, init);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BT_REAL:
|
||||||
if (init == INT_MIN)
|
if (init == INT_MIN)
|
||||||
{
|
{
|
||||||
mpfr_set (e->value.real, gfc_real_kinds[i].huge, GFC_RND_MODE);
|
mpfr_set (e->value.real, gfc_real_kinds[i].huge, GFC_RND_MODE);
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_COMPLEX_10) && defined (HAVE_GFC_COMPLEX_10)
|
#if defined (HAVE_GFC_COMPLEX_10) && defined (HAVE_GFC_COMPLEX_10)
|
||||||
|
|
||||||
|
|
||||||
extern void product_c10 (gfc_array_c10 * const restrict,
|
extern void product_c10 (gfc_array_c10 * const restrict,
|
||||||
gfc_array_c10 * const restrict, const index_type * const restrict);
|
gfc_array_c10 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_c10);
|
export_proto(product_c10);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_c10 (gfc_array_c10 * const restrict retarray,
|
product_c10 (gfc_array_c10 * const restrict retarray,
|
||||||
gfc_array_c10 * const restrict array,
|
gfc_array_c10 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ product_c10 (gfc_array_c10 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_c10 (gfc_array_c10 * const restrict,
|
extern void mproduct_c10 (gfc_array_c10 * const restrict,
|
||||||
gfc_array_c10 * const restrict, const index_type * const restrict,
|
gfc_array_c10 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_c10);
|
export_proto(mproduct_c10);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_c10 (gfc_array_c10 * const restrict retarray,
|
mproduct_c10 (gfc_array_c10 * const restrict retarray,
|
||||||
gfc_array_c10 * const restrict array,
|
gfc_array_c10 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ mproduct_c10 (gfc_array_c10 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_c10 (gfc_array_c10 * const restrict,
|
extern void sproduct_c10 (gfc_array_c10 * const restrict,
|
||||||
gfc_array_c10 * const restrict, const index_type * const restrict,
|
gfc_array_c10 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_c10);
|
export_proto(sproduct_c10);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_c10 (gfc_array_c10 * const restrict retarray,
|
sproduct_c10 (gfc_array_c10 * const restrict retarray,
|
||||||
gfc_array_c10 * const restrict array,
|
gfc_array_c10 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_COMPLEX_16) && defined (HAVE_GFC_COMPLEX_16)
|
#if defined (HAVE_GFC_COMPLEX_16) && defined (HAVE_GFC_COMPLEX_16)
|
||||||
|
|
||||||
|
|
||||||
extern void product_c16 (gfc_array_c16 * const restrict,
|
extern void product_c16 (gfc_array_c16 * const restrict,
|
||||||
gfc_array_c16 * const restrict, const index_type * const restrict);
|
gfc_array_c16 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_c16);
|
export_proto(product_c16);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_c16 (gfc_array_c16 * const restrict retarray,
|
product_c16 (gfc_array_c16 * const restrict retarray,
|
||||||
gfc_array_c16 * const restrict array,
|
gfc_array_c16 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ product_c16 (gfc_array_c16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_c16 (gfc_array_c16 * const restrict,
|
extern void mproduct_c16 (gfc_array_c16 * const restrict,
|
||||||
gfc_array_c16 * const restrict, const index_type * const restrict,
|
gfc_array_c16 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_c16);
|
export_proto(mproduct_c16);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_c16 (gfc_array_c16 * const restrict retarray,
|
mproduct_c16 (gfc_array_c16 * const restrict retarray,
|
||||||
gfc_array_c16 * const restrict array,
|
gfc_array_c16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ mproduct_c16 (gfc_array_c16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_c16 (gfc_array_c16 * const restrict,
|
extern void sproduct_c16 (gfc_array_c16 * const restrict,
|
||||||
gfc_array_c16 * const restrict, const index_type * const restrict,
|
gfc_array_c16 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_c16);
|
export_proto(sproduct_c16);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_c16 (gfc_array_c16 * const restrict retarray,
|
sproduct_c16 (gfc_array_c16 * const restrict retarray,
|
||||||
gfc_array_c16 * const restrict array,
|
gfc_array_c16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_COMPLEX_17) && defined (HAVE_GFC_COMPLEX_17)
|
#if defined (HAVE_GFC_COMPLEX_17) && defined (HAVE_GFC_COMPLEX_17)
|
||||||
|
|
||||||
|
|
||||||
extern void product_c17 (gfc_array_c17 * const restrict,
|
extern void product_c17 (gfc_array_c17 * const restrict,
|
||||||
gfc_array_c17 * const restrict, const index_type * const restrict);
|
gfc_array_c17 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_c17);
|
export_proto(product_c17);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_c17 (gfc_array_c17 * const restrict retarray,
|
product_c17 (gfc_array_c17 * const restrict retarray,
|
||||||
gfc_array_c17 * const restrict array,
|
gfc_array_c17 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ product_c17 (gfc_array_c17 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_c17 (gfc_array_c17 * const restrict,
|
extern void mproduct_c17 (gfc_array_c17 * const restrict,
|
||||||
gfc_array_c17 * const restrict, const index_type * const restrict,
|
gfc_array_c17 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_c17);
|
export_proto(mproduct_c17);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_c17 (gfc_array_c17 * const restrict retarray,
|
mproduct_c17 (gfc_array_c17 * const restrict retarray,
|
||||||
gfc_array_c17 * const restrict array,
|
gfc_array_c17 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ mproduct_c17 (gfc_array_c17 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_c17 (gfc_array_c17 * const restrict,
|
extern void sproduct_c17 (gfc_array_c17 * const restrict,
|
||||||
gfc_array_c17 * const restrict, const index_type * const restrict,
|
gfc_array_c17 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_c17);
|
export_proto(sproduct_c17);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_c17 (gfc_array_c17 * const restrict retarray,
|
sproduct_c17 (gfc_array_c17 * const restrict retarray,
|
||||||
gfc_array_c17 * const restrict array,
|
gfc_array_c17 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_COMPLEX_4) && defined (HAVE_GFC_COMPLEX_4)
|
#if defined (HAVE_GFC_COMPLEX_4) && defined (HAVE_GFC_COMPLEX_4)
|
||||||
|
|
||||||
|
|
||||||
extern void product_c4 (gfc_array_c4 * const restrict,
|
extern void product_c4 (gfc_array_c4 * const restrict,
|
||||||
gfc_array_c4 * const restrict, const index_type * const restrict);
|
gfc_array_c4 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_c4);
|
export_proto(product_c4);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_c4 (gfc_array_c4 * const restrict retarray,
|
product_c4 (gfc_array_c4 * const restrict retarray,
|
||||||
gfc_array_c4 * const restrict array,
|
gfc_array_c4 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ product_c4 (gfc_array_c4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_c4 (gfc_array_c4 * const restrict,
|
extern void mproduct_c4 (gfc_array_c4 * const restrict,
|
||||||
gfc_array_c4 * const restrict, const index_type * const restrict,
|
gfc_array_c4 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_c4);
|
export_proto(mproduct_c4);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_c4 (gfc_array_c4 * const restrict retarray,
|
mproduct_c4 (gfc_array_c4 * const restrict retarray,
|
||||||
gfc_array_c4 * const restrict array,
|
gfc_array_c4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ mproduct_c4 (gfc_array_c4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_c4 (gfc_array_c4 * const restrict,
|
extern void sproduct_c4 (gfc_array_c4 * const restrict,
|
||||||
gfc_array_c4 * const restrict, const index_type * const restrict,
|
gfc_array_c4 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_c4);
|
export_proto(sproduct_c4);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_c4 (gfc_array_c4 * const restrict retarray,
|
sproduct_c4 (gfc_array_c4 * const restrict retarray,
|
||||||
gfc_array_c4 * const restrict array,
|
gfc_array_c4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_COMPLEX_8) && defined (HAVE_GFC_COMPLEX_8)
|
#if defined (HAVE_GFC_COMPLEX_8) && defined (HAVE_GFC_COMPLEX_8)
|
||||||
|
|
||||||
|
|
||||||
extern void product_c8 (gfc_array_c8 * const restrict,
|
extern void product_c8 (gfc_array_c8 * const restrict,
|
||||||
gfc_array_c8 * const restrict, const index_type * const restrict);
|
gfc_array_c8 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_c8);
|
export_proto(product_c8);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_c8 (gfc_array_c8 * const restrict retarray,
|
product_c8 (gfc_array_c8 * const restrict retarray,
|
||||||
gfc_array_c8 * const restrict array,
|
gfc_array_c8 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ product_c8 (gfc_array_c8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_c8 (gfc_array_c8 * const restrict,
|
extern void mproduct_c8 (gfc_array_c8 * const restrict,
|
||||||
gfc_array_c8 * const restrict, const index_type * const restrict,
|
gfc_array_c8 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_c8);
|
export_proto(mproduct_c8);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_c8 (gfc_array_c8 * const restrict retarray,
|
mproduct_c8 (gfc_array_c8 * const restrict retarray,
|
||||||
gfc_array_c8 * const restrict array,
|
gfc_array_c8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ mproduct_c8 (gfc_array_c8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_c8 (gfc_array_c8 * const restrict,
|
extern void sproduct_c8 (gfc_array_c8 * const restrict,
|
||||||
gfc_array_c8 * const restrict, const index_type * const restrict,
|
gfc_array_c8 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_c8);
|
export_proto(sproduct_c8);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_c8 (gfc_array_c8 * const restrict retarray,
|
sproduct_c8 (gfc_array_c8 * const restrict retarray,
|
||||||
gfc_array_c8 * const restrict array,
|
gfc_array_c8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -26,24 +26,24 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"
|
#include "libgfortran.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_1)
|
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_UINTEGER_1)
|
||||||
|
|
||||||
|
|
||||||
extern void product_i1 (gfc_array_i1 * const restrict,
|
extern void product_i1 (gfc_array_m1 * const restrict,
|
||||||
gfc_array_i1 * const restrict, const index_type * const restrict);
|
gfc_array_m1 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_i1);
|
export_proto(product_i1);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_i1 (gfc_array_i1 * const restrict retarray,
|
product_i1 (gfc_array_m1 * const restrict retarray,
|
||||||
gfc_array_i1 * const restrict array,
|
gfc_array_m1 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
const GFC_INTEGER_1 * restrict base;
|
const GFC_UINTEGER_1 * restrict base;
|
||||||
GFC_INTEGER_1 * restrict dest;
|
GFC_UINTEGER_1 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type len;
|
index_type len;
|
||||||
@ -104,7 +104,7 @@ product_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -135,8 +135,8 @@ product_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
continue_loop = 1;
|
continue_loop = 1;
|
||||||
while (continue_loop)
|
while (continue_loop)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_1 * restrict src;
|
const GFC_UINTEGER_1 * restrict src;
|
||||||
GFC_INTEGER_1 result;
|
GFC_UINTEGER_1 result;
|
||||||
src = base;
|
src = base;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -188,15 +188,15 @@ product_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_i1 (gfc_array_i1 * const restrict,
|
extern void mproduct_i1 (gfc_array_m1 * const restrict,
|
||||||
gfc_array_i1 * const restrict, const index_type * const restrict,
|
gfc_array_m1 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_i1);
|
export_proto(mproduct_i1);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_i1 (gfc_array_i1 * const restrict retarray,
|
mproduct_i1 (gfc_array_m1 * const restrict retarray,
|
||||||
gfc_array_i1 * const restrict array,
|
gfc_array_m1 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -204,8 +204,8 @@ mproduct_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type mstride[GFC_MAX_DIMENSIONS];
|
index_type mstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_1 * restrict dest;
|
GFC_UINTEGER_1 * restrict dest;
|
||||||
const GFC_INTEGER_1 * restrict base;
|
const GFC_UINTEGER_1 * restrict base;
|
||||||
const GFC_LOGICAL_1 * restrict mbase;
|
const GFC_LOGICAL_1 * restrict mbase;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -296,7 +296,7 @@ mproduct_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
retarray->offset = 0;
|
retarray->offset = 0;
|
||||||
retarray->dtype.rank = rank;
|
retarray->dtype.rank = rank;
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -327,9 +327,9 @@ mproduct_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
|
|
||||||
while (base)
|
while (base)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_1 * restrict src;
|
const GFC_UINTEGER_1 * restrict src;
|
||||||
const GFC_LOGICAL_1 * restrict msrc;
|
const GFC_LOGICAL_1 * restrict msrc;
|
||||||
GFC_INTEGER_1 result;
|
GFC_UINTEGER_1 result;
|
||||||
src = base;
|
src = base;
|
||||||
msrc = mbase;
|
msrc = mbase;
|
||||||
{
|
{
|
||||||
@ -378,21 +378,21 @@ mproduct_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_i1 (gfc_array_i1 * const restrict,
|
extern void sproduct_i1 (gfc_array_m1 * const restrict,
|
||||||
gfc_array_i1 * const restrict, const index_type * const restrict,
|
gfc_array_m1 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_i1);
|
export_proto(sproduct_i1);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_i1 (gfc_array_i1 * const restrict retarray,
|
sproduct_i1 (gfc_array_m1 * const restrict retarray,
|
||||||
gfc_array_i1 * const restrict array,
|
gfc_array_m1 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_1 * restrict dest;
|
GFC_UINTEGER_1 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -455,7 +455,7 @@ sproduct_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -26,24 +26,24 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"
|
#include "libgfortran.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_16)
|
#if defined (HAVE_GFC_UINTEGER_16) && defined (HAVE_GFC_UINTEGER_16)
|
||||||
|
|
||||||
|
|
||||||
extern void product_i16 (gfc_array_i16 * const restrict,
|
extern void product_i16 (gfc_array_m16 * const restrict,
|
||||||
gfc_array_i16 * const restrict, const index_type * const restrict);
|
gfc_array_m16 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_i16);
|
export_proto(product_i16);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_i16 (gfc_array_i16 * const restrict retarray,
|
product_i16 (gfc_array_m16 * const restrict retarray,
|
||||||
gfc_array_i16 * const restrict array,
|
gfc_array_m16 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
const GFC_INTEGER_16 * restrict base;
|
const GFC_UINTEGER_16 * restrict base;
|
||||||
GFC_INTEGER_16 * restrict dest;
|
GFC_UINTEGER_16 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type len;
|
index_type len;
|
||||||
@ -104,7 +104,7 @@ product_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_16));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -135,8 +135,8 @@ product_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
continue_loop = 1;
|
continue_loop = 1;
|
||||||
while (continue_loop)
|
while (continue_loop)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_16 * restrict src;
|
const GFC_UINTEGER_16 * restrict src;
|
||||||
GFC_INTEGER_16 result;
|
GFC_UINTEGER_16 result;
|
||||||
src = base;
|
src = base;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -188,15 +188,15 @@ product_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_i16 (gfc_array_i16 * const restrict,
|
extern void mproduct_i16 (gfc_array_m16 * const restrict,
|
||||||
gfc_array_i16 * const restrict, const index_type * const restrict,
|
gfc_array_m16 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_i16);
|
export_proto(mproduct_i16);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_i16 (gfc_array_i16 * const restrict retarray,
|
mproduct_i16 (gfc_array_m16 * const restrict retarray,
|
||||||
gfc_array_i16 * const restrict array,
|
gfc_array_m16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -204,8 +204,8 @@ mproduct_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type mstride[GFC_MAX_DIMENSIONS];
|
index_type mstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_16 * restrict dest;
|
GFC_UINTEGER_16 * restrict dest;
|
||||||
const GFC_INTEGER_16 * restrict base;
|
const GFC_UINTEGER_16 * restrict base;
|
||||||
const GFC_LOGICAL_1 * restrict mbase;
|
const GFC_LOGICAL_1 * restrict mbase;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -296,7 +296,7 @@ mproduct_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
retarray->offset = 0;
|
retarray->offset = 0;
|
||||||
retarray->dtype.rank = rank;
|
retarray->dtype.rank = rank;
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_16));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -327,9 +327,9 @@ mproduct_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
|
|
||||||
while (base)
|
while (base)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_16 * restrict src;
|
const GFC_UINTEGER_16 * restrict src;
|
||||||
const GFC_LOGICAL_1 * restrict msrc;
|
const GFC_LOGICAL_1 * restrict msrc;
|
||||||
GFC_INTEGER_16 result;
|
GFC_UINTEGER_16 result;
|
||||||
src = base;
|
src = base;
|
||||||
msrc = mbase;
|
msrc = mbase;
|
||||||
{
|
{
|
||||||
@ -378,21 +378,21 @@ mproduct_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_i16 (gfc_array_i16 * const restrict,
|
extern void sproduct_i16 (gfc_array_m16 * const restrict,
|
||||||
gfc_array_i16 * const restrict, const index_type * const restrict,
|
gfc_array_m16 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_i16);
|
export_proto(sproduct_i16);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_i16 (gfc_array_i16 * const restrict retarray,
|
sproduct_i16 (gfc_array_m16 * const restrict retarray,
|
||||||
gfc_array_i16 * const restrict array,
|
gfc_array_m16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_16 * restrict dest;
|
GFC_UINTEGER_16 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -455,7 +455,7 @@ sproduct_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_16));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -26,24 +26,24 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"
|
#include "libgfortran.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_2)
|
#if defined (HAVE_GFC_UINTEGER_2) && defined (HAVE_GFC_UINTEGER_2)
|
||||||
|
|
||||||
|
|
||||||
extern void product_i2 (gfc_array_i2 * const restrict,
|
extern void product_i2 (gfc_array_m2 * const restrict,
|
||||||
gfc_array_i2 * const restrict, const index_type * const restrict);
|
gfc_array_m2 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_i2);
|
export_proto(product_i2);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_i2 (gfc_array_i2 * const restrict retarray,
|
product_i2 (gfc_array_m2 * const restrict retarray,
|
||||||
gfc_array_i2 * const restrict array,
|
gfc_array_m2 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
const GFC_INTEGER_2 * restrict base;
|
const GFC_UINTEGER_2 * restrict base;
|
||||||
GFC_INTEGER_2 * restrict dest;
|
GFC_UINTEGER_2 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type len;
|
index_type len;
|
||||||
@ -104,7 +104,7 @@ product_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_2));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -135,8 +135,8 @@ product_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
continue_loop = 1;
|
continue_loop = 1;
|
||||||
while (continue_loop)
|
while (continue_loop)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_2 * restrict src;
|
const GFC_UINTEGER_2 * restrict src;
|
||||||
GFC_INTEGER_2 result;
|
GFC_UINTEGER_2 result;
|
||||||
src = base;
|
src = base;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -188,15 +188,15 @@ product_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_i2 (gfc_array_i2 * const restrict,
|
extern void mproduct_i2 (gfc_array_m2 * const restrict,
|
||||||
gfc_array_i2 * const restrict, const index_type * const restrict,
|
gfc_array_m2 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_i2);
|
export_proto(mproduct_i2);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_i2 (gfc_array_i2 * const restrict retarray,
|
mproduct_i2 (gfc_array_m2 * const restrict retarray,
|
||||||
gfc_array_i2 * const restrict array,
|
gfc_array_m2 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -204,8 +204,8 @@ mproduct_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type mstride[GFC_MAX_DIMENSIONS];
|
index_type mstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_2 * restrict dest;
|
GFC_UINTEGER_2 * restrict dest;
|
||||||
const GFC_INTEGER_2 * restrict base;
|
const GFC_UINTEGER_2 * restrict base;
|
||||||
const GFC_LOGICAL_1 * restrict mbase;
|
const GFC_LOGICAL_1 * restrict mbase;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -296,7 +296,7 @@ mproduct_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
retarray->offset = 0;
|
retarray->offset = 0;
|
||||||
retarray->dtype.rank = rank;
|
retarray->dtype.rank = rank;
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_2));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -327,9 +327,9 @@ mproduct_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
|
|
||||||
while (base)
|
while (base)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_2 * restrict src;
|
const GFC_UINTEGER_2 * restrict src;
|
||||||
const GFC_LOGICAL_1 * restrict msrc;
|
const GFC_LOGICAL_1 * restrict msrc;
|
||||||
GFC_INTEGER_2 result;
|
GFC_UINTEGER_2 result;
|
||||||
src = base;
|
src = base;
|
||||||
msrc = mbase;
|
msrc = mbase;
|
||||||
{
|
{
|
||||||
@ -378,21 +378,21 @@ mproduct_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_i2 (gfc_array_i2 * const restrict,
|
extern void sproduct_i2 (gfc_array_m2 * const restrict,
|
||||||
gfc_array_i2 * const restrict, const index_type * const restrict,
|
gfc_array_m2 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_i2);
|
export_proto(sproduct_i2);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_i2 (gfc_array_i2 * const restrict retarray,
|
sproduct_i2 (gfc_array_m2 * const restrict retarray,
|
||||||
gfc_array_i2 * const restrict array,
|
gfc_array_m2 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_2 * restrict dest;
|
GFC_UINTEGER_2 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -455,7 +455,7 @@ sproduct_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_2));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -26,24 +26,24 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"
|
#include "libgfortran.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
|
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_UINTEGER_4)
|
||||||
|
|
||||||
|
|
||||||
extern void product_i4 (gfc_array_i4 * const restrict,
|
extern void product_i4 (gfc_array_m4 * const restrict,
|
||||||
gfc_array_i4 * const restrict, const index_type * const restrict);
|
gfc_array_m4 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_i4);
|
export_proto(product_i4);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_i4 (gfc_array_i4 * const restrict retarray,
|
product_i4 (gfc_array_m4 * const restrict retarray,
|
||||||
gfc_array_i4 * const restrict array,
|
gfc_array_m4 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
const GFC_INTEGER_4 * restrict base;
|
const GFC_UINTEGER_4 * restrict base;
|
||||||
GFC_INTEGER_4 * restrict dest;
|
GFC_UINTEGER_4 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type len;
|
index_type len;
|
||||||
@ -104,7 +104,7 @@ product_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -135,8 +135,8 @@ product_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
continue_loop = 1;
|
continue_loop = 1;
|
||||||
while (continue_loop)
|
while (continue_loop)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_4 * restrict src;
|
const GFC_UINTEGER_4 * restrict src;
|
||||||
GFC_INTEGER_4 result;
|
GFC_UINTEGER_4 result;
|
||||||
src = base;
|
src = base;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -188,15 +188,15 @@ product_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_i4 (gfc_array_i4 * const restrict,
|
extern void mproduct_i4 (gfc_array_m4 * const restrict,
|
||||||
gfc_array_i4 * const restrict, const index_type * const restrict,
|
gfc_array_m4 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_i4);
|
export_proto(mproduct_i4);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_i4 (gfc_array_i4 * const restrict retarray,
|
mproduct_i4 (gfc_array_m4 * const restrict retarray,
|
||||||
gfc_array_i4 * const restrict array,
|
gfc_array_m4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -204,8 +204,8 @@ mproduct_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type mstride[GFC_MAX_DIMENSIONS];
|
index_type mstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_4 * restrict dest;
|
GFC_UINTEGER_4 * restrict dest;
|
||||||
const GFC_INTEGER_4 * restrict base;
|
const GFC_UINTEGER_4 * restrict base;
|
||||||
const GFC_LOGICAL_1 * restrict mbase;
|
const GFC_LOGICAL_1 * restrict mbase;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -296,7 +296,7 @@ mproduct_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
retarray->offset = 0;
|
retarray->offset = 0;
|
||||||
retarray->dtype.rank = rank;
|
retarray->dtype.rank = rank;
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -327,9 +327,9 @@ mproduct_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
|
|
||||||
while (base)
|
while (base)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_4 * restrict src;
|
const GFC_UINTEGER_4 * restrict src;
|
||||||
const GFC_LOGICAL_1 * restrict msrc;
|
const GFC_LOGICAL_1 * restrict msrc;
|
||||||
GFC_INTEGER_4 result;
|
GFC_UINTEGER_4 result;
|
||||||
src = base;
|
src = base;
|
||||||
msrc = mbase;
|
msrc = mbase;
|
||||||
{
|
{
|
||||||
@ -378,21 +378,21 @@ mproduct_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_i4 (gfc_array_i4 * const restrict,
|
extern void sproduct_i4 (gfc_array_m4 * const restrict,
|
||||||
gfc_array_i4 * const restrict, const index_type * const restrict,
|
gfc_array_m4 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_i4);
|
export_proto(sproduct_i4);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_i4 (gfc_array_i4 * const restrict retarray,
|
sproduct_i4 (gfc_array_m4 * const restrict retarray,
|
||||||
gfc_array_i4 * const restrict array,
|
gfc_array_m4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_4 * restrict dest;
|
GFC_UINTEGER_4 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -455,7 +455,7 @@ sproduct_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -26,24 +26,24 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"
|
#include "libgfortran.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_8)
|
#if defined (HAVE_GFC_UINTEGER_8) && defined (HAVE_GFC_UINTEGER_8)
|
||||||
|
|
||||||
|
|
||||||
extern void product_i8 (gfc_array_i8 * const restrict,
|
extern void product_i8 (gfc_array_m8 * const restrict,
|
||||||
gfc_array_i8 * const restrict, const index_type * const restrict);
|
gfc_array_m8 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_i8);
|
export_proto(product_i8);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_i8 (gfc_array_i8 * const restrict retarray,
|
product_i8 (gfc_array_m8 * const restrict retarray,
|
||||||
gfc_array_i8 * const restrict array,
|
gfc_array_m8 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
const GFC_INTEGER_8 * restrict base;
|
const GFC_UINTEGER_8 * restrict base;
|
||||||
GFC_INTEGER_8 * restrict dest;
|
GFC_UINTEGER_8 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type len;
|
index_type len;
|
||||||
@ -104,7 +104,7 @@ product_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_8));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -135,8 +135,8 @@ product_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
continue_loop = 1;
|
continue_loop = 1;
|
||||||
while (continue_loop)
|
while (continue_loop)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_8 * restrict src;
|
const GFC_UINTEGER_8 * restrict src;
|
||||||
GFC_INTEGER_8 result;
|
GFC_UINTEGER_8 result;
|
||||||
src = base;
|
src = base;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -188,15 +188,15 @@ product_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_i8 (gfc_array_i8 * const restrict,
|
extern void mproduct_i8 (gfc_array_m8 * const restrict,
|
||||||
gfc_array_i8 * const restrict, const index_type * const restrict,
|
gfc_array_m8 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_i8);
|
export_proto(mproduct_i8);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_i8 (gfc_array_i8 * const restrict retarray,
|
mproduct_i8 (gfc_array_m8 * const restrict retarray,
|
||||||
gfc_array_i8 * const restrict array,
|
gfc_array_m8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -204,8 +204,8 @@ mproduct_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type mstride[GFC_MAX_DIMENSIONS];
|
index_type mstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_8 * restrict dest;
|
GFC_UINTEGER_8 * restrict dest;
|
||||||
const GFC_INTEGER_8 * restrict base;
|
const GFC_UINTEGER_8 * restrict base;
|
||||||
const GFC_LOGICAL_1 * restrict mbase;
|
const GFC_LOGICAL_1 * restrict mbase;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -296,7 +296,7 @@ mproduct_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
retarray->offset = 0;
|
retarray->offset = 0;
|
||||||
retarray->dtype.rank = rank;
|
retarray->dtype.rank = rank;
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_8));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -327,9 +327,9 @@ mproduct_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
|
|
||||||
while (base)
|
while (base)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_8 * restrict src;
|
const GFC_UINTEGER_8 * restrict src;
|
||||||
const GFC_LOGICAL_1 * restrict msrc;
|
const GFC_LOGICAL_1 * restrict msrc;
|
||||||
GFC_INTEGER_8 result;
|
GFC_UINTEGER_8 result;
|
||||||
src = base;
|
src = base;
|
||||||
msrc = mbase;
|
msrc = mbase;
|
||||||
{
|
{
|
||||||
@ -378,21 +378,21 @@ mproduct_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_i8 (gfc_array_i8 * const restrict,
|
extern void sproduct_i8 (gfc_array_m8 * const restrict,
|
||||||
gfc_array_i8 * const restrict, const index_type * const restrict,
|
gfc_array_m8 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_i8);
|
export_proto(sproduct_i8);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_i8 (gfc_array_i8 * const restrict retarray,
|
sproduct_i8 (gfc_array_m8 * const restrict retarray,
|
||||||
gfc_array_i8 * const restrict array,
|
gfc_array_m8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_8 * restrict dest;
|
GFC_UINTEGER_8 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -455,7 +455,7 @@ sproduct_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_8));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_REAL_10)
|
#if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_REAL_10)
|
||||||
|
|
||||||
|
|
||||||
extern void product_r10 (gfc_array_r10 * const restrict,
|
extern void product_r10 (gfc_array_r10 * const restrict,
|
||||||
gfc_array_r10 * const restrict, const index_type * const restrict);
|
gfc_array_r10 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_r10);
|
export_proto(product_r10);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_r10 (gfc_array_r10 * const restrict retarray,
|
product_r10 (gfc_array_r10 * const restrict retarray,
|
||||||
gfc_array_r10 * const restrict array,
|
gfc_array_r10 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ product_r10 (gfc_array_r10 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_r10 (gfc_array_r10 * const restrict,
|
extern void mproduct_r10 (gfc_array_r10 * const restrict,
|
||||||
gfc_array_r10 * const restrict, const index_type * const restrict,
|
gfc_array_r10 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_r10);
|
export_proto(mproduct_r10);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_r10 (gfc_array_r10 * const restrict retarray,
|
mproduct_r10 (gfc_array_r10 * const restrict retarray,
|
||||||
gfc_array_r10 * const restrict array,
|
gfc_array_r10 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ mproduct_r10 (gfc_array_r10 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_r10 (gfc_array_r10 * const restrict,
|
extern void sproduct_r10 (gfc_array_r10 * const restrict,
|
||||||
gfc_array_r10 * const restrict, const index_type * const restrict,
|
gfc_array_r10 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_r10);
|
export_proto(sproduct_r10);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_r10 (gfc_array_r10 * const restrict retarray,
|
sproduct_r10 (gfc_array_r10 * const restrict retarray,
|
||||||
gfc_array_r10 * const restrict array,
|
gfc_array_r10 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_REAL_16)
|
#if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_REAL_16)
|
||||||
|
|
||||||
|
|
||||||
extern void product_r16 (gfc_array_r16 * const restrict,
|
extern void product_r16 (gfc_array_r16 * const restrict,
|
||||||
gfc_array_r16 * const restrict, const index_type * const restrict);
|
gfc_array_r16 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_r16);
|
export_proto(product_r16);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_r16 (gfc_array_r16 * const restrict retarray,
|
product_r16 (gfc_array_r16 * const restrict retarray,
|
||||||
gfc_array_r16 * const restrict array,
|
gfc_array_r16 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ product_r16 (gfc_array_r16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_r16 (gfc_array_r16 * const restrict,
|
extern void mproduct_r16 (gfc_array_r16 * const restrict,
|
||||||
gfc_array_r16 * const restrict, const index_type * const restrict,
|
gfc_array_r16 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_r16);
|
export_proto(mproduct_r16);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_r16 (gfc_array_r16 * const restrict retarray,
|
mproduct_r16 (gfc_array_r16 * const restrict retarray,
|
||||||
gfc_array_r16 * const restrict array,
|
gfc_array_r16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ mproduct_r16 (gfc_array_r16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_r16 (gfc_array_r16 * const restrict,
|
extern void sproduct_r16 (gfc_array_r16 * const restrict,
|
||||||
gfc_array_r16 * const restrict, const index_type * const restrict,
|
gfc_array_r16 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_r16);
|
export_proto(sproduct_r16);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_r16 (gfc_array_r16 * const restrict retarray,
|
sproduct_r16 (gfc_array_r16 * const restrict retarray,
|
||||||
gfc_array_r16 * const restrict array,
|
gfc_array_r16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_REAL_17) && defined (HAVE_GFC_REAL_17)
|
#if defined (HAVE_GFC_REAL_17) && defined (HAVE_GFC_REAL_17)
|
||||||
|
|
||||||
|
|
||||||
extern void product_r17 (gfc_array_r17 * const restrict,
|
extern void product_r17 (gfc_array_r17 * const restrict,
|
||||||
gfc_array_r17 * const restrict, const index_type * const restrict);
|
gfc_array_r17 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_r17);
|
export_proto(product_r17);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_r17 (gfc_array_r17 * const restrict retarray,
|
product_r17 (gfc_array_r17 * const restrict retarray,
|
||||||
gfc_array_r17 * const restrict array,
|
gfc_array_r17 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ product_r17 (gfc_array_r17 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_r17 (gfc_array_r17 * const restrict,
|
extern void mproduct_r17 (gfc_array_r17 * const restrict,
|
||||||
gfc_array_r17 * const restrict, const index_type * const restrict,
|
gfc_array_r17 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_r17);
|
export_proto(mproduct_r17);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_r17 (gfc_array_r17 * const restrict retarray,
|
mproduct_r17 (gfc_array_r17 * const restrict retarray,
|
||||||
gfc_array_r17 * const restrict array,
|
gfc_array_r17 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ mproduct_r17 (gfc_array_r17 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_r17 (gfc_array_r17 * const restrict,
|
extern void sproduct_r17 (gfc_array_r17 * const restrict,
|
||||||
gfc_array_r17 * const restrict, const index_type * const restrict,
|
gfc_array_r17 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_r17);
|
export_proto(sproduct_r17);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_r17 (gfc_array_r17 * const restrict retarray,
|
sproduct_r17 (gfc_array_r17 * const restrict retarray,
|
||||||
gfc_array_r17 * const restrict array,
|
gfc_array_r17 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_REAL_4)
|
#if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_REAL_4)
|
||||||
|
|
||||||
|
|
||||||
extern void product_r4 (gfc_array_r4 * const restrict,
|
extern void product_r4 (gfc_array_r4 * const restrict,
|
||||||
gfc_array_r4 * const restrict, const index_type * const restrict);
|
gfc_array_r4 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_r4);
|
export_proto(product_r4);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_r4 (gfc_array_r4 * const restrict retarray,
|
product_r4 (gfc_array_r4 * const restrict retarray,
|
||||||
gfc_array_r4 * const restrict array,
|
gfc_array_r4 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ product_r4 (gfc_array_r4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_r4 (gfc_array_r4 * const restrict,
|
extern void mproduct_r4 (gfc_array_r4 * const restrict,
|
||||||
gfc_array_r4 * const restrict, const index_type * const restrict,
|
gfc_array_r4 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_r4);
|
export_proto(mproduct_r4);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_r4 (gfc_array_r4 * const restrict retarray,
|
mproduct_r4 (gfc_array_r4 * const restrict retarray,
|
||||||
gfc_array_r4 * const restrict array,
|
gfc_array_r4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ mproduct_r4 (gfc_array_r4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_r4 (gfc_array_r4 * const restrict,
|
extern void sproduct_r4 (gfc_array_r4 * const restrict,
|
||||||
gfc_array_r4 * const restrict, const index_type * const restrict,
|
gfc_array_r4 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_r4);
|
export_proto(sproduct_r4);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_r4 (gfc_array_r4 * const restrict retarray,
|
sproduct_r4 (gfc_array_r4 * const restrict retarray,
|
||||||
gfc_array_r4 * const restrict array,
|
gfc_array_r4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_REAL_8)
|
#if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_REAL_8)
|
||||||
|
|
||||||
|
|
||||||
extern void product_r8 (gfc_array_r8 * const restrict,
|
extern void product_r8 (gfc_array_r8 * const restrict,
|
||||||
gfc_array_r8 * const restrict, const index_type * const restrict);
|
gfc_array_r8 * const restrict, const index_type * const restrict);
|
||||||
export_proto(product_r8);
|
export_proto(product_r8);
|
||||||
|
|
||||||
void
|
void
|
||||||
product_r8 (gfc_array_r8 * const restrict retarray,
|
product_r8 (gfc_array_r8 * const restrict retarray,
|
||||||
gfc_array_r8 * const restrict array,
|
gfc_array_r8 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ product_r8 (gfc_array_r8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void mproduct_r8 (gfc_array_r8 * const restrict,
|
extern void mproduct_r8 (gfc_array_r8 * const restrict,
|
||||||
gfc_array_r8 * const restrict, const index_type * const restrict,
|
gfc_array_r8 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(mproduct_r8);
|
export_proto(mproduct_r8);
|
||||||
|
|
||||||
void
|
void
|
||||||
mproduct_r8 (gfc_array_r8 * const restrict retarray,
|
mproduct_r8 (gfc_array_r8 * const restrict retarray,
|
||||||
gfc_array_r8 * const restrict array,
|
gfc_array_r8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ mproduct_r8 (gfc_array_r8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void sproduct_r8 (gfc_array_r8 * const restrict,
|
extern void sproduct_r8 (gfc_array_r8 * const restrict,
|
||||||
gfc_array_r8 * const restrict, const index_type * const restrict,
|
gfc_array_r8 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(sproduct_r8);
|
export_proto(sproduct_r8);
|
||||||
|
|
||||||
void
|
void
|
||||||
sproduct_r8 (gfc_array_r8 * const restrict retarray,
|
sproduct_r8 (gfc_array_r8 * const restrict retarray,
|
||||||
gfc_array_r8 * const restrict array,
|
gfc_array_r8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_COMPLEX_10) && defined (HAVE_GFC_COMPLEX_10)
|
#if defined (HAVE_GFC_COMPLEX_10) && defined (HAVE_GFC_COMPLEX_10)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_c10 (gfc_array_c10 * const restrict,
|
extern void sum_c10 (gfc_array_c10 * const restrict,
|
||||||
gfc_array_c10 * const restrict, const index_type * const restrict);
|
gfc_array_c10 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_c10);
|
export_proto(sum_c10);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_c10 (gfc_array_c10 * const restrict retarray,
|
sum_c10 (gfc_array_c10 * const restrict retarray,
|
||||||
gfc_array_c10 * const restrict array,
|
gfc_array_c10 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ sum_c10 (gfc_array_c10 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_c10 (gfc_array_c10 * const restrict,
|
extern void msum_c10 (gfc_array_c10 * const restrict,
|
||||||
gfc_array_c10 * const restrict, const index_type * const restrict,
|
gfc_array_c10 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_c10);
|
export_proto(msum_c10);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_c10 (gfc_array_c10 * const restrict retarray,
|
msum_c10 (gfc_array_c10 * const restrict retarray,
|
||||||
gfc_array_c10 * const restrict array,
|
gfc_array_c10 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ msum_c10 (gfc_array_c10 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_c10 (gfc_array_c10 * const restrict,
|
extern void ssum_c10 (gfc_array_c10 * const restrict,
|
||||||
gfc_array_c10 * const restrict, const index_type * const restrict,
|
gfc_array_c10 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_c10);
|
export_proto(ssum_c10);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_c10 (gfc_array_c10 * const restrict retarray,
|
ssum_c10 (gfc_array_c10 * const restrict retarray,
|
||||||
gfc_array_c10 * const restrict array,
|
gfc_array_c10 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_COMPLEX_16) && defined (HAVE_GFC_COMPLEX_16)
|
#if defined (HAVE_GFC_COMPLEX_16) && defined (HAVE_GFC_COMPLEX_16)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_c16 (gfc_array_c16 * const restrict,
|
extern void sum_c16 (gfc_array_c16 * const restrict,
|
||||||
gfc_array_c16 * const restrict, const index_type * const restrict);
|
gfc_array_c16 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_c16);
|
export_proto(sum_c16);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_c16 (gfc_array_c16 * const restrict retarray,
|
sum_c16 (gfc_array_c16 * const restrict retarray,
|
||||||
gfc_array_c16 * const restrict array,
|
gfc_array_c16 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ sum_c16 (gfc_array_c16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_c16 (gfc_array_c16 * const restrict,
|
extern void msum_c16 (gfc_array_c16 * const restrict,
|
||||||
gfc_array_c16 * const restrict, const index_type * const restrict,
|
gfc_array_c16 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_c16);
|
export_proto(msum_c16);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_c16 (gfc_array_c16 * const restrict retarray,
|
msum_c16 (gfc_array_c16 * const restrict retarray,
|
||||||
gfc_array_c16 * const restrict array,
|
gfc_array_c16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ msum_c16 (gfc_array_c16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_c16 (gfc_array_c16 * const restrict,
|
extern void ssum_c16 (gfc_array_c16 * const restrict,
|
||||||
gfc_array_c16 * const restrict, const index_type * const restrict,
|
gfc_array_c16 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_c16);
|
export_proto(ssum_c16);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_c16 (gfc_array_c16 * const restrict retarray,
|
ssum_c16 (gfc_array_c16 * const restrict retarray,
|
||||||
gfc_array_c16 * const restrict array,
|
gfc_array_c16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_COMPLEX_17) && defined (HAVE_GFC_COMPLEX_17)
|
#if defined (HAVE_GFC_COMPLEX_17) && defined (HAVE_GFC_COMPLEX_17)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_c17 (gfc_array_c17 * const restrict,
|
extern void sum_c17 (gfc_array_c17 * const restrict,
|
||||||
gfc_array_c17 * const restrict, const index_type * const restrict);
|
gfc_array_c17 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_c17);
|
export_proto(sum_c17);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_c17 (gfc_array_c17 * const restrict retarray,
|
sum_c17 (gfc_array_c17 * const restrict retarray,
|
||||||
gfc_array_c17 * const restrict array,
|
gfc_array_c17 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ sum_c17 (gfc_array_c17 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_c17 (gfc_array_c17 * const restrict,
|
extern void msum_c17 (gfc_array_c17 * const restrict,
|
||||||
gfc_array_c17 * const restrict, const index_type * const restrict,
|
gfc_array_c17 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_c17);
|
export_proto(msum_c17);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_c17 (gfc_array_c17 * const restrict retarray,
|
msum_c17 (gfc_array_c17 * const restrict retarray,
|
||||||
gfc_array_c17 * const restrict array,
|
gfc_array_c17 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ msum_c17 (gfc_array_c17 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_c17 (gfc_array_c17 * const restrict,
|
extern void ssum_c17 (gfc_array_c17 * const restrict,
|
||||||
gfc_array_c17 * const restrict, const index_type * const restrict,
|
gfc_array_c17 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_c17);
|
export_proto(ssum_c17);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_c17 (gfc_array_c17 * const restrict retarray,
|
ssum_c17 (gfc_array_c17 * const restrict retarray,
|
||||||
gfc_array_c17 * const restrict array,
|
gfc_array_c17 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_COMPLEX_4) && defined (HAVE_GFC_COMPLEX_4)
|
#if defined (HAVE_GFC_COMPLEX_4) && defined (HAVE_GFC_COMPLEX_4)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_c4 (gfc_array_c4 * const restrict,
|
extern void sum_c4 (gfc_array_c4 * const restrict,
|
||||||
gfc_array_c4 * const restrict, const index_type * const restrict);
|
gfc_array_c4 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_c4);
|
export_proto(sum_c4);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_c4 (gfc_array_c4 * const restrict retarray,
|
sum_c4 (gfc_array_c4 * const restrict retarray,
|
||||||
gfc_array_c4 * const restrict array,
|
gfc_array_c4 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ sum_c4 (gfc_array_c4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_c4 (gfc_array_c4 * const restrict,
|
extern void msum_c4 (gfc_array_c4 * const restrict,
|
||||||
gfc_array_c4 * const restrict, const index_type * const restrict,
|
gfc_array_c4 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_c4);
|
export_proto(msum_c4);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_c4 (gfc_array_c4 * const restrict retarray,
|
msum_c4 (gfc_array_c4 * const restrict retarray,
|
||||||
gfc_array_c4 * const restrict array,
|
gfc_array_c4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ msum_c4 (gfc_array_c4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_c4 (gfc_array_c4 * const restrict,
|
extern void ssum_c4 (gfc_array_c4 * const restrict,
|
||||||
gfc_array_c4 * const restrict, const index_type * const restrict,
|
gfc_array_c4 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_c4);
|
export_proto(ssum_c4);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_c4 (gfc_array_c4 * const restrict retarray,
|
ssum_c4 (gfc_array_c4 * const restrict retarray,
|
||||||
gfc_array_c4 * const restrict array,
|
gfc_array_c4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_COMPLEX_8) && defined (HAVE_GFC_COMPLEX_8)
|
#if defined (HAVE_GFC_COMPLEX_8) && defined (HAVE_GFC_COMPLEX_8)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_c8 (gfc_array_c8 * const restrict,
|
extern void sum_c8 (gfc_array_c8 * const restrict,
|
||||||
gfc_array_c8 * const restrict, const index_type * const restrict);
|
gfc_array_c8 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_c8);
|
export_proto(sum_c8);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_c8 (gfc_array_c8 * const restrict retarray,
|
sum_c8 (gfc_array_c8 * const restrict retarray,
|
||||||
gfc_array_c8 * const restrict array,
|
gfc_array_c8 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ sum_c8 (gfc_array_c8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_c8 (gfc_array_c8 * const restrict,
|
extern void msum_c8 (gfc_array_c8 * const restrict,
|
||||||
gfc_array_c8 * const restrict, const index_type * const restrict,
|
gfc_array_c8 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_c8);
|
export_proto(msum_c8);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_c8 (gfc_array_c8 * const restrict retarray,
|
msum_c8 (gfc_array_c8 * const restrict retarray,
|
||||||
gfc_array_c8 * const restrict array,
|
gfc_array_c8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ msum_c8 (gfc_array_c8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_c8 (gfc_array_c8 * const restrict,
|
extern void ssum_c8 (gfc_array_c8 * const restrict,
|
||||||
gfc_array_c8 * const restrict, const index_type * const restrict,
|
gfc_array_c8 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_c8);
|
export_proto(ssum_c8);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_c8 (gfc_array_c8 * const restrict retarray,
|
ssum_c8 (gfc_array_c8 * const restrict retarray,
|
||||||
gfc_array_c8 * const restrict array,
|
gfc_array_c8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -26,24 +26,24 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"
|
#include "libgfortran.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined (HAVE_GFC_INTEGER_1) && defined (HAVE_GFC_INTEGER_1)
|
#if defined (HAVE_GFC_UINTEGER_1) && defined (HAVE_GFC_UINTEGER_1)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_i1 (gfc_array_i1 * const restrict,
|
extern void sum_i1 (gfc_array_m1 * const restrict,
|
||||||
gfc_array_i1 * const restrict, const index_type * const restrict);
|
gfc_array_m1 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_i1);
|
export_proto(sum_i1);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_i1 (gfc_array_i1 * const restrict retarray,
|
sum_i1 (gfc_array_m1 * const restrict retarray,
|
||||||
gfc_array_i1 * const restrict array,
|
gfc_array_m1 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
const GFC_INTEGER_1 * restrict base;
|
const GFC_UINTEGER_1 * restrict base;
|
||||||
GFC_INTEGER_1 * restrict dest;
|
GFC_UINTEGER_1 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type len;
|
index_type len;
|
||||||
@ -104,7 +104,7 @@ sum_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -135,8 +135,8 @@ sum_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
continue_loop = 1;
|
continue_loop = 1;
|
||||||
while (continue_loop)
|
while (continue_loop)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_1 * restrict src;
|
const GFC_UINTEGER_1 * restrict src;
|
||||||
GFC_INTEGER_1 result;
|
GFC_UINTEGER_1 result;
|
||||||
src = base;
|
src = base;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -188,15 +188,15 @@ sum_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_i1 (gfc_array_i1 * const restrict,
|
extern void msum_i1 (gfc_array_m1 * const restrict,
|
||||||
gfc_array_i1 * const restrict, const index_type * const restrict,
|
gfc_array_m1 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_i1);
|
export_proto(msum_i1);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_i1 (gfc_array_i1 * const restrict retarray,
|
msum_i1 (gfc_array_m1 * const restrict retarray,
|
||||||
gfc_array_i1 * const restrict array,
|
gfc_array_m1 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -204,8 +204,8 @@ msum_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type mstride[GFC_MAX_DIMENSIONS];
|
index_type mstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_1 * restrict dest;
|
GFC_UINTEGER_1 * restrict dest;
|
||||||
const GFC_INTEGER_1 * restrict base;
|
const GFC_UINTEGER_1 * restrict base;
|
||||||
const GFC_LOGICAL_1 * restrict mbase;
|
const GFC_LOGICAL_1 * restrict mbase;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -296,7 +296,7 @@ msum_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
retarray->offset = 0;
|
retarray->offset = 0;
|
||||||
retarray->dtype.rank = rank;
|
retarray->dtype.rank = rank;
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -327,9 +327,9 @@ msum_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
|
|
||||||
while (base)
|
while (base)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_1 * restrict src;
|
const GFC_UINTEGER_1 * restrict src;
|
||||||
const GFC_LOGICAL_1 * restrict msrc;
|
const GFC_LOGICAL_1 * restrict msrc;
|
||||||
GFC_INTEGER_1 result;
|
GFC_UINTEGER_1 result;
|
||||||
src = base;
|
src = base;
|
||||||
msrc = mbase;
|
msrc = mbase;
|
||||||
{
|
{
|
||||||
@ -378,21 +378,21 @@ msum_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_i1 (gfc_array_i1 * const restrict,
|
extern void ssum_i1 (gfc_array_m1 * const restrict,
|
||||||
gfc_array_i1 * const restrict, const index_type * const restrict,
|
gfc_array_m1 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_i1);
|
export_proto(ssum_i1);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_i1 (gfc_array_i1 * const restrict retarray,
|
ssum_i1 (gfc_array_m1 * const restrict retarray,
|
||||||
gfc_array_i1 * const restrict array,
|
gfc_array_m1 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_1 * restrict dest;
|
GFC_UINTEGER_1 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -455,7 +455,7 @@ ssum_i1 (gfc_array_i1 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_1));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -26,24 +26,24 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"
|
#include "libgfortran.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined (HAVE_GFC_INTEGER_16) && defined (HAVE_GFC_INTEGER_16)
|
#if defined (HAVE_GFC_UINTEGER_16) && defined (HAVE_GFC_UINTEGER_16)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_i16 (gfc_array_i16 * const restrict,
|
extern void sum_i16 (gfc_array_m16 * const restrict,
|
||||||
gfc_array_i16 * const restrict, const index_type * const restrict);
|
gfc_array_m16 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_i16);
|
export_proto(sum_i16);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_i16 (gfc_array_i16 * const restrict retarray,
|
sum_i16 (gfc_array_m16 * const restrict retarray,
|
||||||
gfc_array_i16 * const restrict array,
|
gfc_array_m16 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
const GFC_INTEGER_16 * restrict base;
|
const GFC_UINTEGER_16 * restrict base;
|
||||||
GFC_INTEGER_16 * restrict dest;
|
GFC_UINTEGER_16 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type len;
|
index_type len;
|
||||||
@ -104,7 +104,7 @@ sum_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_16));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -135,8 +135,8 @@ sum_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
continue_loop = 1;
|
continue_loop = 1;
|
||||||
while (continue_loop)
|
while (continue_loop)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_16 * restrict src;
|
const GFC_UINTEGER_16 * restrict src;
|
||||||
GFC_INTEGER_16 result;
|
GFC_UINTEGER_16 result;
|
||||||
src = base;
|
src = base;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -188,15 +188,15 @@ sum_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_i16 (gfc_array_i16 * const restrict,
|
extern void msum_i16 (gfc_array_m16 * const restrict,
|
||||||
gfc_array_i16 * const restrict, const index_type * const restrict,
|
gfc_array_m16 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_i16);
|
export_proto(msum_i16);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_i16 (gfc_array_i16 * const restrict retarray,
|
msum_i16 (gfc_array_m16 * const restrict retarray,
|
||||||
gfc_array_i16 * const restrict array,
|
gfc_array_m16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -204,8 +204,8 @@ msum_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type mstride[GFC_MAX_DIMENSIONS];
|
index_type mstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_16 * restrict dest;
|
GFC_UINTEGER_16 * restrict dest;
|
||||||
const GFC_INTEGER_16 * restrict base;
|
const GFC_UINTEGER_16 * restrict base;
|
||||||
const GFC_LOGICAL_1 * restrict mbase;
|
const GFC_LOGICAL_1 * restrict mbase;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -296,7 +296,7 @@ msum_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
retarray->offset = 0;
|
retarray->offset = 0;
|
||||||
retarray->dtype.rank = rank;
|
retarray->dtype.rank = rank;
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_16));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -327,9 +327,9 @@ msum_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
|
|
||||||
while (base)
|
while (base)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_16 * restrict src;
|
const GFC_UINTEGER_16 * restrict src;
|
||||||
const GFC_LOGICAL_1 * restrict msrc;
|
const GFC_LOGICAL_1 * restrict msrc;
|
||||||
GFC_INTEGER_16 result;
|
GFC_UINTEGER_16 result;
|
||||||
src = base;
|
src = base;
|
||||||
msrc = mbase;
|
msrc = mbase;
|
||||||
{
|
{
|
||||||
@ -378,21 +378,21 @@ msum_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_i16 (gfc_array_i16 * const restrict,
|
extern void ssum_i16 (gfc_array_m16 * const restrict,
|
||||||
gfc_array_i16 * const restrict, const index_type * const restrict,
|
gfc_array_m16 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_i16);
|
export_proto(ssum_i16);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_i16 (gfc_array_i16 * const restrict retarray,
|
ssum_i16 (gfc_array_m16 * const restrict retarray,
|
||||||
gfc_array_i16 * const restrict array,
|
gfc_array_m16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_16 * restrict dest;
|
GFC_UINTEGER_16 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -455,7 +455,7 @@ ssum_i16 (gfc_array_i16 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_16));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -26,24 +26,24 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"
|
#include "libgfortran.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined (HAVE_GFC_INTEGER_2) && defined (HAVE_GFC_INTEGER_2)
|
#if defined (HAVE_GFC_UINTEGER_2) && defined (HAVE_GFC_UINTEGER_2)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_i2 (gfc_array_i2 * const restrict,
|
extern void sum_i2 (gfc_array_m2 * const restrict,
|
||||||
gfc_array_i2 * const restrict, const index_type * const restrict);
|
gfc_array_m2 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_i2);
|
export_proto(sum_i2);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_i2 (gfc_array_i2 * const restrict retarray,
|
sum_i2 (gfc_array_m2 * const restrict retarray,
|
||||||
gfc_array_i2 * const restrict array,
|
gfc_array_m2 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
const GFC_INTEGER_2 * restrict base;
|
const GFC_UINTEGER_2 * restrict base;
|
||||||
GFC_INTEGER_2 * restrict dest;
|
GFC_UINTEGER_2 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type len;
|
index_type len;
|
||||||
@ -104,7 +104,7 @@ sum_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_2));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -135,8 +135,8 @@ sum_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
continue_loop = 1;
|
continue_loop = 1;
|
||||||
while (continue_loop)
|
while (continue_loop)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_2 * restrict src;
|
const GFC_UINTEGER_2 * restrict src;
|
||||||
GFC_INTEGER_2 result;
|
GFC_UINTEGER_2 result;
|
||||||
src = base;
|
src = base;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -188,15 +188,15 @@ sum_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_i2 (gfc_array_i2 * const restrict,
|
extern void msum_i2 (gfc_array_m2 * const restrict,
|
||||||
gfc_array_i2 * const restrict, const index_type * const restrict,
|
gfc_array_m2 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_i2);
|
export_proto(msum_i2);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_i2 (gfc_array_i2 * const restrict retarray,
|
msum_i2 (gfc_array_m2 * const restrict retarray,
|
||||||
gfc_array_i2 * const restrict array,
|
gfc_array_m2 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -204,8 +204,8 @@ msum_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type mstride[GFC_MAX_DIMENSIONS];
|
index_type mstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_2 * restrict dest;
|
GFC_UINTEGER_2 * restrict dest;
|
||||||
const GFC_INTEGER_2 * restrict base;
|
const GFC_UINTEGER_2 * restrict base;
|
||||||
const GFC_LOGICAL_1 * restrict mbase;
|
const GFC_LOGICAL_1 * restrict mbase;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -296,7 +296,7 @@ msum_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
retarray->offset = 0;
|
retarray->offset = 0;
|
||||||
retarray->dtype.rank = rank;
|
retarray->dtype.rank = rank;
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_2));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -327,9 +327,9 @@ msum_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
|
|
||||||
while (base)
|
while (base)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_2 * restrict src;
|
const GFC_UINTEGER_2 * restrict src;
|
||||||
const GFC_LOGICAL_1 * restrict msrc;
|
const GFC_LOGICAL_1 * restrict msrc;
|
||||||
GFC_INTEGER_2 result;
|
GFC_UINTEGER_2 result;
|
||||||
src = base;
|
src = base;
|
||||||
msrc = mbase;
|
msrc = mbase;
|
||||||
{
|
{
|
||||||
@ -378,21 +378,21 @@ msum_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_i2 (gfc_array_i2 * const restrict,
|
extern void ssum_i2 (gfc_array_m2 * const restrict,
|
||||||
gfc_array_i2 * const restrict, const index_type * const restrict,
|
gfc_array_m2 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_i2);
|
export_proto(ssum_i2);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_i2 (gfc_array_i2 * const restrict retarray,
|
ssum_i2 (gfc_array_m2 * const restrict retarray,
|
||||||
gfc_array_i2 * const restrict array,
|
gfc_array_m2 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_2 * restrict dest;
|
GFC_UINTEGER_2 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -455,7 +455,7 @@ ssum_i2 (gfc_array_i2 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_2));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -26,24 +26,24 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"
|
#include "libgfortran.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined (HAVE_GFC_INTEGER_4) && defined (HAVE_GFC_INTEGER_4)
|
#if defined (HAVE_GFC_UINTEGER_4) && defined (HAVE_GFC_UINTEGER_4)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_i4 (gfc_array_i4 * const restrict,
|
extern void sum_i4 (gfc_array_m4 * const restrict,
|
||||||
gfc_array_i4 * const restrict, const index_type * const restrict);
|
gfc_array_m4 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_i4);
|
export_proto(sum_i4);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_i4 (gfc_array_i4 * const restrict retarray,
|
sum_i4 (gfc_array_m4 * const restrict retarray,
|
||||||
gfc_array_i4 * const restrict array,
|
gfc_array_m4 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
const GFC_INTEGER_4 * restrict base;
|
const GFC_UINTEGER_4 * restrict base;
|
||||||
GFC_INTEGER_4 * restrict dest;
|
GFC_UINTEGER_4 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type len;
|
index_type len;
|
||||||
@ -104,7 +104,7 @@ sum_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -135,8 +135,8 @@ sum_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
continue_loop = 1;
|
continue_loop = 1;
|
||||||
while (continue_loop)
|
while (continue_loop)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_4 * restrict src;
|
const GFC_UINTEGER_4 * restrict src;
|
||||||
GFC_INTEGER_4 result;
|
GFC_UINTEGER_4 result;
|
||||||
src = base;
|
src = base;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -188,15 +188,15 @@ sum_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_i4 (gfc_array_i4 * const restrict,
|
extern void msum_i4 (gfc_array_m4 * const restrict,
|
||||||
gfc_array_i4 * const restrict, const index_type * const restrict,
|
gfc_array_m4 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_i4);
|
export_proto(msum_i4);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_i4 (gfc_array_i4 * const restrict retarray,
|
msum_i4 (gfc_array_m4 * const restrict retarray,
|
||||||
gfc_array_i4 * const restrict array,
|
gfc_array_m4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -204,8 +204,8 @@ msum_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type mstride[GFC_MAX_DIMENSIONS];
|
index_type mstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_4 * restrict dest;
|
GFC_UINTEGER_4 * restrict dest;
|
||||||
const GFC_INTEGER_4 * restrict base;
|
const GFC_UINTEGER_4 * restrict base;
|
||||||
const GFC_LOGICAL_1 * restrict mbase;
|
const GFC_LOGICAL_1 * restrict mbase;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -296,7 +296,7 @@ msum_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
retarray->offset = 0;
|
retarray->offset = 0;
|
||||||
retarray->dtype.rank = rank;
|
retarray->dtype.rank = rank;
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -327,9 +327,9 @@ msum_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
|
|
||||||
while (base)
|
while (base)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_4 * restrict src;
|
const GFC_UINTEGER_4 * restrict src;
|
||||||
const GFC_LOGICAL_1 * restrict msrc;
|
const GFC_LOGICAL_1 * restrict msrc;
|
||||||
GFC_INTEGER_4 result;
|
GFC_UINTEGER_4 result;
|
||||||
src = base;
|
src = base;
|
||||||
msrc = mbase;
|
msrc = mbase;
|
||||||
{
|
{
|
||||||
@ -378,21 +378,21 @@ msum_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_i4 (gfc_array_i4 * const restrict,
|
extern void ssum_i4 (gfc_array_m4 * const restrict,
|
||||||
gfc_array_i4 * const restrict, const index_type * const restrict,
|
gfc_array_m4 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_i4);
|
export_proto(ssum_i4);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_i4 (gfc_array_i4 * const restrict retarray,
|
ssum_i4 (gfc_array_m4 * const restrict retarray,
|
||||||
gfc_array_i4 * const restrict array,
|
gfc_array_m4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_4 * restrict dest;
|
GFC_UINTEGER_4 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -455,7 +455,7 @@ ssum_i4 (gfc_array_i4 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_4));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -26,24 +26,24 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"
|
#include "libgfortran.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined (HAVE_GFC_INTEGER_8) && defined (HAVE_GFC_INTEGER_8)
|
#if defined (HAVE_GFC_UINTEGER_8) && defined (HAVE_GFC_UINTEGER_8)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_i8 (gfc_array_i8 * const restrict,
|
extern void sum_i8 (gfc_array_m8 * const restrict,
|
||||||
gfc_array_i8 * const restrict, const index_type * const restrict);
|
gfc_array_m8 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_i8);
|
export_proto(sum_i8);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_i8 (gfc_array_i8 * const restrict retarray,
|
sum_i8 (gfc_array_m8 * const restrict retarray,
|
||||||
gfc_array_i8 * const restrict array,
|
gfc_array_m8 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
const GFC_INTEGER_8 * restrict base;
|
const GFC_UINTEGER_8 * restrict base;
|
||||||
GFC_INTEGER_8 * restrict dest;
|
GFC_UINTEGER_8 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type len;
|
index_type len;
|
||||||
@ -104,7 +104,7 @@ sum_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_8));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -135,8 +135,8 @@ sum_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
continue_loop = 1;
|
continue_loop = 1;
|
||||||
while (continue_loop)
|
while (continue_loop)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_8 * restrict src;
|
const GFC_UINTEGER_8 * restrict src;
|
||||||
GFC_INTEGER_8 result;
|
GFC_UINTEGER_8 result;
|
||||||
src = base;
|
src = base;
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -188,15 +188,15 @@ sum_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_i8 (gfc_array_i8 * const restrict,
|
extern void msum_i8 (gfc_array_m8 * const restrict,
|
||||||
gfc_array_i8 * const restrict, const index_type * const restrict,
|
gfc_array_m8 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_i8);
|
export_proto(msum_i8);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_i8 (gfc_array_i8 * const restrict retarray,
|
msum_i8 (gfc_array_m8 * const restrict retarray,
|
||||||
gfc_array_i8 * const restrict array,
|
gfc_array_m8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -204,8 +204,8 @@ msum_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
index_type sstride[GFC_MAX_DIMENSIONS];
|
index_type sstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
index_type mstride[GFC_MAX_DIMENSIONS];
|
index_type mstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_8 * restrict dest;
|
GFC_UINTEGER_8 * restrict dest;
|
||||||
const GFC_INTEGER_8 * restrict base;
|
const GFC_UINTEGER_8 * restrict base;
|
||||||
const GFC_LOGICAL_1 * restrict mbase;
|
const GFC_LOGICAL_1 * restrict mbase;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -296,7 +296,7 @@ msum_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
retarray->offset = 0;
|
retarray->offset = 0;
|
||||||
retarray->dtype.rank = rank;
|
retarray->dtype.rank = rank;
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_8));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -327,9 +327,9 @@ msum_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
|
|
||||||
while (base)
|
while (base)
|
||||||
{
|
{
|
||||||
const GFC_INTEGER_8 * restrict src;
|
const GFC_UINTEGER_8 * restrict src;
|
||||||
const GFC_LOGICAL_1 * restrict msrc;
|
const GFC_LOGICAL_1 * restrict msrc;
|
||||||
GFC_INTEGER_8 result;
|
GFC_UINTEGER_8 result;
|
||||||
src = base;
|
src = base;
|
||||||
msrc = mbase;
|
msrc = mbase;
|
||||||
{
|
{
|
||||||
@ -378,21 +378,21 @@ msum_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_i8 (gfc_array_i8 * const restrict,
|
extern void ssum_i8 (gfc_array_m8 * const restrict,
|
||||||
gfc_array_i8 * const restrict, const index_type * const restrict,
|
gfc_array_m8 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_i8);
|
export_proto(ssum_i8);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_i8 (gfc_array_i8 * const restrict retarray,
|
ssum_i8 (gfc_array_m8 * const restrict retarray,
|
||||||
gfc_array_i8 * const restrict array,
|
gfc_array_m8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
index_type extent[GFC_MAX_DIMENSIONS];
|
index_type extent[GFC_MAX_DIMENSIONS];
|
||||||
index_type dstride[GFC_MAX_DIMENSIONS];
|
index_type dstride[GFC_MAX_DIMENSIONS];
|
||||||
GFC_INTEGER_8 * restrict dest;
|
GFC_UINTEGER_8 * restrict dest;
|
||||||
index_type rank;
|
index_type rank;
|
||||||
index_type n;
|
index_type n;
|
||||||
index_type dim;
|
index_type dim;
|
||||||
@ -455,7 +455,7 @@ ssum_i8 (gfc_array_i8 * const restrict retarray,
|
|||||||
|
|
||||||
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
|
||||||
|
|
||||||
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
|
retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_UINTEGER_8));
|
||||||
if (alloc_size == 0)
|
if (alloc_size == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_REAL_10)
|
#if defined (HAVE_GFC_REAL_10) && defined (HAVE_GFC_REAL_10)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_r10 (gfc_array_r10 * const restrict,
|
extern void sum_r10 (gfc_array_r10 * const restrict,
|
||||||
gfc_array_r10 * const restrict, const index_type * const restrict);
|
gfc_array_r10 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_r10);
|
export_proto(sum_r10);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_r10 (gfc_array_r10 * const restrict retarray,
|
sum_r10 (gfc_array_r10 * const restrict retarray,
|
||||||
gfc_array_r10 * const restrict array,
|
gfc_array_r10 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ sum_r10 (gfc_array_r10 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_r10 (gfc_array_r10 * const restrict,
|
extern void msum_r10 (gfc_array_r10 * const restrict,
|
||||||
gfc_array_r10 * const restrict, const index_type * const restrict,
|
gfc_array_r10 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_r10);
|
export_proto(msum_r10);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_r10 (gfc_array_r10 * const restrict retarray,
|
msum_r10 (gfc_array_r10 * const restrict retarray,
|
||||||
gfc_array_r10 * const restrict array,
|
gfc_array_r10 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ msum_r10 (gfc_array_r10 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_r10 (gfc_array_r10 * const restrict,
|
extern void ssum_r10 (gfc_array_r10 * const restrict,
|
||||||
gfc_array_r10 * const restrict, const index_type * const restrict,
|
gfc_array_r10 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_r10);
|
export_proto(ssum_r10);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_r10 (gfc_array_r10 * const restrict retarray,
|
ssum_r10 (gfc_array_r10 * const restrict retarray,
|
||||||
gfc_array_r10 * const restrict array,
|
gfc_array_r10 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_REAL_16)
|
#if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_REAL_16)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_r16 (gfc_array_r16 * const restrict,
|
extern void sum_r16 (gfc_array_r16 * const restrict,
|
||||||
gfc_array_r16 * const restrict, const index_type * const restrict);
|
gfc_array_r16 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_r16);
|
export_proto(sum_r16);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_r16 (gfc_array_r16 * const restrict retarray,
|
sum_r16 (gfc_array_r16 * const restrict retarray,
|
||||||
gfc_array_r16 * const restrict array,
|
gfc_array_r16 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ sum_r16 (gfc_array_r16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_r16 (gfc_array_r16 * const restrict,
|
extern void msum_r16 (gfc_array_r16 * const restrict,
|
||||||
gfc_array_r16 * const restrict, const index_type * const restrict,
|
gfc_array_r16 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_r16);
|
export_proto(msum_r16);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_r16 (gfc_array_r16 * const restrict retarray,
|
msum_r16 (gfc_array_r16 * const restrict retarray,
|
||||||
gfc_array_r16 * const restrict array,
|
gfc_array_r16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ msum_r16 (gfc_array_r16 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_r16 (gfc_array_r16 * const restrict,
|
extern void ssum_r16 (gfc_array_r16 * const restrict,
|
||||||
gfc_array_r16 * const restrict, const index_type * const restrict,
|
gfc_array_r16 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_r16);
|
export_proto(ssum_r16);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_r16 (gfc_array_r16 * const restrict retarray,
|
ssum_r16 (gfc_array_r16 * const restrict retarray,
|
||||||
gfc_array_r16 * const restrict array,
|
gfc_array_r16 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_REAL_17) && defined (HAVE_GFC_REAL_17)
|
#if defined (HAVE_GFC_REAL_17) && defined (HAVE_GFC_REAL_17)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_r17 (gfc_array_r17 * const restrict,
|
extern void sum_r17 (gfc_array_r17 * const restrict,
|
||||||
gfc_array_r17 * const restrict, const index_type * const restrict);
|
gfc_array_r17 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_r17);
|
export_proto(sum_r17);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_r17 (gfc_array_r17 * const restrict retarray,
|
sum_r17 (gfc_array_r17 * const restrict retarray,
|
||||||
gfc_array_r17 * const restrict array,
|
gfc_array_r17 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ sum_r17 (gfc_array_r17 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_r17 (gfc_array_r17 * const restrict,
|
extern void msum_r17 (gfc_array_r17 * const restrict,
|
||||||
gfc_array_r17 * const restrict, const index_type * const restrict,
|
gfc_array_r17 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_r17);
|
export_proto(msum_r17);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_r17 (gfc_array_r17 * const restrict retarray,
|
msum_r17 (gfc_array_r17 * const restrict retarray,
|
||||||
gfc_array_r17 * const restrict array,
|
gfc_array_r17 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ msum_r17 (gfc_array_r17 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_r17 (gfc_array_r17 * const restrict,
|
extern void ssum_r17 (gfc_array_r17 * const restrict,
|
||||||
gfc_array_r17 * const restrict, const index_type * const restrict,
|
gfc_array_r17 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_r17);
|
export_proto(ssum_r17);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_r17 (gfc_array_r17 * const restrict retarray,
|
ssum_r17 (gfc_array_r17 * const restrict retarray,
|
||||||
gfc_array_r17 * const restrict array,
|
gfc_array_r17 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_REAL_4)
|
#if defined (HAVE_GFC_REAL_4) && defined (HAVE_GFC_REAL_4)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_r4 (gfc_array_r4 * const restrict,
|
extern void sum_r4 (gfc_array_r4 * const restrict,
|
||||||
gfc_array_r4 * const restrict, const index_type * const restrict);
|
gfc_array_r4 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_r4);
|
export_proto(sum_r4);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_r4 (gfc_array_r4 * const restrict retarray,
|
sum_r4 (gfc_array_r4 * const restrict retarray,
|
||||||
gfc_array_r4 * const restrict array,
|
gfc_array_r4 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ sum_r4 (gfc_array_r4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_r4 (gfc_array_r4 * const restrict,
|
extern void msum_r4 (gfc_array_r4 * const restrict,
|
||||||
gfc_array_r4 * const restrict, const index_type * const restrict,
|
gfc_array_r4 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_r4);
|
export_proto(msum_r4);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_r4 (gfc_array_r4 * const restrict retarray,
|
msum_r4 (gfc_array_r4 * const restrict retarray,
|
||||||
gfc_array_r4 * const restrict array,
|
gfc_array_r4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ msum_r4 (gfc_array_r4 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_r4 (gfc_array_r4 * const restrict,
|
extern void ssum_r4 (gfc_array_r4 * const restrict,
|
||||||
gfc_array_r4 * const restrict, const index_type * const restrict,
|
gfc_array_r4 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_r4);
|
export_proto(ssum_r4);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_r4 (gfc_array_r4 * const restrict retarray,
|
ssum_r4 (gfc_array_r4 * const restrict retarray,
|
||||||
gfc_array_r4 * const restrict array,
|
gfc_array_r4 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -29,13 +29,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_REAL_8)
|
#if defined (HAVE_GFC_REAL_8) && defined (HAVE_GFC_REAL_8)
|
||||||
|
|
||||||
|
|
||||||
extern void sum_r8 (gfc_array_r8 * const restrict,
|
extern void sum_r8 (gfc_array_r8 * const restrict,
|
||||||
gfc_array_r8 * const restrict, const index_type * const restrict);
|
gfc_array_r8 * const restrict, const index_type * const restrict);
|
||||||
export_proto(sum_r8);
|
export_proto(sum_r8);
|
||||||
|
|
||||||
void
|
void
|
||||||
sum_r8 (gfc_array_r8 * const restrict retarray,
|
sum_r8 (gfc_array_r8 * const restrict retarray,
|
||||||
gfc_array_r8 * const restrict array,
|
gfc_array_r8 * const restrict array,
|
||||||
const index_type * const restrict pdim)
|
const index_type * const restrict pdim)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -188,15 +188,15 @@ sum_r8 (gfc_array_r8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void msum_r8 (gfc_array_r8 * const restrict,
|
extern void msum_r8 (gfc_array_r8 * const restrict,
|
||||||
gfc_array_r8 * const restrict, const index_type * const restrict,
|
gfc_array_r8 * const restrict, const index_type * const restrict,
|
||||||
gfc_array_l1 * const restrict);
|
gfc_array_l1 * const restrict);
|
||||||
export_proto(msum_r8);
|
export_proto(msum_r8);
|
||||||
|
|
||||||
void
|
void
|
||||||
msum_r8 (gfc_array_r8 * const restrict retarray,
|
msum_r8 (gfc_array_r8 * const restrict retarray,
|
||||||
gfc_array_r8 * const restrict array,
|
gfc_array_r8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask)
|
gfc_array_l1 * const restrict mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -378,15 +378,15 @@ msum_r8 (gfc_array_r8 * const restrict retarray,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void ssum_r8 (gfc_array_r8 * const restrict,
|
extern void ssum_r8 (gfc_array_r8 * const restrict,
|
||||||
gfc_array_r8 * const restrict, const index_type * const restrict,
|
gfc_array_r8 * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *);
|
GFC_LOGICAL_4 *);
|
||||||
export_proto(ssum_r8);
|
export_proto(ssum_r8);
|
||||||
|
|
||||||
void
|
void
|
||||||
ssum_r8 (gfc_array_r8 * const restrict retarray,
|
ssum_r8 (gfc_array_r8 * const restrict retarray,
|
||||||
gfc_array_r8 * const restrict array,
|
gfc_array_r8 * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask)
|
GFC_LOGICAL_4 * mask)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -19,13 +19,13 @@ dnl You should not return or break from the inner loop of the implementation.
|
|||||||
dnl Care should also be taken to avoid using the names defined in iparm.m4
|
dnl Care should also be taken to avoid using the names defined in iparm.m4
|
||||||
define(START_ARRAY_FUNCTION,
|
define(START_ARRAY_FUNCTION,
|
||||||
`
|
`
|
||||||
extern void name`'rtype_qual`_'atype_code (rtype * const restrict,
|
extern void name`'rtype_qual`_'atype_code (rtype * const restrict,
|
||||||
atype` * const restrict, const 'index_type` * const restrict'back_arg`);
|
atype` * const restrict, const 'index_type` * const restrict'back_arg`);
|
||||||
export_proto('name`'rtype_qual`_'atype_code);
|
export_proto('name`'rtype_qual`_'atype_code);
|
||||||
|
|
||||||
void
|
void
|
||||||
name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray,
|
name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray,
|
||||||
'atype` * const restrict array,
|
'atype` * const restrict array,
|
||||||
const index_type * const restrict pdim'back_arg`)
|
const index_type * const restrict pdim'back_arg`)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -178,15 +178,15 @@ define(FINISH_ARRAY_FUNCTION,
|
|||||||
}')dnl
|
}')dnl
|
||||||
define(START_MASKED_ARRAY_FUNCTION,
|
define(START_MASKED_ARRAY_FUNCTION,
|
||||||
`
|
`
|
||||||
extern void `m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict,
|
extern void `m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict,
|
||||||
'atype` * const restrict, const 'index_type` * const restrict,
|
'atype` * const restrict, const 'index_type` * const restrict,
|
||||||
gfc_array_l1 * const restrict'back_arg`);
|
gfc_array_l1 * const restrict'back_arg`);
|
||||||
export_proto(m'name`'rtype_qual`_'atype_code`);
|
export_proto(m'name`'rtype_qual`_'atype_code`);
|
||||||
|
|
||||||
void
|
void
|
||||||
m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray,
|
m'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray,
|
||||||
'atype` * const restrict array,
|
'atype` * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
gfc_array_l1 * const restrict mask'back_arg`)
|
gfc_array_l1 * const restrict mask'back_arg`)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
@ -367,15 +367,15 @@ define(FINISH_MASKED_ARRAY_FUNCTION,
|
|||||||
}')dnl
|
}')dnl
|
||||||
define(SCALAR_ARRAY_FUNCTION,
|
define(SCALAR_ARRAY_FUNCTION,
|
||||||
`
|
`
|
||||||
extern void `s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict,
|
extern void `s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict,
|
||||||
'atype` * const restrict, const index_type * const restrict,
|
'atype` * const restrict, const index_type * const restrict,
|
||||||
GFC_LOGICAL_4 *'back_arg`);
|
GFC_LOGICAL_4 *'back_arg`);
|
||||||
export_proto(s'name`'rtype_qual`_'atype_code);
|
export_proto(s'name`'rtype_qual`_'atype_code);
|
||||||
|
|
||||||
void
|
void
|
||||||
`s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray,
|
`s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray,
|
||||||
'atype` * const restrict array,
|
'atype` * const restrict array,
|
||||||
const index_type * const restrict pdim,
|
const index_type * const restrict pdim,
|
||||||
GFC_LOGICAL_4 * mask'back_arg`)
|
GFC_LOGICAL_4 * mask'back_arg`)
|
||||||
{
|
{
|
||||||
index_type count[GFC_MAX_DIMENSIONS];
|
index_type count[GFC_MAX_DIMENSIONS];
|
||||||
|
@ -26,6 +26,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"'
|
#include "libgfortran.h"'
|
||||||
|
|
||||||
include(iparm.m4)dnl
|
include(iparm.m4)dnl
|
||||||
|
ifelse(index(rtype_name,`GFC_INTEGER'),`0',dnl
|
||||||
|
define(`rtype_name',patsubst(rtype_name,`GFC_INTEGER',`GFC_UINTEGER'))dnl
|
||||||
|
define(`atype_name',patsubst(rtype_name,`GFC_INTEGER',`GFC_UINTEGER'))dnl
|
||||||
|
define(`rtype',patsubst(rtype,`gfc_array_i',`gfc_array_m'))dnl
|
||||||
|
define(`atype',patsubst(rtype,`gfc_array_i',`gfc_array_m')))dnl
|
||||||
include(ifunction.m4)dnl
|
include(ifunction.m4)dnl
|
||||||
|
|
||||||
`#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)'
|
`#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)'
|
||||||
|
@ -26,6 +26,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||||||
#include "libgfortran.h"'
|
#include "libgfortran.h"'
|
||||||
|
|
||||||
include(iparm.m4)dnl
|
include(iparm.m4)dnl
|
||||||
|
ifelse(index(rtype_name,`GFC_INTEGER'),`0',dnl
|
||||||
|
define(`rtype_name',patsubst(rtype_name,`GFC_INTEGER',`GFC_UINTEGER'))dnl
|
||||||
|
define(`atype_name',patsubst(rtype_name,`GFC_INTEGER',`GFC_UINTEGER'))dnl
|
||||||
|
define(`rtype',patsubst(rtype,`gfc_array_i',`gfc_array_m'))dnl
|
||||||
|
define(`atype',patsubst(rtype,`gfc_array_i',`gfc_array_m')))dnl
|
||||||
include(ifunction.m4)dnl
|
include(ifunction.m4)dnl
|
||||||
|
|
||||||
`#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)'
|
`#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)'
|
||||||
|
Loading…
Reference in New Issue
Block a user