FreePOOMA  2.4.1
Classes | Functions
EquivSubset.h File Reference

domain4 equivSubset(domain1,domain2,domain3) is a global function which finds the 'equivalent subset' for domain3 given a linear relationship between domain1 and domain2. More...

#include "Domain/DomainTraits.h"
#include "Domain/NewDomain.h"
#include "Utilities/PAssert.h"
Include dependency graph for EquivSubset.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  EquivSubsetDomainSingle< T1, T2, T3, Dim, strided >
 The default (unit-stride) version of EquivSubsetDomainSingle, which assumes that all arguments to 'equiv' are domains with unit stride. More...
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. More...
struct  EquivSubsetDomain< T1, T2, T3, Dim >
 EquivSubsetDomain implements a basic template meta-program to find the equiv subset of each dimension separately of the multidimensional domains. More...
struct  EquivSubsetDomain< T1, T2, T3, 1 >
struct  EquivSubsetReturnType< T1, T2, T3 >
 A simple struct used to figure out the return type when examining types T1,T2,T3. More...

Functions

template<class T1 , class T2 , class T3 >
EquivSubsetReturnType< T1, T2,
T3 >::Type_t 
equivSubset (const T1 &a, const T2 &b, const T3 &c)
 domain4 equivSubset(domain1,domain2,domain3) is a global function which finds the 'equivalent subset' for domain3 given a linear relationship between domain1 and domain2.

Detailed Description

domain4 equivSubset(domain1,domain2,domain3) is a global function which finds the 'equivalent subset' for domain3 given a linear relationship between domain1 and domain2.

For example, given the relationship I --> 2I - 1 and a domain 3J, then the equivalent subset is 3J --> 2(3J) - 1 = 6J - 1 The returned domain type is the most general type which could hold the data in the domains 1, 2 and 3.

EquivSubsetDomainSingle<T1,T2,T3,T4,int Dim,bool strided>::equiv(a,b,c,d) finds the equivalent subset for c given the relationship between a and b, for just the Dim'th dimension. a, b, and c are assumed to be 1D domains. The final boolean template parameter is used to specialize the calculation to the following two cases:


Function Documentation

template<class T1 , class T2 , class T3 >
EquivSubsetReturnType<T1,T2,T3>::Type_t equivSubset ( const T1 &  a,
const T2 &  b,
const T3 &  c 
) [inline]

domain4 equivSubset(domain1,domain2,domain3) is a global function which finds the 'equivalent subset' for domain3 given a linear relationship between domain1 and domain2.

For example, given the relationship I --> 2I - 1 and a domain 3J, then the equivalent subset is 3J --> 2(3J) - 1 = 6J - 1 The returned domain type is the most general type which could hold the data in the domains 1, 2 and 3. The NewDomain3 struct is used to find the type of domain which would result if the three types were combined, but with the proper number of dimensions.

The implementation of equivSubset is deferred to the EquivSubsetDomain struct, which performs the intersection for each dimension and and's the results together.

References CTAssert.