Aw: Re: Scalarization of simplification of constant expressions?
Harald Anlauf
anlauf@gmx.de
Tue Oct 6 21:34:51 GMT 2020
Hi Paul,
> Yes, there is a scalarizer for elemental calls: expr.c(scalarize_intrinsic_call) first appears in 2007.
thanks for pointing this out.
However, can you elaborate a little bit on how to use it?
A grep show just two places where it is used, and only in expr.c:
In gfc_simplify_expr:
if (p->expr_type == EXPR_FUNCTION)
{
if (p->symtree)
isym = gfc_find_function (p->symtree->n.sym->name);
if (isym && isym->elemental)
scalarize_intrinsic_call (p, false);
}
In gfc_check_init_expr:
/* Try to scalarize an elemental intrinsic function that has an
array argument. */
isym = gfc_find_function (e->symtree->n.sym->name);
if (isym && isym->elemental
&& (t = scalarize_intrinsic_call (e, true)))
break;
Do you have an example how to apply it?
Thanks,
Harald
More information about the Fortran
mailing list