MCPcopy Create free account
hub / github.com/numpy/numpy / BigInt_Set_uint64

Function BigInt_Set_uint64

numpy/core/src/multiarray/dragon4.c:203–218  ·  view source on GitHub ↗

Basic type accessors */

Source from the content-addressed store, hash-verified

201
202/* Basic type accessors */
203static void
204BigInt_Set_uint64(BigInt *i, npy_uint64 val)
205{
206 if (val > bitmask_u64(32)) {
207 i->blocks[0] = val & bitmask_u64(32);
208 i->blocks[1] = (val >> 32) & bitmask_u64(32);
209 i->length = 2;
210 }
211 else if (val != 0) {
212 i->blocks[0] = val & bitmask_u64(32);
213 i->length = 1;
214 }
215 else {
216 i->length = 0;
217 }
218}
219
220#if (defined(HAVE_LDOUBLE_IBM_DOUBLE_DOUBLE_LE) || \
221 defined(HAVE_LDOUBLE_IBM_DOUBLE_DOUBLE_BE) || \

Calls 1

bitmask_u64Function · 0.85

Tested by

no test coverage detected