Worst Phobos documentation evar!

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Jan 1 01:47:48 PST 2015


On 12/31/2014 8:46 PM, Manu via Digitalmars-d wrote:
> Okay, well it's not really useful without a forceinline attribute.
> std.simd functions need to be pseudo-intrinsics, ie, the cost of a
> function call will definitely negate the work they perform.
> Yes, they will (probably) be inlined in release, but debug performance
> is also important, and I can't have maths code that runs much slower
> in debug builds because it makes a function call passing structs by
> value for every single maths opcode in the hottest loops.
>
> There were also troubles with GDC; I haven't been able to make it emit
> the opcode that I want. It reinterprets to emit something else
> depending on the SSE level argument passed to the compiler. There are
> attributes to set the 'target' per-function, but that didn't work for
> some reason, so I need to work out if that can be resolved, otherwise
> my whole approach (goal of being able to generate multiple SIMD
> version code paths for runtime selection) won't work (in GCC)...
>
> We need to get a quality low-level API out there, that is portable,
> and fills gaps in the various architectures, then we can focus on
> high-level wrappers and niceties.

Make it work in dmd (with my help, of course) and prove the design. Then GDC 
will come along.

> I really want to see your half-float module merged. Where did that go?
> I recall some people were saying it should be conflated with the
> custom-float stuff, so half-float was just a specialisation of custom
> float...

Half-float is here:

http://digitalmars.com/sargon/halffloat.html

in the Sargon component library :-)

> I'm not so sure about that... but maybe? I have been needing a 3.7
> (10bit) float too, maybe that fits in there?

It would be trivial to use halffloat as a model for building other custom 
floating point types.


> That stuff all needs forceinline too to be particularly useful.

I agree, but that does NOT block you from designing and writing the code. It 
only blocks the final polish.

It also may be worthwhile to look through std.algorithm and see what can be 
specialized to use simd, such as string searching.



More information about the Digitalmars-d mailing list