<< gpuMatrix sciGPGPU gpuMin >>

sciGPGPU >> sciGPGPU > gpuMax

gpuMax

Find the Maximum value of a matrix or between two matrix.

Call sequence

resMax = gpuMax(A[,B])

Parameters

A

Can be :

Pointer on the matrix stored in device memory (GPU).

Pointer on the matrix stored in host memory (CPU).

B

Can be :

Pointer on the matrix stored in device memory (GPU).

Pointer on the matrix stored in host memory (CPU).

A and B must have the same size.

resMax

resMax is the result of computation.

In case of one input argument, resMax is a scalar stored in host memory (CPU).

In case of two input argument, resMax is a matrix stored in device memory (GPU).

Description

resMax = gpuMax(A)
resMax = gpuMax(A,B)

gpuMax find the Maximum value of matrix A or perform the elementwise max between A and B. To find the Maximum value of complex matrix, the function performs operation abs(real)+abs(imaginary). This function use cuBLAS to perform operations only with a complex matrix and one input argument.

Exemples

// one input argument
A = rand(20,30);
dA = gpuSetData(A);

resMax = gpuMax(A)
resMax1 = gpuMax(dA)
resMax2 = max(A)

clear dA;

// two input argument
A = rand(4,7);
B = rand(4,7);
dResMax = gpuMax(A,B);
gpuResMax = gpuGetData(dResMax)
cpuResMax = max(A,B)

clear dResMax;

See Also


Report an issue
<< gpuMatrix sciGPGPU gpuMin >>