<< gpuMax sciGPGPU gpuMult >>

sciGPGPU >> sciGPGPU > gpuMin

gpuMin

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

Call sequence

resMin = gpuMin(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.

resMin

resMin is the result of computation.

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

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

Description

resMin = gpuMin(A)
resMin = gpuMin(A,B)

gpuMin find the Minimum value of matrix Aor perform the elementwise min between A and B. To find the minimum 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);

resMin = gpuMin(A)
resMin1 = gpuMin(dA)
resMin2 = min(A)

gpuFree(dA);

// two input argument
A = rand(4,7);
B = rand(4,7);
dResMin = gpuMin(A,B);
gpuResMin = gpuGetData(dResMin)
cpuResMin = min(A,B)

gpuFree(dResMin);

See Also


Report an issue
<< gpuMax sciGPGPU gpuMult >>