You are here: Symbol Reference > clMtxExpr Namespace > Classes > clVector Record > public > ExtendToComplex Method > clVector.ExtendToComplex Method (boolean)
MtxVec VCL
ContentsIndex
PreviousUpNext
clVector.ExtendToComplex Method (boolean)

Extends a real object to a complex object.

Pascal
function ExtendToComplex(Zeros: boolean = True): TOpenCLMtxVec; overload;

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.

var a,b: clVector; begin a.CopyFromArray(TSingleArray.Create(1,2,3,4)); b.ExtendToComplex(a,True); end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!