When a type of the form DevicePolicies<...> is passed as a
template parameter to a Hybrid_, the count-value
can be used to find out how many policies were specified (mostly to
check for consistency). More importantly, its Get-member is
used to get the device that should be used for a certain routine. In
our case, for example Get<SumVec3Device>::Device will be a
typedef for either CPU or GPU, depending on
what you specified. Note that Get expects a template
template argument. This prevented me from using template
specialization techniques to find out which device was passed as a
template argument to a certain policy. Instead, I had to equip each of
the policies with a unique ID that is used to match the
template-template parameter and extract its device-type.
Joren Heit 2013-12-17