[arrayfire] 303/408: fix instantiation of Platform objects

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:12:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.

commit 30f9e3ce82849d975a95922a545eaf94f7581811
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Thu Aug 20 22:07:05 2015 +0100

    fix instantiation of Platform objects
---
 src/backend/opencl/platform.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/opencl/platform.cpp b/src/backend/opencl/platform.cpp
index 174236a..1fc7a04 100644
--- a/src/backend/opencl/platform.cpp
+++ b/src/backend/opencl/platform.cpp
@@ -222,7 +222,7 @@ std::string getInfo()
         vector<Device> devices = context->getInfo<CL_CONTEXT_DEVICES>();
 
         for(auto &device:devices) {
-            const Platform &platform = device.getInfo<CL_DEVICE_PLATFORM>();
+            const Platform platform(device.getInfo<CL_DEVICE_PLATFORM>());
             string platStr = platform.getInfo<CL_PLATFORM_NAME>();
             bool show_braces = ((unsigned)getActiveDeviceId() == nDevices);
             string dstr = device.getInfo<CL_DEVICE_NAME>();
@@ -247,7 +247,7 @@ std::string getInfo()
 
 std::string getPlatformName(const cl::Device &device)
 {
-    const Platform &platform = device.getInfo<CL_DEVICE_PLATFORM>();
+    const Platform platform(device.getInfo<CL_DEVICE_PLATFORM>());
     std::string platStr = platform.getInfo<CL_PLATFORM_NAME>();
     return platformMap(platStr);
 }
@@ -302,7 +302,7 @@ void devprop(char* d_name, char* d_platform, char *d_toolkit, char* d_compute)
         vector<Device> devices = context->getInfo<CL_CONTEXT_DEVICES>();
 
         for (auto &device : devices) {
-            const Platform &platform = device.getInfo<CL_DEVICE_PLATFORM>();
+            const Platform platform(device.getInfo<CL_DEVICE_PLATFORM>());
             string platStr = platform.getInfo<CL_PLATFORM_NAME>();
 
             if (currActiveDevId == nDevices) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list