<< gpuLoadFunction sciGPGPU gpuMin >>

sciGPGPU >> sciGPGPU > gpuMax

gpuMax

Find the Maximum value of matrix.

Call sequence

[CPU dA] = gpuMax(A,[option1 option2])

Parameters

A

Can be :

Pointer on the matrix stored in GPU memory.

Pointer on the matrix stored in CPU memory.

[option1 option2]

option1 :

0 : the computation result is store only in CPU memory.

option2 :

0 : If input data are stored in CPU memory, the data load in GPU memory will be erased.

1 : The first argument will be preserved.

[CPU dA]

CPU is the result of computation in CPU memory.

dA is data of A locate in GPU memory.

Description

[CPU dA]=gpuMax(A,[option1 option2])

gpuMax find the Maximum value between all elements of matrix. Call this function with option [0 0] is equal to call it without option. The number of output parameters depends of options. To find the Maximum value of complex matrix, the function performs operation abs(real)+abs(imaginary). This function use cuBLAS to perform operations with complex matrix.

Exemples

A=rand(200,300);

[CPU dA]=gpuMax(A,[0 1])
gpuMax(dA)

dA=gpuFree(dA);

clear CPU;
clear A;
clear dA;

See Also

<< gpuLoadFunction sciGPGPU gpuMin >>