clVector::UpSample Method

Overload List

#SignatureDescription
1TOpenCLVector *UpSample(TOpenCLMtxVec *Src, int Factor, int Phase = 0) const;Inserts zeroes between consecutive vector values.
2TOpenCLMtxVec *UpSample(TOpenCLMtxVec *Src, int Factor, int SrcIndex, int Index, int Len, int Phase) const;

Overload 1: TOpenCLVector *UpSample(TOpenCLMtxVec *Src, int Factor, int Phase = 0) const;

Inserts zeroes between consecutive vector values.

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

Inserts zeroes between consecutive vector values. The method copies the values from Src to the calling vector and places Factor-1 zeros between consecutive values. The TOpenCLBase::Length and TOpenCLBase::Complex properties of the calling vector are set implicitly. Phase parameter defines the initial sample offset and 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, 1, 3, 2});
    a.UpSample(b, 2); // a = [0,0,0,0,1,0,3,0,2,0]
}
See Also: clVector::DownSample, TOpenCLMtxVec::DownSample, TOpenCLMtxVec::UpSample
Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler

Overload 2: TOpenCLMtxVec *UpSample(TOpenCLMtxVec *Src, int Factor, int SrcIndex, int Index, int Len, int Phase) const;

#NameTypeDescription
1SrcTOpenCLMtxVec *
2Factorint
3SrcIndexint
4Indexint
5Lenint
6Phaseint
Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler