Thread overview | |||||
---|---|---|---|---|---|
|
August 16, 2012 gfm, kitchen-sink multimedia library | ||||
---|---|---|---|---|
| ||||
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 Re: gfm, kitchen-sink multimedia library | ||||
---|---|---|---|---|
| ||||
Posted in reply to ponce | 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 Re: gfm, kitchen-sink multimedia library | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | 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.
|
Copyright © 1999-2021 by the D Language Foundation