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

Arithmetic operations
[Library Functions]

Collaboration diagram for Arithmetic operations:


Functions

template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator+ (const ShGeneric< N, T1 > &left, const ShGeneric< N, T2 > &right)
 Addition.
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator+ (const ShGeneric< 1, T1 > &left, const ShGeneric< N, T2 > &right)
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator+ (const ShGeneric< N, T1 > &left, const ShGeneric< 1, T2 > &right)
template<typename T1, typename T2>
ShGeneric< 1, CT1T2 > SH::operator+ (const ShGeneric< 1, T1 > &left, const ShGeneric< 1, T2 > &right)
 SH::SH_SHLIB_CONST_SCALAR_OP_DECL (operator+)
 SH::SH_SHLIB_CONST_N_OP_BOTH_DECL (operator+)
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator- (const ShGeneric< N, T1 > &left, const ShGeneric< N, T2 > &right)
 Subtraction.
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator- (const ShGeneric< 1, T1 > &left, const ShGeneric< N, T2 > &right)
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator- (const ShGeneric< N, T1 > &left, const ShGeneric< 1, T2 > &right)
template<typename T1, typename T2>
ShGeneric< 1, CT1T2 > SH::operator- (const ShGeneric< 1, T1 > &left, const ShGeneric< 1, T2 > &right)
 SH::SH_SHLIB_CONST_SCALAR_OP_DECL (operator-)
 SH::SH_SHLIB_CONST_N_OP_BOTH_DECL (operator-)
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator * (const ShGeneric< N, T1 > &left, const ShGeneric< N, T2 > &right)
 Multiplication.
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator * (const ShGeneric< 1, T1 > &left, const ShGeneric< N, T2 > &right)
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator * (const ShGeneric< N, T1 > &left, const ShGeneric< 1, T2 > &right)
template<typename T1, typename T2>
ShGeneric< 1, CT1T2 > SH::operator * (const ShGeneric< 1, T1 > &left, const ShGeneric< 1, T2 > &right)
 SH::SH_SHLIB_CONST_SCALAR_OP_DECL (operator *)
 SH::SH_SHLIB_CONST_N_OP_BOTH_DECL (operator *)
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator/ (const ShGeneric< N, T1 > &left, const ShGeneric< N, T2 > &right)
 Division.
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator/ (const ShGeneric< N, T1 > &left, const ShGeneric< 1, T2 > &right)
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator/ (const ShGeneric< 1, T1 > &left, const ShGeneric< N, T2 > &right)
template<typename T1, typename T2>
ShGeneric< 1, CT1T2 > SH::operator/ (const ShGeneric< 1, T1 > &left, const ShGeneric< 1, T2 > &right)
 SH::SH_SHLIB_CONST_SCALAR_OP_DECL (operator/)
 SH::SH_SHLIB_CONST_N_OP_LEFT_DECL (operator/)
template<int N, typename T>
ShGeneric< N, T > SH::exp (const ShGeneric< N, T > &var)
 Exponent base 10.
template<int N, typename T>
ShGeneric< N, T > SH::exp2 (const ShGeneric< N, T > &var)
 Exponent base 2.
template<int N, typename T>
ShGeneric< N, T > SH::expm1 (const ShGeneric< N, T > &x)
 Minus-one Exponent base 10.
template<int N, typename T>
ShGeneric< N, T > SH::log (const ShGeneric< N, T > &var)
 Logarithm base 10.
template<int N, typename T>
ShGeneric< N, T > SH::log2 (const ShGeneric< N, T > &var)
 Logarithm base 2.
template<int N, typename T>
ShGeneric< N, T > SH::logp1 (const ShGeneric< N, T > &x)
 Plus-One Logarithm base 10.
template<int N, typename T1, typename T2, typename T3>
ShGeneric< N, CT1T2 > SH::pow (const ShGeneric< N, T1 > &left, const ShGeneric< N, T2 > &right)
 Power.
template<int N, typename T1, typename T2, typename T3>
ShGeneric< N, CT1T2 > SH::pow (const ShGeneric< N, T1 > &left, const ShGeneric< 1, T2 > &right)
template<typename T1, typename T2, typename T3>
ShGeneric< 1, CT1T2 > SH::pow (const ShGeneric< 1, T1 > &left, const ShGeneric< 1, T2 > &right)
 SH::SH_SHLIB_CONST_SCALAR_OP_DECL (pow)
 SH::SH_SHLIB_CONST_N_OP_RIGHT_DECL (pow)
template<int N, typename T1, typename T2, typename T3>
ShGeneric< N, CT1T2T3 > SH::mad (const ShGeneric< N, T1 > &m1, const ShGeneric< N, T2 > &m2, const ShGeneric< N, T3 > &a)
 Multiply and add.
template<int N, typename T1, typename T2, typename T3>
ShGeneric< N, CT1T2T3 > SH::mad (const ShGeneric< N, T1 > &m1, const ShGeneric< 1, T2 > &m2, const ShGeneric< N, T3 > &a)
template<int N, typename T1, typename T2, typename T3>
ShGeneric< N, CT1T2T3 > SH::mad (const ShGeneric< 1, T1 > &m1, const ShGeneric< N, T2 > &m2, const ShGeneric< N, T3 > &a)
template<typename T1, typename T2, typename T3>
ShGeneric< 1, CT1T2T3 > SH::mad (const ShGeneric< 1, T1 > &m1, const ShGeneric< 1, T2 > &m2, const ShGeneric< 1, T3 > &a)
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::mad (double m1, const ShGeneric< N, T1 > &m2, const ShGeneric< N, T2 > &a)
template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::mad (const ShGeneric< N, T1 > &m1, double m2, const ShGeneric< N, T2 > &a)
template<int N, typename T>
ShGeneric< N, T > SH::rcp (const ShGeneric< N, T > &var)
template<int N, typename T>
ShGeneric< N, T > SH::sqrt (const ShGeneric< N, T > &var)
template<int N, typename T>
ShGeneric< N, T > SH::rsqrt (const ShGeneric< N, T > &var)
template<int N, typename T>
ShGeneric< N, T > SH::cbrt (const ShGeneric< N, T > &var)

