TOpenCLVector.SumAndSqrSum Method

procedure SumAndSqrSum(out Sum, SqrSum: double); overload;

Computes the sum and the sum of squared elements from the elements in the calling object.

#NameTypeDescription
1Sumdoublescalar
2SqrSumdoublescalar

Result: stored in self (calling object)

Indexed: procedure SumAndSqrSum(out Sum, SqrSum: double; Index, Len: integer); overload;

Returns the sum and the sum of squared elements.

#NameTypeDescription
1Sumdoublescalar
2SqrSumdoublescalar
3Indexintegerstart index
4Lenintegerelement count

Result: stored in self (calling object)

Remarks:

Returns the sum and the sum of squared items from calling vector elements [Index]..[Index+Len-1].