next up previous contents index
Next: GRAPE Math Functions Up: GRAPE Previous: Memory Management in GRAPE

GRAPE Datatypes and Utility Functions

Additionally to some utility classes like G_List for arbitrary linked lists (see 10.1.1) and classes for arrays of objects like List_Of_Inst (see 10.1.2) there are datatypes in GRAPE which for various reasons are not implemented as classes. The most important types are two-, three- and four-dimensional vectors of integer (INT2, INT3, INT4), double (VEC2, VEC3, VEC4) and float (FVEC2, FVEC3, FVEC4) variables, three by three and four by four matrices (MATRIX33 and MATRIX44 for double and complex (COMPLEX) variables.

The vector types are mainly used for working with points, the matrix types for transformations. There are lots of functions which operate on these types, you should have a look at section 10.2 to see what's available. Some time critical functions are implemented as macros, but none of these will evaluate its arguments more then once.

Note that (almost) all GRAPE utility functions start with the prefix g_ followed by the type they operate on (e.g. g_vec3_ for the VEC3 functions). This convention should be used whenever new functions are written or new datatypes added, it helps to avoid naming collisions.



SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.