Gcd_BN
Gcd_BN
Computes greatest common divisor.
Syntax
IppStatus ippsGcd_BN(IppsBigNumState*
pA
, IppsBigNumState*
pB
, IppsBigNumState*
pGCD
);
Include Files
ippcp.h
Parameters
- pA
- Pointer to the first integer big number ofIppsBigNumState.
- pB
- Pointer to the second integer big number ofIppsBigNumState.
- pCGD
- Pointer to the greatest common divisor topAandpB.
Description
The function computes the greatest common divisor (GCD) for two positive integer big numbers.
The following pseudocode represents this function:
pCGD
←
gcd
(pA
, pB
). Return Values
- ippStsNoErr
- Indicates no error. Any other value indicates an error or warning.
- ippStsNullPtrErr
- Indicates an error condition if any of the specified pointers isNULL.
- ippStsOutOfRangeErr
- Indicates an error condition ifIppsBigNumState*pCGDis smaller than the length ofIppsBigNumState*pAorIppsBigNumState*pB.
- ippStsContextMatchErr
- Indicates an error condition if any of the context parameters does not match the operation.
The size of
IppsBigNumState *
pCGD
should not be less than either the length of IppsBigNumState *
pA
and IppsBigNumState *
pB
.