[asl] 13/33: Add OpenCL driver version
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu May 5 18:40:49 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository asl.
commit e16f40d5ad5c1e9492a33bdabecac6d01ad68b88
Author: Avtech Scientific <AvtechScientific at users.noreply.github.com>
Date: Tue Oct 13 11:33:01 2015 +0300
Add OpenCL driver version
---
src/acl/aclHardware.cxx | 6 ++++++
src/acl/aclHardware.h | 5 ++++-
utilities/asl-hardware.cc | 3 ++-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/acl/aclHardware.cxx b/src/acl/aclHardware.cxx
index 5ecc330..cacacc5 100644
--- a/src/acl/aclHardware.cxx
+++ b/src/acl/aclHardware.cxx
@@ -159,6 +159,12 @@ namespace acl
}
+ string getDriverVersion(const CommandQueue & queue)
+ {
+ return getDevice(queue).getInfo<CL_DRIVER_VERSION>();
+ }
+
+
cl_uint getNComputeUnits(const CommandQueue & queue)
{
return getDevice(queue).getInfo<CL_DEVICE_MAX_COMPUTE_UNITS>();
diff --git a/src/acl/aclHardware.h b/src/acl/aclHardware.h
index 0b69fd6..0165eb8 100644
--- a/src/acl/aclHardware.h
+++ b/src/acl/aclHardware.h
@@ -42,7 +42,7 @@ namespace acl
extern const std::vector<std::string> TYPE;
extern const std::vector<unsigned char> TYPE_SIZE;
/// contains trasnlation of types necessery for use in the function select
- /* expression in the condition field should have this type*/
+ /* expression in the condition field should have this type */
extern const std::vector<TypeID> TYPE_SELECT;
/// Returns vendor name.
@@ -56,6 +56,9 @@ namespace acl
/** Returns the OpenCL version supported by the device */
std::string getDeviceVersion(const CommandQueue & queue);
+ /** Returns the OpenCL driver version */
+ std::string getDriverVersion(const CommandQueue & queue);
+
/// Returns device type.
/// \ingroup HardwareInformation
cl_device_type getDeviceType(const CommandQueue & queue);
diff --git a/utilities/asl-hardware.cc b/utilities/asl-hardware.cc
index e361377..a1fd813 100644
--- a/utilities/asl-hardware.cc
+++ b/utilities/asl-hardware.cc
@@ -65,6 +65,7 @@ void printHardwareInfo(const CommandQueue & queue)
cout << "\t\textension CL_KHR_INT64_EXTENDED_ATOMICS: "
<< extensionAvailable(queue, CL_KHR_INT64_EXTENDED_ATOMICS) << endl;
cout << "\t\tsupported OpenCL version: " << getDeviceVersion(queue) << endl;
+ cout << "\t\tOpenCL driver version: "<< getDriverVersion(queue) << endl;
}
@@ -114,4 +115,4 @@ int main()
}
return 0;
-}
\ No newline at end of file
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/asl.git
More information about the debian-science-commits
mailing list