TOpenCLVector.UpSample Method

Overload List

#SignatureDescription
1function UpSample(const Src: TOpenCLMtxVec; Factor: Integer; Phase: Integer): TOpenCLVector;Inserts zeroes between consecutive vector values.
2function UpSample(const Src: TOpenCLMtxVec; Factor: Integer; SrcIndex: Integer; Index: Integer; Len: Integer; Phase: Integer): TOpenCLMtxVec;Inserts zeroes between consecutive array values.

Overload 1: function UpSample(const Src: TOpenCLMtxVec; Factor: Integer; Phase: Integer): TOpenCLVector;

Inserts zeroes between consecutive vector values.

#NameTypeDescription
1SrcTOpenCLMtxVec
2FactorInteger
3PhaseInteger

Returns: TOpenCLVector

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
var a,b: TOpenCLVector;
begin
    clMtxVec.CreateIt(a,b);
    try
        b.CopyFromArray(TSingleArray.Create(0,0,1,3,2));
        a.UpSample(b,2); // a = [0,0,0,0,1,0,3,0,2,0]
    finally
        clMtxVec.FreeIt(a,b);
    end;
end;
See Also: TOpenCLVector.DownSample, TOpenCLMtxVec.DownSample, TOpenCLMtxVec.UpSample

Overload 2: function UpSample(const Src: TOpenCLMtxVec; Factor: Integer; SrcIndex: Integer; Index: Integer; Len: Integer; Phase: Integer): TOpenCLMtxVec;

Inserts zeroes between consecutive array values.

#NameTypeDescription
1SrcTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2FactorInteger
3SrcIndexIntegersource start index
4IndexIntegerstart index
5LenIntegerelement count
6PhaseInteger

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

Remarks:

Copy Len values from Src starting at SrcIndex to the calling object starting at position Index and place Factor-1 zeros between consecutive values. Size and TOpenCLBase.Complex properties of the calling object must be set explicitly. Phase parameter defines the initial sample offset and must be less then Factor. An exception is raised, if array borders are overrun/underrun.