TOpenCLVector.ExtendToComplex Method

Overload List

#SignatureDescription
1TOpenCLMtxVec ExtendToComplex(TOpenCLMtxVec Src, Boolean Zeros)Extend Vec object to complex calling object.
└ indexed: TOpenCLMtxVec ExtendToComplex(TOpenCLMtxVec Src, Boolean Zeros, Int32 SrcIndex, Int32 DstIndex, Int32 Len)
2TOpenCLMtxVec ExtendToComplex(Boolean Zeros)Extends a real object to a complex object.

Overload 1: TOpenCLMtxVec ExtendToComplex(TOpenCLMtxVec Src, Boolean Zeros)

Extend Vec object to complex calling object.

#NameTypeDescription
1SrcTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2ZerosBoolean

Result: stored in self (calling object), returns self for chaining

Remarks:

If Zeros is true then the calling vector imaginary part is set to zero, otherwise the calling object imaginary part is the same as calling object real part.

Indexed: TOpenCLMtxVec ExtendToComplex(TOpenCLMtxVec Src, Boolean Zeros, Int32 SrcIndex, Int32 DstIndex, Int32 Len)

Converts the source to complex.

#NameTypeDescription
1SrcTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2ZerosBoolean
3SrcIndexInt32source start index
4DstIndexInt32destination start index
5LenInt32element count

Result: stored in self (calling object), returns self for chaining

Remarks:

Converts the source to complex by setting the imaginary part to either zero (zeros = True) or same as real (zeros = false). Does not set size of the calling vector. If there is not sufficient space available to store the result an exception will be raised.

Overload 2: TOpenCLMtxVec ExtendToComplex(Boolean Zeros)

Extends a real object to a complex object.

#NameTypeDescription
1ZerosBoolean

Result: stored in self (calling object), returns self for chaining

Remarks:

Extend the calling object to complex vector. After the calling of ExtendToComplex the imaginary part becomes the same as real part if Zeros is false. If Zeros is true the imaginary part is set to zero. The use of the in-place version of the method is discouraged because it requires 3*N copy operations, while the not-in-place version requires only 2*N copy operations.

Examples
clVector a;
clVector b;
a.CopyFromArray(TSingleArray.Create(1,2,3,4));
b.ExtendToComplex(a,true);