ldc/dcompute nvptx intrinsics
Bruce Carneal
bcarneal at gmail.com
Sat Feb 20 15:33:30 UTC 2021
On Saturday, 20 February 2021 at 12:38:35 UTC, Johan Engelen
wrote:
> On Friday, 19 February 2021 at 20:02:29 UTC, Bruce Carneal
> wrote:
>>
>> I'd love to bring up some additional functionality but I'm new
>> to LDC/LLVM so it's slow going at this point of the learning
>> curve. Does anyone have additional LDC/dcompute CUDA
>> intrinsics working or have some pointers for bringing up more
>> CUDA/warp intrinsics generally?
>
> Hi Bruce,
> You can write LLVM IR inside D code using ldc.llvmasm.__irEx.
> Perhaps that works as a quick workaround for defining calls to
> intrinsics.
> Very quickly, something like this:
>
> ```
> alias someFunction = __irEx!("forward declaration of
> intrinsic", "call intrinsic(%0,%1,%2)", int, long, void*);
> ```
>
> -Johan
This looks like a very good way to enable intrinsics. I'll give
it a try and report back. If it's clean enough I'll also submit
a dcompute PR.
Thanks Johan!
More information about the digitalmars-d-ldc
mailing list