Repository navigation
Question about math intrinsics in the Slang host VM #13277
|
I'm experimenting with the slangi implementation from PR #6896, and I'm trying to understand how standard math functions are supposed to work in the VM. For example, the sin implementation in There doesn't appear to be a host-VM target in this __target_switch. with I get My question is, what is the intended way to use functions like sin, cos, length, cross, etc with the interpreter? If they aren't supported yet, how difficult would it be to add support for them? I'd be happy to work on a PR if there's an established approach for implementing these VM math functions. Thank you in advance! |
Replies: 3 comments 1 reply
|
This is a real gap, not something you're missing on the usage side. Two things are broken/missing for the VM target: 1. The target's capability set is empty by design bug. slang/source/slang/slang-target.cpp Lines 96 to 208 in 532553d It has arms for 2. Even if that were fixed,
So to add this you'd need both:
There's no existing issue or PR for this that I could find, so if you want to send a PR, starting with the |
|
Update: I've opened PR#13340 as a small proof-of-concept. Please feel free to follow or leave feedback. |
|
Just to be clear, |
Just to be clear,
slangiis an experimental feature at the moment and a lot of things are missing.The example of how it is supposed to be used can be found from the following file,
tools/slang-unit-test/unit-test-slang-vm.cpp: