Thread overview
gfm, kitchen-sink multimedia library
Aug 16, 2012
ponce
Aug 16, 2012
bearophile
Aug 16, 2012
ponce
August 16, 2012
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.

August 16, 2012
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
August 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.