Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SH::ShAttrib< N, Binding, T, Swizzled > Class Template Reference

A generic attribute (or parameter) holding N values. More...

#include <ShAttrib.hpp>

Inheritance diagram for SH::ShAttrib< N, Binding, T, Swizzled >:

Inheritance graph
[legend]
Collaboration diagram for SH::ShAttrib< N, Binding, T, Swizzled >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T storage_type
typedef ShHostType< T >::type host_type
typedef ShMemType< T >::type mem_type
typedef ShAttrib< N, SH_INPUT,
T > 
InputType
typedef ShAttrib< N, SH_OUTPUT,
T > 
OutputType
typedef ShAttrib< N, SH_INOUT,
T > 
InOutType
typedef ShAttrib< N, SH_TEMP,
T > 
TempType
typedef ShAttrib< N, SH_CONST,
T > 
ConstType

Public Member Functions

template<typename T2>
 ShAttrib (const ShGeneric< N, T2 > &other)
 ShAttrib (const ShAttrib< N, Binding, T, Swizzled > &other)
template<typename T2>
 ShAttrib (const ShAttrib< N, Binding, T2, Swizzled > &other)
 ShAttrib (const ShVariableNodePtr &node, const ShSwizzle &swizzle, bool neg)
 ShAttrib (host_type data[N])
template<typename T2>
ShAttriboperator= (const ShGeneric< N, T2 > &other)
template<typename T2>
ShAttriboperator= (const ShAttrib< N, Binding, T2, Swizzled > &other)
ShAttriboperator= (const ShAttrib< N, Binding, T, Swizzled > &other)
ShAttriboperator= (const ShProgram &prg)
template<typename T2>
ShAttriboperator+= (const ShGeneric< N, T2 > &right)
template<typename T2>
ShAttriboperator-= (const ShGeneric< N, T2 > &right)
template<typename T2>
ShAttriboperator *= (const ShGeneric< N, T2 > &right)
template<typename T2>
ShAttriboperator/= (const ShGeneric< N, T2 > &right)
template<typename T2>
ShAttriboperator%= (const ShGeneric< N, T2 > &right)
ShAttriboperator *= (host_type)
ShAttriboperator/= (host_type)
ShAttriboperator%= (host_type)
ShAttriboperator+= (host_type)
ShAttriboperator-= (host_type)
template<typename T2>
ShAttriboperator+= (const ShGeneric< 1, T2 > &)
template<typename T2>
ShAttriboperator-= (const ShGeneric< 1, T2 > &)
template<typename T2>
ShAttriboperator *= (const ShGeneric< 1, T2 > &)
template<typename T2>
ShAttriboperator/= (const ShGeneric< 1, T2 > &)
template<typename T2>
ShAttriboperator%= (const ShGeneric< 1, T2 > &)
ShAttrib< 1, Binding, T, true > operator() (int) const
ShAttrib< 2, Binding, T, true > operator() (int, int) const
ShAttrib< 3, Binding, T, true > operator() (int, int, int) const
ShAttrib< 4, Binding, T, true > operator() (int, int, int, int) const
ShAttrib< 1, Binding, T, true > operator[] (int) const
template<int N2>
ShAttrib< N2, Binding, T,
true > 
swiz (int indices[]) const
ShAttrib operator- () const

Static Public Attributes

static const ShBindingType binding_type
static const ShSemanticType semantic_type

Detailed Description

template<int N, ShBindingType Binding, typename T = float, bool Swizzled = false>
class SH::ShAttrib< N, Binding, T, Swizzled >

A generic attribute (or parameter) holding N values.

The reason we have the Swizzle template argument is so that swizzled variables, which need to be copied (i.e. have an ASN statement generated) when another variable is initialized through them, may otherwise be simply placed into new variables (through copy constructor eliding, as per paragraph 12.8.15 of the C++ standard), causing variables to share ShVariableNodes when they shouldn't. By making swizzled variables separate types we enforce calling a conversion constructor instead, which cannot be elided. If this paragraph confuses you, and you're not modifying Sh internals, you may safely ignore it.

Definition at line 61 of file ShAttrib.hpp.


The documentation for this class was generated from the following files:
Generated on Mon Jan 24 18:38:04 2005 for Sh by  doxygen 1.4.1