From 2aaab8f748d9edd01b9e8cec8725b2b9cf03abbe Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Tue, 6 Dec 2016 23:06:35 +0100 Subject: [PATCH] Added method to get the vendor name of an OpenCL device. --- MagickCore/opencl.c | 29 +++++++++++++++++++++++++++++ MagickCore/opencl.h | 1 + 2 files changed, 30 insertions(+) diff --git a/MagickCore/opencl.c b/MagickCore/opencl.c index cadb74e43..aa8631250 100644 --- a/MagickCore/opencl.c +++ b/MagickCore/opencl.c @@ -1786,6 +1786,35 @@ MagickExport const char *GetOpenCLDeviceName(const MagickCLDevice device) return(device->name); } +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % +% G e t O p e n C L D e v i c e V e n d o r N a m e % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% GetOpenCLDeviceVendorName() returns the vendor name of the device. +% +% The format of the GetOpenCLDeviceVendorName method is: +% +% const char *GetOpenCLDeviceVendorName(const MagickCLDevice device) +% +% A description of each parameter follows: +% +% o device: the OpenCL device. +*/ + +MagickExport const char *GetOpenCLDeviceVendorName(const MagickCLDevice device) +{ + if (device == (MagickCLDevice) NULL) + return((const char *) NULL); + return(device->vendor_name); +} + /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % diff --git a/MagickCore/opencl.h b/MagickCore/opencl.h index ff680e18a..30e2c29f0 100644 --- a/MagickCore/opencl.h +++ b/MagickCore/opencl.h @@ -45,6 +45,7 @@ typedef struct _MagickCLDevice* MagickCLDevice; extern MagickExport const char *GetOpenCLDeviceName(const MagickCLDevice), + *GetOpenCLDeviceVendorName(const MagickCLDevice), *GetOpenCLDeviceVersion(const MagickCLDevice); extern MagickExport const KernelProfileRecord -- 2.40.0