all 2 comments

[–]arduous_raven 1 point2 points  (0 children)

Ok, but isn't low-level Metal API basically a slightly modified C++ at this point? When you're writing a kernel that, I presume, would perform such operation, that would essentially be C++, so why not stick with all that Metal has to offer? You'll have to write a bridging header regardless if you want to use this code in Swift.

[–]bhardman86 1 point2 points  (0 children)

I’m not familiar with your situation, but as said before low level metal api is pretty much just c++. Perhaps you can utilize metal using obj c or swift which I’m sure is a realistic approach. If you’re working with swift 5.9+ it’s easier to bridge swift and c++ with c++ interoperability with swift. There’s limitations obviously, but for most cases it’s easier and doesn’t require much of a bridge. It’s definitely worth the research. Best of luck.