relaxed memory model function attribute
NadiaEira
nadiaeira00 at gmail.com
Thu Aug 8 07:33:37 UTC 2024
On Tuesday, 30 July 2024 at 16:50:05 UTC, [cookie clicker
2](https://cookieclicker-2.com) wrote:
> Would an @restrict function attribute that applied to all ptr
> and slice arguments be hard to implement?
>
> I'd use this on most if not all of my performance critical
> 'leaf' functions for both auto-vec and dcompute environments.
> Nested functions accepting individual @restrict pointer
> arguments are an OK alternative but when working with multiple
> inputs and outputs things get a little tangled.
It sounds like the @restrict function attribute would be really
useful for optimizing performance in your code. Implementing it
for all ptr and slice arguments could definitely simplify things,
especially for complex functions with multiple inputs and
outputs. It's a great idea to consider for both auto-vec and
dcompute environments.
More information about the digitalmars-d-ldc
mailing list