diff options
Diffstat (limited to 'include/internal/clpp11.h')
-rw-r--r-- | include/internal/clpp11.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/internal/clpp11.h b/include/internal/clpp11.h index e70f9000..b834d8b4 100644 --- a/include/internal/clpp11.h +++ b/include/internal/clpp11.h @@ -207,6 +207,12 @@ class Device { return true; } + // Query for a specific type of device or brand + bool IsCPU() const { return Type() == "CPU"; } + bool IsGPU() const { return Type() == "GPU"; } + bool IsAMD() const { return Vendor() == "AMD" || Vendor() == "Advanced Micro Devices, Inc."; } + bool IsARM() const { return Vendor() == "ARM"; } + // Accessor to the private data-member const cl_device_id& operator()() const { return device_; } private: |