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:

  1. 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.
  2. 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]

References PAssert.


The documentation for this struct was generated from the following file:

Generated on Wed Mar 16 06:20:10 2011 for FreePOOMA by  doxygen 1.5.9