clVector::DownSample Method

TOpenCLVector *DownSample(TOpenCLMtxVec *Src, int Factor, int Phase = 0) const;

Downsamples vector values.

#NameTypeDescription
1SrcTOpenCLMtxVec *
2Factorint
3Phase = 0int
Remarks:

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

Examples
#include "clMtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    clVector a, b;

    b.CopyFromArray(DewArray<float>{0, 0, 0, 0, 1, 2, 3, 4, 5, 6});
    a.DownSample(b, 2); // a = [0,0,1,3,5]
}
See Also: clVector::UpSample, TOpenCLVector::UpSample
Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler