• Home
  • Raw
  • Download

Lines Matching refs:pBN

72 #define BN_ID(pBN)         ((pBN)->idCtx)  argument
73 #define BN_SIGN(pBN) ((pBN)->sgn) argument
74 #define BN_POSITIVE(pBN) (BN_SIGN(pBN)==ippBigNumPOS) argument
75 #define BN_NEGATIVE(pBN) (BN_SIGN(pBN)==ippBigNumNEG) argument
76 #define BN_NUMBER(pBN) ((pBN)->number) argument
77 #define BN_BUFFER(pBN) ((pBN)->buffer) argument
78 #define BN_ROOM(pBN) ((pBN)->room) argument
79 #define BN_SIZE(pBN) ((pBN)->size) argument
80 #define BN_SIZE32(pBN) ((pBN)->size*(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u))) argument
83 #define BN_VALID_ID(pBN) (BN_ID((pBN))==idCtxBigNum) argument
92 void cpPackBigNumCtx(const IppsBigNumState* pBN, Ipp8u* pBuffer);
94 void cpUnpackBigNumCtx(const Ipp8u* pBuffer, IppsBigNumState* pBN);
105 __INLINE IppsBigNumState* cpBN_zero(IppsBigNumState* pBN) in cpBN_zero() argument
107 BN_SIGN(pBN) = ippBigNumPOS; in cpBN_zero()
108 BN_SIZE(pBN) = 1; in cpBN_zero()
109 ZEXPAND_BNU(BN_NUMBER(pBN),0, (int)BN_ROOM(pBN)); in cpBN_zero()
110 return pBN; in cpBN_zero()
113 __INLINE IppsBigNumState* cpBN_fix(IppsBigNumState* pBN) in cpBN_fix() argument
115 cpSize len = BN_SIZE(pBN); in cpBN_fix()
116 FIX_BNU(BN_NUMBER(pBN), len); in cpBN_fix()
117 BN_SIZE(pBN) = len; in cpBN_fix()
118 return pBN; in cpBN_fix()
121 __INLINE IppsBigNumState* cpBN_chunk(IppsBigNumState* pBN, BNU_CHUNK_T a) in cpBN_chunk() argument
123 BN_SIGN(pBN) = ippBigNumPOS; in cpBN_chunk()
124 BN_SIZE(pBN) = 1; in cpBN_chunk()
125 ZEXPAND_BNU(BN_NUMBER(pBN),0, (int)BN_ROOM(pBN)); in cpBN_chunk()
126 BN_NUMBER(pBN)[0] = a; in cpBN_chunk() local
127 return pBN; in cpBN_chunk()
130 __INLINE IppsBigNumState* cpBN_power2(IppsBigNumState* pBN, int power) in cpBN_power2() argument
133 if(BN_ROOM(pBN) >= size) { in cpBN_power2()
134 BN_SIGN(pBN) = ippBigNumPOS; in cpBN_power2()
135 BN_SIZE(pBN) = size; in cpBN_power2()
136 ZEXPAND_BNU(BN_NUMBER(pBN),0, BN_ROOM(pBN)); in cpBN_power2()
137 SET_BIT(BN_NUMBER(pBN), power); in cpBN_power2()
138 return pBN; in cpBN_power2()
183 __INLINE IppsBigNumState* BN_Word(IppsBigNumState* pBN, BNU_CHUNK_T w) in BN_Word() argument
185 BN_SIGN(pBN) = ippBigNumPOS; in BN_Word()
186 BN_SIZE(pBN) = 1; in BN_Word()
187 ZEXPAND_BNU(BN_NUMBER(pBN),0, BN_ROOM(pBN)); in BN_Word()
188 BN_NUMBER(pBN)[0] = w; in BN_Word() local
189 return pBN; in BN_Word()
191 __INLINE IppsBigNumState* BN_Set(const BNU_CHUNK_T* pData, cpSize len, IppsBigNumState* pBN) in BN_Set() argument
193 BN_SIGN(pBN) = ippBigNumPOS; in BN_Set()
194 BN_SIZE(pBN) = len; in BN_Set()
195 ZEXPAND_COPY_BNU(BN_NUMBER(pBN), BN_ROOM(pBN), pData, len); in BN_Set()
196 return pBN; in BN_Set()
198 …ppsBigNumState* BN_Make(BNU_CHUNK_T* pData, BNU_CHUNK_T* pBuffer, cpSize len, IppsBigNumState* pBN) in BN_Make() argument
200 BN_ID(pBN) = idCtxBigNum; in BN_Make()
201 BN_SIGN(pBN) = ippBigNumPOS; in BN_Make()
202 BN_SIZE(pBN) = 1; in BN_Make()
203 BN_ROOM(pBN) = len; in BN_Make()
204 BN_NUMBER(pBN) = pData; in BN_Make()
205 BN_BUFFER(pBN) = pBuffer; in BN_Make()
206 return pBN; in BN_Make()