Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

QVM: Quaternions, Vectors, Matrices

Code Generator

While Boost QVM defines generic functions that operate on matrix and vector types of arbitrary static dimensions, it also provides a code generator that can be used to create compatible header files that define much simpler specializations of these functions for specific dimensions. This is useful during debugging since the generated code is much easier to read than the template metaprogramming-heavy generic implementations. It is also potentially friendlier to the optimizer.

The code generator is a command-line utility program. Its source code can be found in the libs/qvm/gen directory. It was used to generate the following headers:

Any such generated headers must be included before the corresponding generic header file is included. For example, if one creates a header boost/qvm/gen/m5.hpp, it must be included before boost/qvm/mat_operations.hpp. However, the generic headers (boost/qvm/mat_operations.hpp, boost/qvm/vec_operations.hpp, boost/qvm/vec_mat_operations.hpp and boost/qvm/swizzle.hpp) already include the generated headers from the list above, so the generated headers don't need to be included manually.

Note: that headers under boost/qvm/gen are not part of the public interface of Boost QVM. For example, boost/qvm/gen/mat_operations2.hpp should not be included directly; #include <boost/qvm/mat_operations2.hpp> instead.


See also: Boost QVM