Add function to get maxRootDeviceIndex & set of rootDeviceIndices

Add to context:
- getRootDeviceIndices
- getMaxRootDeviceIndex

Related-To: NEO-4589
Change-Id: I68a2162eea3d566c2ee99714d45253dfa35ec0cd
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2020-09-08 11:19:57 +02:00
committed by sys_ocldev
parent 6472d7b5e2
commit fee51350f1
3 changed files with 60 additions and 12 deletions

View File

@@ -17,6 +17,7 @@
#include "opencl/source/helpers/destructor_callback.h"
#include <list>
#include <set>
namespace NEO {
@@ -88,6 +89,10 @@ class Context : public BaseObject<_cl_context> {
return svmAllocsManager;
}
const std::set<uint32_t> &getRootDeviceIndices() const;
uint32_t getMaxRootDeviceIndex() const;
DeviceQueue *getDefaultDeviceQueue();
void setDefaultDeviceQueue(DeviceQueue *queue);
@@ -155,6 +160,9 @@ class Context : public BaseObject<_cl_context> {
cl_int processExtraProperties(cl_context_properties propertyType, cl_context_properties propertyValue);
void setupContextType();
std::set<uint32_t> rootDeviceIndices = {};
uint32_t maxRootDeviceIndex = std::numeric_limits<uint32_t>::max();
const cl_context_properties *properties = nullptr;
size_t numProperties = 0u;
void(CL_CALLBACK *contextCallback)(const char *, const void *, size_t, void *) = nullptr;