diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d67af1c01..c1ab2d3eb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -51,8 +51,10 @@ endif() target_include_directories( kompute PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${PROJECT_SOURCE_DIR}/single_include + $ + $ + $ + $ ) if(NOT KOMPUTE_OPT_ANDOID_BUILD) diff --git a/src/Manager.cpp b/src/Manager.cpp index 807d4832f..a78cc7a34 100644 --- a/src/Manager.cpp +++ b/src/Manager.cpp @@ -453,4 +453,10 @@ Manager::getDeviceProperties() const return this->mPhysicalDevice->getProperties(); } +std::vector +Manager::listDevices() const +{ + return this->mInstance->enumeratePhysicalDevices(); +} + } diff --git a/src/include/kompute/Manager.hpp b/src/include/kompute/Manager.hpp index e9e284155..03c0c8c1d 100644 --- a/src/include/kompute/Manager.hpp +++ b/src/include/kompute/Manager.hpp @@ -154,10 +154,20 @@ class Manager void clear(); /** - * Return a struct containing information about the device. + * Information about the current device. + * + * @return vk::PhysicalDeviceProperties containing information about the device **/ vk::PhysicalDeviceProperties getDeviceProperties() const; + /** + * List the devices available in the current vulkan instance. + * + * @return vector of physical devices containing their respective properties + **/ + std::vector listDevices() const; + + private: // -------------- OPTIONALLY OWNED RESOURCES std::shared_ptr mInstance = nullptr;