digitalmars.D.announce - gfm, kitchen-sink multimedia library
- ponce (4/4) Aug 16 2012 http://github.com/p0nce/gfm
- bearophile (17/18) Aug 16 2012 Some of those things are at home in Phobos.
- ponce (5/7) Aug 16 2012 Why not.
http://github.com/p0nce/gfm gfm is a library that might be useful for multimedia programming. See http://github.com/p0nce/gfm/blob/master/README for an exhaustive list of what is provided.
Aug 16 2012
ponce:http://github.com/p0nce/gfmSome of those things are at home in Phobos. Maybe there are ways to improve this ucent mul (avoiding magic constants, using foreach, using size_t, maybe with asm too and __ctfe): else static if (op == "*") { uint[4] a = toParts(); uint[4] b = y.toParts(); this = 0; for(size_t i = 0; i < 4; ++i) for(size_t j = 0; j < 4 - i; ++j) this += self(cast(ulong)(a[i]) * b[j]) << (32 * (i + j)); } Bye, bearophile
Aug 16 2012
Le 16/08/2012 20:05, bearophile a écrit :Maybe there are ways to improve this ucent mul (avoiding magic constants, using foreach, using size_t, maybe with asm too and __ctfe):Why not. I'm not aware of this __ctfe yet. The obvious next step with int128 would be to support fixed-size ints with 2^n bits.
Aug 16 2012