DistributeExpr Class ReferenceDistribution Type.
More...
#include <DistributeExpr.h>
Inheritance diagram for DistributeExpr:
[legend]List of all members.
Detailed Description
Distribution Type.
Polaris Expression - See also:
- Expression/DistributeExpr.h
Expression/DistributeExpr.h
Expression/Expression.cc
A DistributeExpr is exclusively used for a shared array distribution because shared scalars do not need distribution. The distribution has two forms. The typical form is 'w:BLOCK(b)' where 'w' is the weight and 'b' is the block size. Another form is ':', called degenerate distribution. For now, this is customized for Cray T3D programming model, but we believe this class may also be used for the other distributed memory programming models with possible minor change.
Definition at line 45 of file DistributeExpr.h.
Constructor & Destructor Documentation
| DistributeExpr::DistributeExpr |
( |
|
) |
|
|
| DistributeExpr::DistributeExpr |
( |
Symbol & |
s |
) |
|
|
Member Function Documentation
| void DistributeExpr::set_distribute |
( |
int |
dim, |
|
|
DISTR_TYPE |
distr, |
|
|
int |
weight = 0, |
|
|
int |
block = 0 |
|
) |
[virtual] |
|
|
|
Distribution is specified for each dimesion, starting from 1.
If different distribution types for the same dimension are given, the old is overwitten by the new. For DEGEN_DISTR, weight and block must not given by the caller. For BLOCK_DISTR, only weight must be initialized by the caller. Only for CYCLIC_DISTR, both are initailized to positive numbers by the caller
Definition at line 7403 of file Expression.cc.
References BLOCK_DISTR, CYCLIC_DISTR, and DEGEN_DISTR. |
| DISTR_TYPE DistributeExpr::distribute_type |
( |
int |
dim |
) |
const [virtual] |
|
| Boolean DistributeExpr::is_defined |
( |
int |
dim |
) |
const [inline, virtual] |
|
| int DistributeExpr::weight |
( |
int |
dim |
) |
const [inline, virtual] |
|
| int DistributeExpr::block |
( |
int |
dim |
) |
const [inline, virtual] |
|
|
|
Queries of weight and block size for given dimension.
If invalid query is made, it returns meaingless value; for instance, block(dim) for distribute_type(dim)=DEGEN_DISTR.
Definition at line 183 of file DistributeExpr.h. |
| Boolean DistributeExpr::is_symbol_defined |
( |
|
) |
const [inline, virtual] |
|
| void DistributeExpr::symbol |
( |
const Symbol & |
s |
) |
[virtual] |
|
|
|
Reimplemented from Expression.
Definition at line 7391 of file Expression.cc.
References VARIABLE_CLASS.
Referenced by _are_vars_in_expr(), _replace_vars_with_omega(), TranslateObject::_translate_symbol_refs_expr(), collect_all_symbols(), get_hash(), IDExpr::IDExpr(), is_var_in_expr(), IDExpr::operator=(), RangeComparator::signz(), substitute_var(), symbol(), and top_sort_expressions(). |
| const Symbol & DistributeExpr::symbol |
( |
|
) |
const [inline, virtual] |
|
| Symbol & DistributeExpr::symbol |
( |
|
) |
[inline, virtual] |
|
| void DistributeExpr::dimension |
( |
int |
new_dim |
) |
[inline, virtual] |
|
| int DistributeExpr::dimension |
( |
|
) |
const [inline, virtual] |
|
|
|
Return the dimension of the shared array.
The dimension is set automnatically from its Symbol.
Definition at line 148 of file DistributeExpr.h. |
| Boolean DistributeExpr::is_well_defined |
( |
|
) |
const [virtual] |
|
|
|
Check if all dimensions are distribution-defined.
... Within valid dimensions, must be defined
... Within invalid dimensions, must not defined
Definition at line 7443 of file Expression.cc.
References False, and True. |
| void DistributeExpr::clear |
( |
|
) |
[inline, virtual] |
|
|
|
Initialize all distributions.
< initially the distribution is undefined
Definition at line 196 of file DistributeExpr.h. |
| Expression * DistributeExpr::clone |
( |
|
) |
const [virtual] |
|
|
|
Return a copy of myself.
Implements Expression.
Definition at line 7460 of file Expression.cc.
References DistributeExpr().
Referenced by _forward_diff(), _logical_complement(), _max_abs_expr(), _min_abs_expr(), _mult_range_with_expr(), _p_r_o_of_add(), _p_r_o_of_ifix(), _p_r_o_of_min_max(), TranslateObject::_translate_symbol_refs_expr(), eg_range(), eg_range_array_1_to_i(), eg_range_from_input(), UnaryExpr::operator=(), BinaryExpr::operator=(), precalc_func_call(), RangeComparator::signz(), substitute_var(), and test_expr_str(). |
| virtual void DistributeExpr::convert |
( |
BinRep & |
bp, |
|
|
Symtab & |
sym |
|
) |
[virtual] |
|
|
|
Read in the values of my fields and my subexpressions from the given BinRep object.
Convert(BinRep) expects the BinRep to be referencing an expression set of the same type as the expression. On return, all data from the expression set has been inserted into the appropriate fields in the expression object. NOTE that this converts the expression to an intermediate form which may contain TableExpr objects.
Implements Expression. |
| int DistributeExpr::structures_OK |
( |
|
) |
const [inline, virtual] |
|
| void DistributeExpr::print |
( |
ostream & |
o |
) |
const [virtual] |
|
| virtual void DistributeExpr::print_debug |
( |
ostream & |
o, |
|
|
Boolean |
debug |
|
) |
const [virtual] |
|
| void DistributeExpr::relink_eptrs |
( |
ProgramUnit & |
p |
) |
[virtual] |
|
Friends And Related Function Documentation
The documentation for this class was generated from the following files:
|