diff --git a/device/coordinate_manager.cpp b/device/coordinate_manager.cpp index ca12b92b..b4a41725 100644 --- a/device/coordinate_manager.cpp +++ b/device/coordinate_manager.cpp @@ -172,13 +172,14 @@ CoordinateManager* CoordinateManager::get_coordinate_manager( const std::vector& workers, std::size_t harvesting_mask) { - if (arch == tt::ARCH::GRAYSKULL) { - return new GrayskullCoordinateManager(worker_grid_size, workers, harvesting_mask); - } else if (arch == tt::ARCH::WORMHOLE_B0) { - return new WormholeCoordinateManager(worker_grid_size, workers, harvesting_mask); - } else if (arch == tt::ARCH::BLACKHOLE) { - return new BlackholeCoordinateManager(worker_grid_size, workers, harvesting_mask); - } else { - throw std::runtime_error("Invalid architecture for coordinate manager"); + switch (arch) { + case tt::ARCH::GRAYSKULL: + return new GrayskullCoordinateManager(worker_grid_size, workers, harvesting_mask); + case tt::ARCH::WORMHOLE_B0: + return new WormholeCoordinateManager(worker_grid_size, workers, harvesting_mask); + case tt::ARCH::BLACKHOLE: + return new BlackholeCoordinateManager(worker_grid_size, workers, harvesting_mask); } + + throw std::runtime_error("Invalid architecture for creating coordinate manager"); } \ No newline at end of file