7 LocationCounter::LocationCounter():
11 void LocationCounter::visit(BasicTypeDeclaration &basic)
13 r_count = basic.kind==BasicTypeDeclaration::MATRIX ? basic.size>>16 : 1;
16 void LocationCounter::visit(ImageTypeDeclaration &)
21 void LocationCounter::visit(StructDeclaration &strct)
24 for(NodeList<Statement>::const_iterator i=strct.members.body.begin(); i!=strct.members.body.end(); ++i)
33 void LocationCounter::visit(VariableDeclaration &var)
36 if(var.type_declaration)
37 var.type_declaration->visit(*this);
39 if(const Literal *literal = dynamic_cast<const Literal *>(var.array_size.get()))
40 if(literal->value.check_type<int>())
41 r_count *= literal->value.value<int>();