CombineDomainOpt.h File Reference

CombineDomainOpt is a class that can be used to optimize the operation NewDomainN<>::combineSlice(domain, s1, s2, . More...

This graph shows which files directly or indirectly include this file:


Classes

struct  CombineDomainOpt< NewDomain, true >
 Single valued specialization. More...
struct  CombineDomainOpt< NewDomain, false >
 Multi-valued version. More...

Detailed Description

CombineDomainOpt is a class that can be used to optimize the operation NewDomainN<>::combineSlice(domain, s1, s2, .

..).

CombineDomainOpt is a class that can be used to optimize the operation NewDomainN<>::combineSlice(domain, s1, s2, ...).

Typically NewDomain is used by arrays to construct a view domain that could be a slice, so typically you would call

NewDomainN<>::combineSlice(a.totalDomain(), s1, s2);

If the result is single-valued, the domain of a is not used, but the function call a.totalDomain() may be hard to optimize away. To avoid this function call you can now say:

typedef NewDomainN<...> NewDomain_t; typedef typename NewDomain_t::SliceType_t SliceDomain_t;

SliceDomain_t s( CombineDomainOpt<NewDomain_t, SliceDomain_t::singleValued>:: make(a, s1, s2, ...) );

If s is single-valued, the array a is never used.


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