You are here: Symbol Reference > clMtxVec Namespace > Classes > TOpenCLVector Class > public > TOpenCLVector.DownSample Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TOpenCLVector.DownSample Method

Downsamples vector values.

Pascal
function DownSample(const Src: TOpenCLMtxVec; Factor: integer; Phase: integer = 0): TOpenCLVector; overload;

The methods copies only every Factor sample from the Src vector to the calling vector. The TOpenCLBase.LengthLengthand TOpenCLBase.ComplexComplexproperties of the calling vector are set implicitly. The phase parameter determines the initial sample offset. Phase must be less than Factor.

var a,b: TOpenCLVector; begin clMtxVec.CreateIt(a,b); try b.CopyFromArray(TSingleArray.Create(0,0,0,0,1,2,3,4,5,6)); a.DownSample(b,2); // a = [0,0,1,3,5] finally clMtxVec.FreeIt(a,b); end; end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!