From feea8547482d8822a288977201e08eded1551e59 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Fri, 21 Apr 2023 14:41:47 +0200 Subject: Householding. --- include/stc/crand.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'include/stc/crand.h') 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 - #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 -- cgit v1.2.3