next up previous
Next: Note Up: Fully Static Dimensional Analysis Previous: Analysis of the Method

Conclusions

It should be realized that it is possible to perform compile-time dimensional analysis in any language which has name-equivalence of structures. The programmer needs to define a unique structure for each dimension which may be required by the program at run-time, and also define functions implementing all the required operations over all the dimensions. This approach suffers from poor syntax, run-time overhead due to function-call overhead and inordinate tedium for the programmer. C++ provides a happy combination of operator overloading (which provides readable syntax), inline functions (which eliminate function-call overhead) and templates (which replace the programmer's tedium with that of the compiler) It is the coming together of these features which makes static dimensional analysis practical.


next up previous
Next: Note Up: Fully Static Dimensional Analysis Previous: Analysis of the Method

zerksis umrigar (zdu@acm.org)
Fri Aug 8 15:41:40 EDT 1997