clVector.Ramp Method

Overload List

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

Overload 1: function Ramp: TOpenCLVector; overload;

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
var a: clVector;
begin
    a.Size(5,True);
    a.Ramp(0,PI);
    a.Sin;
end;

which is identical to:

a.Size(5,True);
for i:= 0 to a.Length-1 do a[i] := sin(i*PI);
See Also: clVector.SetVal, clVector.SetVal, clVector.SetVal, clVector.SetVal

Overload 2: function Ramp(Offset, Step: TCplx): TOpenCLVector; overload;

Fills the calling vector with a series.

#NameTypeDescription
1OffsetTCplxscalar
2StepTCplxscalar

Returns: TOpenCLVector

Remarks:

Method follow the rule:

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

Indexed: function Ramp(Offset, Step: TCplx; Index,Len: integer): TOpenCLVector; overload;

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

#NameTypeDescription
1OffsetTCplxscalar
2StepTCplxscalar
3Indexintegerstart index
4Lenintegerelement 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: function Ramp(Offset: TCplx; Step: double): TOpenCLVector; overload;

The Offset is complex, but the step is real.

#NameTypeDescription
1OffsetTCplxscalar
2Stepdoublescalar

Returns: TOpenCLVector

Indexed: function Ramp(Offset: TCplx; Step: double; Index,Len: integer): TOpenCLVector; overload;

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

#NameTypeDescription
1OffsetTCplxscalar
2Stepdoublescalar
3Indexintegerstart index
4Lenintegerelement count

Returns: TOpenCLVector

Remarks:

Following the rule:

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

The Offset is complex, but the step is real.

Overload 4: function Ramp(Offset, Step: double): TOpenCLVector; overload;

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: function Ramp(Offset,Step: double; Index,Len: integer): TOpenCLVector; overload;

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

#NameTypeDescription
1Offsetdoublescalar
2Stepdoublescalar
3Indexintegerstart index
4Lenintegerelement 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.