fixes for building and running on iOS (#619)

* fixes for building and running on iOS

* per suggestion just use Accelerate
This commit is contained in:
David Koski
2024-02-04 12:29:17 -08:00
committed by GitHub
parent 11a9fd40f0
commit ebfd3618b0
4 changed files with 5 additions and 4 deletions

View File

@@ -26,7 +26,8 @@ static constexpr const char* default_mtllib_path = METAL_PATH;
auto load_device() {
auto devices = MTL::CopyAllDevices();
auto device = static_cast<MTL::Device*>(devices->object(0));
auto device = static_cast<MTL::Device*>(devices->object(0))
?: MTL::CreateSystemDefaultDevice();
if (!device) {
throw std::runtime_error("Failed to load device");
}