| 401 | } |
| 402 | |
| 403 | bool |
| 404 | ArrayVariable::is_variant(const Variable* v) const |
| 405 | { |
| 406 | if (v->isArray) { |
| 407 | const ArrayVariable* av = dynamic_cast<const ArrayVariable*>(v); |
| 408 | assert(av); |
| 409 | if (av->collective != 0 && collective == av->collective && av->indices.size() == this->indices.size() ) { |
| 410 | size_t i; |
| 411 | for (i=0; i<indices.size(); i++) { |
| 412 | const Expression* e = indices[i]; |
| 413 | const Expression* other_e = av->indices[i]; |
| 414 | if (count_expr_key_var(e) != 1 || |
| 415 | count_expr_key_var(other_e) != 1 || |
| 416 | find_expr_key_var(e) != find_expr_key_var(other_e)) { |
| 417 | return false; |
| 418 | } |
| 419 | } |
| 420 | return true; |
| 421 | } |
| 422 | } |
| 423 | return false; |
| 424 | } |
| 425 | |
| 426 | // -------------------------------------------------------------- |
| 427 | bool |
nothing calls this directly
no test coverage detected