www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - gfm, kitchen-sink multimedia library

reply ponce <spam spam.org> writes:
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
parent reply "bearophile" <bearophileHUGS lycos.com> writes:
ponce:

 http://github.com/p0nce/gfm
Some 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
parent ponce <spam spam.org> writes:
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