enable @restrict for slices?
Bruce Carneal
bcarneal at gmail.com
Fri Sep 30 03:18:46 UTC 2022
On Tuesday, 13 September 2022 at 19:39:44 UTC, kinke wrote:
> On Tuesday, 13 September 2022 at 18:56:10 UTC, Bruce Carneal
> wrote:
>> ...
>>
>> Might this be upgraded to match gdc's current behavior on
>> godbolt? (allow @restrict for both pointers and slice)
>
> Yeah that would definitely be nice...
Following up:
1) gdc trunk on godbolt *accepted* @restrict on slice argument
but ignored it in code gen. IIUC I believe Iain thinks this
should error out, at least for now.
2) I understand pOnce has seen a few (modest?) gains in his SIMD
code using @restrict.
3) Calling nested functions with @restrict pointers coming from
slice args to an @trusted outer function that does all the bounds
checking is an agreeable workaround so ... very nice to have
@restrict slices but their absence does not usher in the
apocalypse.
More information about the digitalmars-d-ldc
mailing list