October 10, 2016 Re: Required DMD changes for Mir and few thoughts about D future | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Yaroshenko | On Saturday, 8 October 2016 at 18:10:14 UTC, Ilya Yaroshenko wrote: > https://github.com/MartinNowak/druntime/blob/23373260e65af5edea989b61d6660832fedbec15/src/core/internal/arrayop.d#L78. > > Could you please give an example how it works for user? > I mean aligned vs unaligned. ??? You could pack them like so. float4 vec = loadUnaligned!float4(ptrToFloats); float4 vec = loadAligned!float4(ptrToFloats); The wrappers are only necessary because DMD/GDC/ldc have different SIMD implementations. Would be great if someone wrote a common basis library, unfortunately Manu's std.simd got stuck in progress. > Does this is always inlined intrinsic (i mean this function has not any its machine code in the object file / library e.g. always inlined into the function body even in debug compilaiton)? D doesn't have macros and can't force inline, to inline w/o inliner you could use mixin templates, but relying on the inliner to do it's job would be cleaner. |
October 10, 2016 Re: Required DMD changes for Mir and few thoughts about D future | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Saturday, 8 October 2016 at 18:53:32 UTC, Andrei Alexandrescu wrote: > (after thinking a bit more) ... but Mir seems to rely in good part on templates, which makes pre-compiled libraries less effective. -- Andrei On Saturday, 8 October 2016 at 18:53:32 UTC, Andrei Alexandrescu wrote: Ilya's answer http://forum.dlang.org/post/rexuwvohqceaglcbrico@forum.dlang.org Sounds like a feasible approach for phobos inclusion w/ prolly very little usability restrictions on the generic API wrapping those. |
October 10, 2016 Re: Required DMD changes for Mir and few thoughts about D future | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Nowak | On 10/10/16 2:05 AM, Martin Nowak wrote:
> On Saturday, 8 October 2016 at 18:53:32 UTC, Andrei Alexandrescu wrote:
>> (after thinking a bit more) ... but Mir seems to rely in good part on
>> templates, which makes pre-compiled libraries less effective. -- Andrei
>
> On Saturday, 8 October 2016 at 18:53:32 UTC, Andrei Alexandrescu wrote:
> Ilya's answer
> http://forum.dlang.org/post/rexuwvohqceaglcbrico@forum.dlang.org
>
> Sounds like a feasible approach for phobos inclusion w/ prolly very
> little usability restrictions on the generic API wrapping those.
Yes, after talking to him this seems definitely a worthwhile pursuit. -- Andrei
|
October 10, 2016 Re: Required DMD changes for Mir and few thoughts about D future | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Saturday, 8 October 2016 at 18:53:32 UTC, Andrei Alexandrescu wrote:
> On 10/8/16 2:49 PM, Andrei Alexandrescu wrote:
>> On 10/8/16 1:22 PM, Martin Nowak wrote:
>>> Integrating this with a pre-compiled ldc library is a fantastic idea
>>> OTOH.
>>> If we can make this work, it will be much less effort and yield the
>>> fastest implementation. Also would speed up the development cycle a bit
>>> b/c the kernels don't need to be recompiled/optimized.
>>
>> You mean dmd/ldc/etc interop at binary level? Yes, that would be pretty
>> rad indeed! -- Andrei
>
> (after thinking a bit more) ... but Mir seems to rely in good part on templates, which makes pre-compiled libraries less effective. -- Andrei
Independent from Mir, a stable ABI for D which all compilers follow would be a tremendous win, especially from the perspective of shipping D stuff in Linux distributions.
So maybe this is worth attempting?
|
Copyright © 1999-2021 by the D Language Foundation