Method of, system for, and computer program product for providing inlined nested array constructors using normalized counters
AssigneeInternational Business Machines Corporation
InventorsDz Ching Ju, John Shek-Luen Ng
Life of this patent
Estimating the term…
Abstract
Method of, system for, and computer program product for generating efficient code for a set of nested Fortran 90 array constructors without introducing temporary vectors by the use of normalized counters and by maintaining array constructor extent structure trees. Non-perfectly nested array constructors and array constructors with dynamic extents may be inlined. The results provided include a reduction in run-time memory storage usage and an improvement in execution time performance.
Claims12
A method for translating an expression containing one or more array constructors nested in one or more array constructor levels in a source program, said method comprising the steps of:
- searching a plurality of nodes of an expression tree of the expression for each of the array constructors;
- associating a normalized counter with each of the array constructor levels;
- scalarizing the array constructors nested in an array constructor level by use of the normalized counter associated with the array constructor level;
- building an extent structure tree of a portion of the expression tree rooted at a current expression tree node if the current expression tree node is an array constructor;
- and
- splitting the current expression tree node if the current expression tree node is a non-elemental operator.
A computer system for translating an expression containing one or more array constructors nested in one or more array constructor levels in a source program, said computer system comprising:
- a searcher for searching a plurality of nodes of an expression tree of the expression for each of the array constructors;
- an associator for associating a normalized counter with each of the array constructor levels;
- a scalarizer for scalarizing the array constructors nested in an array constructor level by use of the normalized counter associated with the array constructor level;
- an extent structure tree builder for building an extent structure tree of a portion of the expression tree rooted at a current expression tree node if the current expression tree node is an array constructor;
- and
- a splitter for splitting the current expression tree node if the current expression tree node is a non-elemental operator.
An article of manufacture for use in a computer system for translating an expression containing one or more array constructors nested in one or more array constructor levels in a source program, said article of manufacture comprising a computer-readable storage medium having a computer program embodied in said medium which may cause the computer system to:
- search a plurality of nodes of an expression tree of the expression for each of the array constructors;
- associate a normalized counter with each of the array constructor levels;
- scalarize the array constructors nested in an array constructor level by use of the normalized counter associated with the array constructor level;
- build an extent structure tree of a portion of the expression tree rooted at a current expression tree node if the current expression tree node is an array constructor;
- and
- split the current expression tree node if the current expression tree node is a non-elemental operator.
Dependencies are inferred from the claim text.