![]() |
Base template for the MultTrait class. More...
#include <MultTrait.h>
Base template for the MultTrait class.
The MultTrait class template offers the possibility to select the resulting data type of a generic multiplication operation between the two given types T1 and T2. MultTrait defines the nested type Type, which represents the resulting data type of the multiplication. In case the two types T1 and T2 cannot be multiplied, the resulting data type Type is set to INVALID_TYPE. Note that const and volatile qualifiers and reference modifiers are generally ignored.
Per default, the MultTrait template provides specializations for the following built-in data types:
Additionally, the Blaze library provides appropriate specializations for the following user-defined arithmetic types:
It is possible to specialize the MultTrait template for additional user-defined data types. The following example shows the according specialization for the multiplication between two dynamic column vectors:
The following example demonstrates the use of the MultTrait template, where depending on the two given data types the resulting data type is selected: