summaryrefslogtreecommitdiffhomepage
path: root/include/stc/crand.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-04-21 14:41:47 +0200
committerTyge Løvset <[email protected]>2023-04-21 14:41:47 +0200
commitfeea8547482d8822a288977201e08eded1551e59 (patch)
tree4487d54870bf4f54fb7744024fcba0d1241ead6b /include/stc/crand.h
parent4375640bdf856866fa2a1e7010103736077b9738 (diff)
downloadSTC-modified-feea8547482d8822a288977201e08eded1551e59.tar.gz
STC-modified-feea8547482d8822a288977201e08eded1551e59.zip
Householding.
Diffstat (limited to 'include/stc/crand.h')
-rw-r--r--include/stc/crand.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/include/stc/crand.h b/include/stc/crand.h
index a1b7250d..f566c1cf 100644
--- a/include/stc/crand.h
+++ b/include/stc/crand.h
@@ -127,18 +127,6 @@ STC_DEF crand_unif_t crand_unif_init(int64_t low, int64_t high) {
return dist;
}
-#if defined(__SIZEOF_INT128__)
- #define c_umul128(a, b, lo, hi) \
- do { __uint128_t _z = (__uint128_t)(a)*(b); \
- *(lo) = (uint64_t)_z, *(hi) = (uint64_t)(_z >> 64U); } while(0)
-#elif defined(_MSC_VER) && defined(_WIN64)
- #include <intrin.h>
- #define c_umul128(a, b, lo, hi) ((void)(*(lo) = _umul128(a, b, hi)))
-#elif defined(__x86_64__)
- #define c_umul128(a, b, lo, hi) \
- asm("mulq %3" : "=a"(*(lo)), "=d"(*(hi)) : "a"(a), "rm"(b))
-#endif
-
/* Int64 uniform distributed RNG, range [low, high]. */
STC_DEF int64_t crand_unif(crand_t* rng, crand_unif_t* d) {
uint64_t lo, hi;
@@ -164,7 +152,6 @@ STC_DEF double crand_norm(crand_t* rng, crand_norm_t* dist) {
dist->next = u2*m;
return (u1*m)*dist->stddev + dist->mean;
}
-
#endif
#endif
#undef i_opt