TOpenCLVector.Ramp Method

Overload List

#SignatureDescription
1TOpenCLVector RampFills the calling vector with a series following linear rule.
2TOpenCLVector Ramp(TCplx Offset, TCplx Step)Fills the calling vector with a series.
└ indexed: TOpenCLVector Ramp(TCplx Offset, TCplx Step, Int32 Index, Int32 Len)
3TOpenCLVector Ramp(TCplx Offset, Double Step)The Offset is complex, but the step is real.
└ indexed: TOpenCLVector Ramp(TCplx Offset, Double Step, Int32 Index, Int32 Len)
4TOpenCLVector Ramp(Double Offset, Double Step)Fills the calling vector.
└ indexed: TOpenCLVector Ramp(Double Offset, Double Step, Int32 Index, Int32 Len)

Overload 1: TOpenCLVector Ramp

Fills the calling vector with a series following linear rule.

Returns: TOpenCLVector

Remarks:

Fills the calling vector with a series following the rule:

Values[k] :=  k

(Offset is zero and Step is one). If the calling vector is complex, only the real part is set.

Examples
TOpenCLVector a;
clMtxVec.CreateIt(a);
try
    {
        a.Size(5,true);
        a.Ramp(0,PI);
        a.Sin;
    }
finally
    {
        clMtxVec.FreeIt(a);
    }
clMtxVec.CreateIt(a);
try
    {
        a.Size(5,true);
        for i = 0 to a.Length-1 do a[i] = sin(i * PI);
    }
finally
    {
        clMtxVec.FreeIt(a);
    }
See Also: Int32)

Overload 2: TOpenCLVector Ramp(TCplx Offset, TCplx Step)

Fills the calling vector with a series.

#NameTypeDescription
1OffsetTCplxscalar
2StepTCplxscalar

Returns: TOpenCLVector

Remarks:

Method follow the rule:

CValues[k] := Offset + k*Step.

Indexed: TOpenCLVector Ramp(TCplx Offset, TCplx Step, Int32 Index, Int32 Len)

Fills the calling vector elements [Index]..[Index+Len-1].

#NameTypeDescription
1OffsetTCplxscalar
2StepTCplxscalar
3IndexInt32start index
4LenInt32element count

Returns: TOpenCLVector

Remarks:

Following the rule:

Values[k] := Offset + k*Step.

If the calling vector is complex, only the real part is set. An exception is raised if array borders of the calling vector are overrun.

Overload 3: TOpenCLVector Ramp(TCplx Offset, Double Step)

The Offset is complex, but the step is real.

#NameTypeDescription
1OffsetTCplxscalar
2StepDoublescalar

Returns: TOpenCLVector

Indexed: TOpenCLVector Ramp(TCplx Offset, Double Step, Int32 Index, Int32 Len)

Fills the calling vector elements [Index]..[Index+Len-1].

#NameTypeDescription
1OffsetTCplxscalar
2StepDoublescalar
3IndexInt32start index
4LenInt32element count

Returns: TOpenCLVector

Remarks:

Following the rule:

Values[k] := Offset + k*Step.

The Offset is complex, but the step is real.

Overload 4: TOpenCLVector Ramp(Double Offset, Double Step)

Fills the calling vector.

#NameTypeDescription
1OffsetDoublescalar
2StepDoublescalar

Returns: TOpenCLVector

Remarks:

Method uses the following rule:

Values[k] := Offset + k*Step.

If the calling vector is complex, only the real part is set.

Indexed: TOpenCLVector Ramp(Double Offset, Double Step, Int32 Index, Int32 Len)

Fills the calling vector elements [Index]..[Index+Len-1].

#NameTypeDescription
1OffsetDoublescalar
2StepDoublescalar
3IndexInt32start index
4LenInt32element count

Returns: TOpenCLVector

Remarks:

Method uses the following rule:

Values[k] := Offset + k*Step.

If the calling vector is complex, only the real part is set. An exception is raised if calling vector array borders are overrun.