Function Documentation

template<int N, typename T>
ShGeneric< N, T > SH::exp const ShGeneric< N, T > &  var  ) 
 

Exponent base 10.

Operates componentwise on tuples. Returns the natural exponent of x.

Definition at line 173 of file ShLibArithImpl.hpp.

Referenced by SH::exp(), ShUtil::hashlcg(), and ShUtil::hashmrg().

template<int N, typename T>
ShGeneric< N, T > SH::exp2 const ShGeneric< N, T > &  var  ) 
 

Exponent base 2.

Operates componentwise on tuples. Returns the exponent of x using base 2.

Definition at line 181 of file ShLibArithImpl.hpp.

template<int N, typename T>
ShGeneric< N, T > SH::expm1 const ShGeneric< N, T > &  x  ) 
 

Minus-one Exponent base 10.

Operates componentwise on tuples. Returns the exponent of x - 1 using base 10.

Definition at line 197 of file ShLibArithImpl.hpp.

References SH::exp().

template<int N, typename T>
ShGeneric< N, T > SH::log const ShGeneric< N, T > &  var  ) 
 

Logarithm base 10.

Operates componentwise on tuples. Returns the natural logarithm of x.

Definition at line 203 of file ShLibArithImpl.hpp.

Referenced by SH::log().

template<int N, typename T>
ShGeneric< N, T > SH::log2 const ShGeneric< N, T > &  var  ) 
 

Logarithm base 2.

Operates componentwise on tuples. Returns the logarithm of x using base 2.

Definition at line 211 of file ShLibArithImpl.hpp.

template<int N, typename T>
ShGeneric< N, T > SH::logp1 const ShGeneric< N, T > &  x  ) 
 

Plus-One Logarithm base 10.

Operates componentwise on tuples. Returns the logarithm of x + 1 using base 10.

Definition at line 227 of file ShLibArithImpl.hpp.

References SH::log().

template<int N, typename T1, typename T2, typename T3>
ShGeneric< N, CT1T2T3 > SH::mad const ShGeneric< N, T1 > &  m1,
const ShGeneric< N, T2 > &  m2,
const ShGeneric< N, T3 > &  a
 

Multiply and add.

This is an intrinsic to access the assembly instruction of the same name. Multiply-add is potentially cheaper than a separate multiply and add. Note: potentially.

Definition at line 264 of file ShLibArithImpl.hpp.

Referenced by ShUtil::_psmootht(), ShUtil::deprecated_smoothstep(), ShUtil::ShKernelSurface::gooch(), ShUtil::hashlcg(), ShUtil::ShNoise< M, T, P >::perlin(), SH::poly(), ShUtil::scellnoise(), ShUtil::sperlin(), ShUtil::sturbulence(), and ShUtil::ShKernelSurfMap::vcsBump().

template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator * const ShGeneric< N, T1 > &  left,
const ShGeneric< N, T2 > &  right
 

Multiplication.

On tuples, this operator acts componentwise. If a scalar is multiplied by a tuple, the scalar is promoted by duplication to a tuple.

Definition at line 104 of file ShLibArithImpl.hpp.

template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator+ const ShGeneric< N, T1 > &  left,
const ShGeneric< N, T2 > &  right
 

Addition.

On tuples, this operator acts componentwise.

Todo:
scalar promotion.

Definition at line 34 of file ShLibArithImpl.hpp.

template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator- const ShGeneric< N, T1 > &  left,
const ShGeneric< N, T2 > &  right
 

Subtraction.

On tuples, this operator acts componentwise.

Todo:
scalar promotion.

Definition at line 69 of file ShLibArithImpl.hpp.

template<int N, typename T1, typename T2>
ShGeneric< N, CT1T2 > SH::operator/ const ShGeneric< N, T1 > &  left,
const ShGeneric< N, T2 > &  right
 

Division.

On tuples, this operator acts componentwise. If a tuple is divided by a scalar (or vice versa), the scalar is promoted by duplication to a tuple.

Definition at line 139 of file ShLibArithImpl.hpp.

template<int N, typename T1, typename T2, typename T3>
ShGeneric< N, CT1T2 > SH::pow const ShGeneric< N, T1 > &  left,
const ShGeneric< N, T2 > &  right
 

Power.

Raise a tuple to a power.

Todo:
scalar promotion.

Definition at line 233 of file ShLibArithImpl.hpp.

Referenced by SH::cbrt(), SH::ShConcreteCTypeOp< SH_OP_LIT, T >::doop(), SH::exp10(), SH::exp2(), ShUtil::hashlcg(), ShUtil::hashmrg(), ShUtil::ShKernelSurface::phong(), SH::pow(), and ShUtil::ShKernelSurface::specular().


Generated on Wed Jun 15 18:14:31 2005 for Sh by  doxygen 1.4.3-20050530