clMatrix::PowerVec Method

TOpenCLMtxVec *PowerVec(TOpenCLMtxVec *Base, TOpenCLMtxVec *Exponent) const;

Raises Base object elements to Exponent object elements power.

#NameTypeDescription
1BaseTOpenCLMtxVec *
2ExponentTOpenCLMtxVec *
Remarks:

Raises Base elements to Exponent elements power. Only positive exponents can be handled if exponent object clMatrix::Complex property is True.

Examples
#include "clMtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    clMatrix a, b, c;

    a.CopyFromArray(2, 2, DewArray<float>{1, 2, 3, 4});
    b.CopyFromArray(2, 2, DewArray<float>{3, 3, 2, 2});
    c.PowerVec(a, b); // c = [1,8,9,16]
}
See Also: clMatrix::Power
Declared in Dew::Math::clMatrix · Dew.Math/clMtxExpr.h · Cross-compiler