TOpenCLVector.Max Method

Overload List

#SignatureDescription
1function Max: Double;Maximum value.
└ indexed: function Max(Index: Integer; Len: Integer): Double;
2procedure Max(out AMax: Double; out aIndex: Integer);Calculate the maximum value of all calling object elements.
└ indexed: procedure Max(out AMax: Double; out aIndex: Integer; Index: Integer; Len: Integer);
3function Max(out AMax: TCplx; Index: Integer; Len: Integer): Integer;Same as TOpenCLMtxVec.Maxc method.
4procedure Max(out AMax: Double; Index: Integer; Len: Integer);Calculate the maximum value from calling object elements [Index]..[Index+Len-1].

Overload 1: function Max: Double;

Maximum value.

Returns: Double - the maximum value of all calling object elements. The result is a real value.

Remarks:

An exception is raised is calling object TOpenCLBase.Complex is true.

Examples
var a: clVector;
b: double;
begin
    a.CopyFromArray(TDoubleArray.Create(1,2,3,4));
    b := a.Max; // b = 4
end;

Indexed: function Max(Index: Integer; Len: Integer): Double;

Returns the maximum value from calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1IndexIntegerstart index
2LenIntegerelement count

Returns: Double

Remarks:

The result is a real value. An exception is raised if calling object TOpenCLBase.Complex property is true or array borders are overrun.

Overload 2: procedure Max(out AMax: Double; out aIndex: Integer);

Calculate the maximum value of all calling object elements.

#NameTypeDescription
1AMaxDouble
2aIndexInteger

Result: stored in self (calling object)

Remarks:

The AMax parameter returns the maximum value. The aIndex parameter returns the index of maximum value. An exception is raised if calling object TOpenCLBase.Complex property is true.

Indexed: procedure Max(out AMax: Double; out aIndex: Integer; Index: Integer; Len: Integer);

Calculate the maximum value of calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1AMaxDouble
2aIndexInteger
3IndexIntegerstart index
4LenIntegerelement count

Result: stored in self (calling object)

Remarks:

The AMax parameter returns the maximum value. The aIndex parameter returns the index of maximum value. An exception is raised if calling object TOpenCLBase.Complex property is true or array borders are overrud/underrun.

Overload 3: function Max(out AMax: TCplx; Index: Integer; Len: Integer): Integer;

Same as TOpenCLMtxVec.Maxc method.

#NameTypeDescription
1AMaxTCplx
2IndexIntegerstart index
3LenIntegerelement count

Returns: Int32

Overload 4: procedure Max(out AMax: Double; Index: Integer; Len: Integer);

Calculate the maximum value from calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1AMaxDouble
2IndexIntegerstart index
3LenIntegerelement count

Result: stored in self (calling object)

Remarks:

The result AMean is a real value. An exception is raised if calling object TOpenCLBase.Complex property is true or array borders are overrun.