EquivSubsetDomainSingle< T1, T2, T3, Dim, true > Struct Template Reference
The non-unit-stride version of
EquivSubsetDomainSingle, which does extra work for the case where a, b, or c do not have unit stride.
More...
#include <EquivSubset.h>
List of all members.
|
Static Public Member Functions |
static void | equiv (const T1 &a, const T2 &b, T3 &d) |
Detailed Description
template<class T1, class T2, class T3, int Dim>
struct EquivSubsetDomainSingle< T1, T2, T3, Dim, true >
The non-unit-stride version of
EquivSubsetDomainSingle, which does extra work for the case where a, b, or c do not have unit stride.
The fourth argument, the returned equivalent subset domain, is assumed to have been set equal to the third domain beforehand. It will be offset and scaled in the same way that the second is from the first.
To calculate the non-unit-stride equiv. subset, we do this:
- Look for the relationship from a --> b, in the form: b = m a + k Calculate the change in stride, m, by m = stride(b) / stride(a) which must be an integer. Calculate the offset, k, by k = b - m a using the first point in the domains a and b.
- Apply the linear transformation to the third domain to get the fourth: d = m c + k
Member Function Documentation
template<class T1 , class T2 , class T3 , int Dim>
static void EquivSubsetDomainSingle< T1, T2, T3, Dim, true >::equiv |
( |
const T1 & |
a, |
|
|
const T2 & |
b, |
|
|
T3 & |
d | |
|
) |
| | [inline, static] |
The documentation for this struct was generated from the following file: