TOpenCLValue.IntPower Method

TOpenCLValue IntPower(TOpenCLValue Base, Int32 Exponent)

Power (integer exponent).

#NameTypeDescription
1BaseTOpenCLValuesource TOpenCLValue
2ExponentInt32

Returns: TOpenCLValue

Remarks:

Calculate the power Base^(Exponent). For non-integer exponents, the Dew.Math.TOpenCLValue.Power method can be used.

Examples
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    void Example()
    {
        TOpenCLValue a,b;
        clMtxVec.CreateIt(out a, out b);
        try
        {
            b.Copy(8);
            a.IntPower(b,2);
        }
        finally
        {
            clMtxVec.FreeIt(ref a, ref b);
        }
    }
}
See Also: TOpenCLValue.Power